xref: /openbmc/bmcweb/features/redfish/include/error_messages.hpp (revision 4ef82a1505c1dc04c289dabba5e7e4e47f53900c)
1f4c4dcf4SKowalski, Kamil /*
2f4c4dcf4SKowalski, Kamil // Copyright (c) 2018 Intel Corporation
3f4c4dcf4SKowalski, Kamil //
4f4c4dcf4SKowalski, Kamil // Licensed under the Apache License, Version 2.0 (the "License");
5f4c4dcf4SKowalski, Kamil // you may not use this file except in compliance with the License.
6f4c4dcf4SKowalski, Kamil // You may obtain a copy of the License at
7f4c4dcf4SKowalski, Kamil //
8f4c4dcf4SKowalski, Kamil //      http://www.apache.org/licenses/LICENSE-2.0
9f4c4dcf4SKowalski, Kamil //
10f4c4dcf4SKowalski, Kamil // Unless required by applicable law or agreed to in writing, software
11f4c4dcf4SKowalski, Kamil // distributed under the License is distributed on an "AS IS" BASIS,
12f4c4dcf4SKowalski, Kamil // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13f4c4dcf4SKowalski, Kamil // See the License for the specific language governing permissions and
14f4c4dcf4SKowalski, Kamil // limitations under the License.
15f4c4dcf4SKowalski, Kamil */
16f4c4dcf4SKowalski, Kamil #pragma once
170442ef92SNan Zhou 
1804e438cbSEd Tanous #include "http_response.hpp"
190442ef92SNan Zhou #include "source_location.hpp"
20f12894f8SJason M. Bills 
2102fea7a7SEd Tanous #include <boost/url/url_view.hpp>
221214b7e7SGunnar Mills #include <nlohmann/json.hpp>
231214b7e7SGunnar Mills 
240442ef92SNan Zhou #include <cstdint>
259ea15c35SEd Tanous #include <string>
260442ef92SNan Zhou #include <string_view>
270442ef92SNan Zhou 
280442ef92SNan Zhou // IWYU pragma: no_include <cstdint.h>
290442ef92SNan Zhou // IWYU pragma: no_forward_declare crow::Response
309ea15c35SEd Tanous 
311abe55efSEd Tanous namespace redfish
321abe55efSEd Tanous {
33f4c4dcf4SKowalski, Kamil 
341abe55efSEd Tanous namespace messages
351abe55efSEd Tanous {
36f4c4dcf4SKowalski, Kamil 
3781856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0.";
3855c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo";
39f4c4dcf4SKowalski, Kamil 
40f4c4dcf4SKowalski, Kamil /**
413590bd1dSNan Zhou  * @brief Moves all error messages from the |source| JSON to |target|
423590bd1dSNan Zhou  */
433590bd1dSNan Zhou void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source);
443590bd1dSNan Zhou 
453590bd1dSNan Zhou /**
46f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInUse message into JSON
47f4c4dcf4SKowalski, Kamil  * Message body: "The change to the requested resource failed because the
48f4c4dcf4SKowalski, Kamil  * resource is in use or in transition."
49f4c4dcf4SKowalski, Kamil  *
50f4c4dcf4SKowalski, Kamil  *
51f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInUse formatted to JSON */
5265176d39SEd Tanous nlohmann::json resourceInUse();
53b5c07418SJames Feist 
54f12894f8SJason M. Bills void resourceInUse(crow::Response& res);
55f4c4dcf4SKowalski, Kamil 
56f4c4dcf4SKowalski, Kamil /**
57f4c4dcf4SKowalski, Kamil  * @brief Formats MalformedJSON message into JSON
58f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted was malformed JSON and could not be
59f4c4dcf4SKowalski, Kamil  * parsed by the receiving service."
60f4c4dcf4SKowalski, Kamil  *
61f4c4dcf4SKowalski, Kamil  *
62f4c4dcf4SKowalski, Kamil  * @returns Message MalformedJSON formatted to JSON */
6365176d39SEd Tanous nlohmann::json malformedJSON();
64b5c07418SJames Feist 
65f12894f8SJason M. Bills void malformedJSON(crow::Response& res);
66f4c4dcf4SKowalski, Kamil 
67f4c4dcf4SKowalski, Kamil /**
68f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceMissingAtURI message into JSON
6966ac2b8cSJason M. Bills  * Message body: "The resource at the URI <arg1> was not found."
70f4c4dcf4SKowalski, Kamil  *
71f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
72f4c4dcf4SKowalski, Kamil  *
73f4c4dcf4SKowalski, Kamil  * @returns Message ResourceMissingAtURI formatted to JSON */
74ace85d60SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view& arg1);
75b5c07418SJames Feist 
76ace85d60SEd Tanous void resourceMissingAtURI(crow::Response& res,
77ace85d60SEd Tanous                           const boost::urls::url_view& arg1);
78f4c4dcf4SKowalski, Kamil 
79f4c4dcf4SKowalski, Kamil /**
80f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueFormatError message into JSON
8166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
82f4c4dcf4SKowalski, Kamil  * is of a different format than the parameter can accept."
83f4c4dcf4SKowalski, Kamil  *
84f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
85f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
86f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
87f4c4dcf4SKowalski, Kamil  *
88f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueFormatError formatted to JSON */
891668ce6dSEd Tanous nlohmann::json actionParameterValueFormatError(std::string_view arg1,
901668ce6dSEd Tanous                                                std::string_view arg2,
911668ce6dSEd Tanous                                                std::string_view arg3);
92b5c07418SJames Feist 
931668ce6dSEd Tanous void actionParameterValueFormatError(crow::Response& res, std::string_view arg1,
941668ce6dSEd Tanous                                      std::string_view arg2,
951668ce6dSEd Tanous                                      std::string_view arg3);
96f4c4dcf4SKowalski, Kamil 
97f4c4dcf4SKowalski, Kamil /**
98*4ef82a15SAlex Schendel  * @brief Formats ActionParameterValueNotInList message into JSON
99*4ef82a15SAlex Schendel  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
100*4ef82a15SAlex Schendel  * is not in the list of acceptable values."
101*4ef82a15SAlex Schendel  *
102*4ef82a15SAlex Schendel  * @param[in] arg1 Parameter of message that will replace %1 in its body.
103*4ef82a15SAlex Schendel  * @param[in] arg2 Parameter of message that will replace %2 in its body.
104*4ef82a15SAlex Schendel  * @param[in] arg3 Parameter of message that will replace %3 in its body.
105*4ef82a15SAlex Schendel  *
106*4ef82a15SAlex Schendel  * @returns Message ActionParameterValueFormatError formatted to JSON */
107*4ef82a15SAlex Schendel nlohmann::json actionParameterValueNotInList(std::string_view arg1,
108*4ef82a15SAlex Schendel                                              std::string_view arg2,
109*4ef82a15SAlex Schendel                                              std::string_view arg3);
110*4ef82a15SAlex Schendel 
111*4ef82a15SAlex Schendel void actionParameterValueNotInList(crow::Response& res, std::string_view arg1,
112*4ef82a15SAlex Schendel                                    std::string_view arg2,
113*4ef82a15SAlex Schendel                                    std::string_view arg3);
114*4ef82a15SAlex Schendel 
115*4ef82a15SAlex Schendel /**
116f4c4dcf4SKowalski, Kamil  * @brief Formats InternalError message into JSON
117f4c4dcf4SKowalski, Kamil  * Message body: "The request failed due to an internal service error.  The
118f4c4dcf4SKowalski, Kamil  * service is still operational."
119f4c4dcf4SKowalski, Kamil  *
120f4c4dcf4SKowalski, Kamil  *
121f4c4dcf4SKowalski, Kamil  * @returns Message InternalError formatted to JSON */
12265176d39SEd Tanous nlohmann::json internalError();
123b5c07418SJames Feist 
1249eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location =
125df5415fcSEd Tanous                                             bmcweb::source_location::current());
126f12894f8SJason M. Bills 
127f12894f8SJason M. Bills /**
128f4c4dcf4SKowalski, Kamil  * @brief Formats UnrecognizedRequestBody message into JSON
129f4c4dcf4SKowalski, Kamil  * Message body: "The service detected a malformed request body that it was
130f4c4dcf4SKowalski, Kamil  * unable to interpret."
131f4c4dcf4SKowalski, Kamil  *
132f4c4dcf4SKowalski, Kamil  *
133f4c4dcf4SKowalski, Kamil  * @returns Message UnrecognizedRequestBody formatted to JSON */
13465176d39SEd Tanous nlohmann::json unrecognizedRequestBody();
135b5c07418SJames Feist 
136f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res);
137f4c4dcf4SKowalski, Kamil 
138f4c4dcf4SKowalski, Kamil /**
139f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriUnauthorized message into JSON
14066ac2b8cSJason M. Bills  * Message body: "While accessing the resource at <arg1>, the service received
14166ac2b8cSJason M. Bills  * an authorization error <arg2>."
142f4c4dcf4SKowalski, Kamil  *
143f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
144f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
145f4c4dcf4SKowalski, Kamil  *
146f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriUnauthorized formatted to JSON */
147ace85d60SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view& arg1,
1481668ce6dSEd Tanous                                          std::string_view arg2);
149b5c07418SJames Feist 
150ace85d60SEd Tanous void resourceAtUriUnauthorized(crow::Response& res,
151ace85d60SEd Tanous                                const boost::urls::url_view& arg1,
1521668ce6dSEd Tanous                                std::string_view arg2);
153f4c4dcf4SKowalski, Kamil 
154f4c4dcf4SKowalski, Kamil /**
155f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterUnknown message into JSON
15666ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with the invalid parameter
15766ac2b8cSJason M. Bills  * <arg2>."
158f4c4dcf4SKowalski, Kamil  *
159f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
160f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
161f4c4dcf4SKowalski, Kamil  *
162f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterUnknown formatted to JSON */
1631668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1,
1641668ce6dSEd Tanous                                       std::string_view arg2);
165b5c07418SJames Feist 
1661668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1,
1671668ce6dSEd Tanous                             std::string_view arg2);
168f4c4dcf4SKowalski, Kamil 
169f4c4dcf4SKowalski, Kamil /**
170f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceCannotBeDeleted message into JSON
171f4c4dcf4SKowalski, Kamil  * Message body: "The delete request failed because the resource requested
172f4c4dcf4SKowalski, Kamil  * cannot be deleted."
173f4c4dcf4SKowalski, Kamil  *
174f4c4dcf4SKowalski, Kamil  *
175f4c4dcf4SKowalski, Kamil  * @returns Message ResourceCannotBeDeleted formatted to JSON */
17665176d39SEd Tanous nlohmann::json resourceCannotBeDeleted();
177b5c07418SJames Feist 
178f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res);
179f4c4dcf4SKowalski, Kamil 
180f4c4dcf4SKowalski, Kamil /**
181f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyDuplicate message into JSON
18266ac2b8cSJason M. Bills  * Message body: "The property <arg1> was duplicated in the request."
183f4c4dcf4SKowalski, Kamil  *
184f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
185f4c4dcf4SKowalski, Kamil  *
186f4c4dcf4SKowalski, Kamil  * @returns Message PropertyDuplicate formatted to JSON */
1871668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1);
188b5c07418SJames Feist 
1891668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1);
190f4c4dcf4SKowalski, Kamil 
191f4c4dcf4SKowalski, Kamil /**
192f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceTemporarilyUnavailable message into JSON
19366ac2b8cSJason M. Bills  * Message body: "The service is temporarily unavailable.  Retry in <arg1>
194f4c4dcf4SKowalski, Kamil  * seconds."
195f4c4dcf4SKowalski, Kamil  *
196f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
197f4c4dcf4SKowalski, Kamil  *
198f4c4dcf4SKowalski, Kamil  * @returns Message ServiceTemporarilyUnavailable formatted to JSON */
1991668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1);
200b5c07418SJames Feist 
2011668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1);
202f4c4dcf4SKowalski, Kamil 
203f4c4dcf4SKowalski, Kamil /**
204f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAlreadyExists message into JSON
20566ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> with the property <arg2>
20666ac2b8cSJason M. Bills  * with the value <arg3> already exists."
207f4c4dcf4SKowalski, Kamil  *
208f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
209f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
210f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
211f4c4dcf4SKowalski, Kamil  *
212f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAlreadyExists formatted to JSON */
2131668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1,
2141668ce6dSEd Tanous                                      std::string_view arg2,
2151668ce6dSEd Tanous                                      std::string_view arg3);
216b5c07418SJames Feist 
2171668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1,
2181668ce6dSEd Tanous                            std::string_view arg2, std::string_view arg3);
219f4c4dcf4SKowalski, Kamil 
220f4c4dcf4SKowalski, Kamil /**
221f4c4dcf4SKowalski, Kamil  * @brief Formats AccountForSessionNoLongerExists message into JSON
222f4c4dcf4SKowalski, Kamil  * Message body: "The account for the current session has been removed, thus the
223f4c4dcf4SKowalski, Kamil  * current session has been removed as well."
224f4c4dcf4SKowalski, Kamil  *
225f4c4dcf4SKowalski, Kamil  *
226f4c4dcf4SKowalski, Kamil  * @returns Message AccountForSessionNoLongerExists formatted to JSON */
22765176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists();
228b5c07418SJames Feist 
229f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res);
230f4c4dcf4SKowalski, Kamil 
231f4c4dcf4SKowalski, Kamil /**
232f4c4dcf4SKowalski, Kamil  * @brief Formats CreateFailedMissingReqProperties message into JSON
233f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the required property
23466ac2b8cSJason M. Bills  * <arg1> was missing from the request."
235f4c4dcf4SKowalski, Kamil  *
236f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
237f4c4dcf4SKowalski, Kamil  *
238f4c4dcf4SKowalski, Kamil  * @returns Message CreateFailedMissingReqProperties formatted to JSON */
2391668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1);
240b5c07418SJames Feist 
241f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res,
2421668ce6dSEd Tanous                                       std::string_view arg1);
243f4c4dcf4SKowalski, Kamil 
244f4c4dcf4SKowalski, Kamil /**
245f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueFormatError message into JSON
24666ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
247f4c4dcf4SKowalski, Kamil  * format than the property can accept."
248f4c4dcf4SKowalski, Kamil  *
249f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
250f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
251f4c4dcf4SKowalski, Kamil  *
252f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueFormatError formatted to JSON */
2531668ce6dSEd Tanous nlohmann::json propertyValueFormatError(std::string_view arg1,
2541668ce6dSEd Tanous                                         std::string_view arg2);
255b5c07418SJames Feist 
2561668ce6dSEd Tanous void propertyValueFormatError(crow::Response& res, std::string_view arg1,
2571668ce6dSEd Tanous                               std::string_view arg2);
258f4c4dcf4SKowalski, Kamil 
259f4c4dcf4SKowalski, Kamil /**
260f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueNotInList message into JSON
26166ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is not in the list of
262f4c4dcf4SKowalski, Kamil  * acceptable values."
263f4c4dcf4SKowalski, Kamil  *
264f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
265f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
266f4c4dcf4SKowalski, Kamil  *
267f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueNotInList formatted to JSON */
2681668ce6dSEd Tanous nlohmann::json propertyValueNotInList(std::string_view arg1,
2691668ce6dSEd Tanous                                       std::string_view arg2);
270b5c07418SJames Feist 
2711668ce6dSEd Tanous void propertyValueNotInList(crow::Response& res, std::string_view arg1,
2721668ce6dSEd Tanous                             std::string_view arg2);
273f4c4dcf4SKowalski, Kamil 
274f4c4dcf4SKowalski, Kamil /**
275227a2b0aSJiaqing Zhao  * @brief Formats PropertyValueOutOfRange message into JSON
276227a2b0aSJiaqing Zhao  * Message body: "The value '%1' for the property %2 is not in the supported
277227a2b0aSJiaqing Zhao  * range of acceptable values."
278227a2b0aSJiaqing Zhao  *
279227a2b0aSJiaqing Zhao  * @param[in] arg1 Parameter of message that will replace %1 in its body.
280227a2b0aSJiaqing Zhao  * @param[in] arg2 Parameter of message that will replace %2 in its body.
281227a2b0aSJiaqing Zhao  *
282227a2b0aSJiaqing Zhao  * @returns Message PropertyValueExternalConflict formatted to JSON */
283227a2b0aSJiaqing Zhao nlohmann::json propertyValueOutOfRange(std::string_view arg1,
284227a2b0aSJiaqing Zhao                                        std::string_view arg2);
285227a2b0aSJiaqing Zhao 
286227a2b0aSJiaqing Zhao void propertyValueOutOfRange(crow::Response& res, std::string_view arg1,
287227a2b0aSJiaqing Zhao                              std::string_view arg2);
288227a2b0aSJiaqing Zhao 
289227a2b0aSJiaqing Zhao /**
290f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceAtUriInUnknownFormat message into JSON
29166ac2b8cSJason M. Bills  * Message body: "The resource at <arg1> is in a format not recognized by the
292f4c4dcf4SKowalski, Kamil  * service."
293f4c4dcf4SKowalski, Kamil  *
294f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
295f4c4dcf4SKowalski, Kamil  *
296f4c4dcf4SKowalski, Kamil  * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */
297ace85d60SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(const boost::urls::url_view& arg1);
298b5c07418SJames Feist 
299ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res,
300ace85d60SEd Tanous                                   const boost::urls::url_view& arg1);
301f4c4dcf4SKowalski, Kamil 
302f4c4dcf4SKowalski, Kamil /**
30381856681SAsmitha Karunanithi  * @brief Formats ServiceDisabled message into JSON
30481856681SAsmitha Karunanithi  * Message body: "The operation failed because the service at <arg1> is disabled
30581856681SAsmitha Karunanithi  * and " cannot accept requests."
30681856681SAsmitha Karunanithi  *
30781856681SAsmitha Karunanithi  * @param[in] arg1 Parameter of message that will replace %1 in its body.
30881856681SAsmitha Karunanithi  *
30981856681SAsmitha Karunanithi  * @returns Message ServiceDisabled formatted to JSON */
3101668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1);
31181856681SAsmitha Karunanithi 
3121668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1);
31381856681SAsmitha Karunanithi 
31481856681SAsmitha Karunanithi /**
315f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceInUnknownState message into JSON
316f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is in an unknown
317f4c4dcf4SKowalski, Kamil  * state and can no longer take incoming requests."
318f4c4dcf4SKowalski, Kamil  *
319f4c4dcf4SKowalski, Kamil  *
320f4c4dcf4SKowalski, Kamil  * @returns Message ServiceInUnknownState formatted to JSON */
32165176d39SEd Tanous nlohmann::json serviceInUnknownState();
322b5c07418SJames Feist 
323f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res);
324f4c4dcf4SKowalski, Kamil 
325f4c4dcf4SKowalski, Kamil /**
326f4c4dcf4SKowalski, Kamil  * @brief Formats EventSubscriptionLimitExceeded message into JSON
327f4c4dcf4SKowalski, Kamil  * Message body: "The event subscription failed due to the number of
328f4c4dcf4SKowalski, Kamil  * simultaneous subscriptions exceeding the limit of the implementation."
329f4c4dcf4SKowalski, Kamil  *
330f4c4dcf4SKowalski, Kamil  *
331f4c4dcf4SKowalski, Kamil  * @returns Message EventSubscriptionLimitExceeded formatted to JSON */
33265176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded();
333b5c07418SJames Feist 
334f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res);
335f4c4dcf4SKowalski, Kamil 
336f4c4dcf4SKowalski, Kamil /**
337f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterMissing message into JSON
33866ac2b8cSJason M. Bills  * Message body: "The action <arg1> requires the parameter <arg2> to be present
339f4c4dcf4SKowalski, Kamil  * in the request body."
340f4c4dcf4SKowalski, Kamil  *
341f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
342f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
343f4c4dcf4SKowalski, Kamil  *
344f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterMissing formatted to JSON */
3451668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1,
3461668ce6dSEd Tanous                                       std::string_view arg2);
347b5c07418SJames Feist 
3481668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1,
3491668ce6dSEd Tanous                             std::string_view arg2);
350f4c4dcf4SKowalski, Kamil 
351f4c4dcf4SKowalski, Kamil /**
352f4c4dcf4SKowalski, Kamil  * @brief Formats StringValueTooLong message into JSON
35366ac2b8cSJason M. Bills  * Message body: "The string <arg1> exceeds the length limit <arg2>."
354f4c4dcf4SKowalski, Kamil  *
355f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
356f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
357f4c4dcf4SKowalski, Kamil  *
358f4c4dcf4SKowalski, Kamil  * @returns Message StringValueTooLong formatted to JSON */
3591668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2);
360b5c07418SJames Feist 
3611668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2);
362f4c4dcf4SKowalski, Kamil 
363f4c4dcf4SKowalski, Kamil /**
364cc9139ecSJason M. Bills  * @brief Formats SessionTerminated message into JSON
365cc9139ecSJason M. Bills  * Message body: "The session was successfully terminated."
366cc9139ecSJason M. Bills  *
367cc9139ecSJason M. Bills  *
368cc9139ecSJason M. Bills  * @returns Message SessionTerminated formatted to JSON */
36965176d39SEd Tanous nlohmann::json sessionTerminated();
370b5c07418SJames Feist 
371cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res);
372cc9139ecSJason M. Bills 
373cc9139ecSJason M. Bills /**
374684bb4b8SJason M. Bills  * @brief Formats SubscriptionTerminated message into JSON
375684bb4b8SJason M. Bills  * Message body: "The event subscription has been terminated."
376684bb4b8SJason M. Bills  *
377684bb4b8SJason M. Bills  *
378684bb4b8SJason M. Bills  * @returns Message SubscriptionTerminated formatted to JSON */
37965176d39SEd Tanous nlohmann::json subscriptionTerminated();
380684bb4b8SJason M. Bills 
381684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res);
382684bb4b8SJason M. Bills 
383684bb4b8SJason M. Bills /**
384cc9139ecSJason M. Bills  * @brief Formats ResourceTypeIncompatible message into JSON
385cc9139ecSJason M. Bills  * Message body: "The @odata.type of the request body <arg1> is incompatible
386cc9139ecSJason M. Bills  * with the @odata.type of the resource which is <arg2>."
387cc9139ecSJason M. Bills  *
388cc9139ecSJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
389cc9139ecSJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
390cc9139ecSJason M. Bills  *
391cc9139ecSJason M. Bills  * @returns Message ResourceTypeIncompatible formatted to JSON */
3921668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1,
3931668ce6dSEd Tanous                                         std::string_view arg2);
394b5c07418SJames Feist 
3951668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1,
3961668ce6dSEd Tanous                               std::string_view arg2);
397cc9139ecSJason M. Bills 
398cc9139ecSJason M. Bills /**
399684bb4b8SJason M. Bills  * @brief Formats ResetRequired message into JSON
400684bb4b8SJason M. Bills  * Message body: "In order to complete the operation, a component reset is
401684bb4b8SJason M. Bills  * required with the Reset action URI '<arg1>' and ResetType '<arg2>'."
402684bb4b8SJason M. Bills  *
403684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
404684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
405684bb4b8SJason M. Bills  *
406684bb4b8SJason M. Bills  * @returns Message ResetRequired formatted to JSON */
407ace85d60SEd Tanous nlohmann::json resetRequired(const boost::urls::url_view& arg1,
4081668ce6dSEd Tanous                              std::string_view arg2);
409684bb4b8SJason M. Bills 
410ace85d60SEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view& arg1,
4111668ce6dSEd Tanous                    std::string_view arg2);
412684bb4b8SJason M. Bills 
413684bb4b8SJason M. Bills /**
414684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOnRequired message into JSON
415684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered on to
416684bb4b8SJason M. Bills  * perform this request."
417684bb4b8SJason M. Bills  *
418684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
419684bb4b8SJason M. Bills  *
420684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOnRequired formatted to JSON */
4211668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1);
422684bb4b8SJason M. Bills 
4231668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1);
424684bb4b8SJason M. Bills 
425684bb4b8SJason M. Bills /**
426684bb4b8SJason M. Bills  * @brief Formats ChassisPowerStateOffRequired message into JSON
427684bb4b8SJason M. Bills  * Message body: "The Chassis with Id '<arg1>' requires to be powered off to
428684bb4b8SJason M. Bills  * perform this request."
429684bb4b8SJason M. Bills  *
430684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
431684bb4b8SJason M. Bills  *
432684bb4b8SJason M. Bills  * @returns Message ChassisPowerStateOffRequired formatted to JSON */
4331668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1);
434684bb4b8SJason M. Bills 
4351668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1);
436684bb4b8SJason M. Bills 
437684bb4b8SJason M. Bills /**
438684bb4b8SJason M. Bills  * @brief Formats PropertyValueConflict message into JSON
439684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' could not be written because its value
440684bb4b8SJason M. Bills  * would conflict with the value of the '<arg2>' property."
441684bb4b8SJason M. Bills  *
442684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
443684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
444684bb4b8SJason M. Bills  *
445684bb4b8SJason M. Bills  * @returns Message PropertyValueConflict formatted to JSON */
4461668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1,
4471668ce6dSEd Tanous                                      std::string_view arg2);
448684bb4b8SJason M. Bills 
4491668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1,
4501668ce6dSEd Tanous                            std::string_view arg2);
451684bb4b8SJason M. Bills 
452684bb4b8SJason M. Bills /**
4532a6af81cSRamesh Iyyar  * @brief Formats PropertyValueResourceConflict message into JSON
4542a6af81cSRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could
4552a6af81cSRamesh Iyyar  * not be written because the value conflicts with the state or configuration
4562a6af81cSRamesh Iyyar  * of the resource at '%3'."
4572a6af81cSRamesh Iyyar  *
4582a6af81cSRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
4592a6af81cSRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
4602a6af81cSRamesh Iyyar  * @param[in] arg3 Parameter of message that will replace %3 in its body.
4612a6af81cSRamesh Iyyar  *
4622a6af81cSRamesh Iyyar  * @returns Message PropertyValueResourceConflict to JSON */
4632a6af81cSRamesh Iyyar nlohmann::json propertyValueResourceConflict(std::string_view arg1,
4642a6af81cSRamesh Iyyar                                              std::string_view arg2,
4652a6af81cSRamesh Iyyar                                              const boost::urls::url_view& arg3);
4662a6af81cSRamesh Iyyar 
4672a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1,
4682a6af81cSRamesh Iyyar                                    std::string_view arg2,
4692a6af81cSRamesh Iyyar                                    const boost::urls::url_view& arg3);
4702a6af81cSRamesh Iyyar 
4712a6af81cSRamesh Iyyar /**
47224861a28SRamesh Iyyar  * @brief Formats PropertyValueExternalConflict message into JSON
47324861a28SRamesh Iyyar  * Message body: "The property '%1' with the requested value of '%2' could not
47424861a28SRamesh Iyyar  * be written because the value is not available due to a configuration
47524861a28SRamesh Iyyar  * conflict."
47624861a28SRamesh Iyyar  *
47724861a28SRamesh Iyyar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
47824861a28SRamesh Iyyar  * @param[in] arg2 Parameter of message that will replace %2 in its body.
47924861a28SRamesh Iyyar  *
48024861a28SRamesh Iyyar  * @returns Message PropertyValueExternalConflict formatted to JSON */
48124861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1,
48224861a28SRamesh Iyyar                                              std::string_view arg2);
48324861a28SRamesh Iyyar 
48424861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1,
48524861a28SRamesh Iyyar                                    std::string_view arg2);
48624861a28SRamesh Iyyar 
48724861a28SRamesh Iyyar /**
488684bb4b8SJason M. Bills  * @brief Formats PropertyValueIncorrect message into JSON
489684bb4b8SJason M. Bills  * Message body: "The property '<arg1>' with the requested value of '<arg2>'
490684bb4b8SJason M. Bills  * could not be written because the value does not meet the constraints of the
491684bb4b8SJason M. Bills  * implementation."
492684bb4b8SJason M. Bills  *
493684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
494684bb4b8SJason M. Bills  * @param[in] arg2 Parameter of message that will replace %2 in its body.
495684bb4b8SJason M. Bills  *
496684bb4b8SJason M. Bills  * @returns Message PropertyValueIncorrect formatted to JSON */
4971668ce6dSEd Tanous nlohmann::json propertyValueIncorrect(std::string_view arg1,
4981668ce6dSEd Tanous                                       std::string_view arg2);
499684bb4b8SJason M. Bills 
5001668ce6dSEd Tanous void propertyValueIncorrect(crow::Response& res, std::string_view arg1,
5011668ce6dSEd Tanous                             std::string_view arg2);
502684bb4b8SJason M. Bills 
503684bb4b8SJason M. Bills /**
504684bb4b8SJason M. Bills  * @brief Formats ResourceCreationConflict message into JSON
505684bb4b8SJason M. Bills  * Message body: "The resource could not be created.  The service has a resource
506684bb4b8SJason M. Bills  * at URI '<arg1>' that conflicts with the creation request."
507684bb4b8SJason M. Bills  *
508684bb4b8SJason M. Bills  * @param[in] arg1 Parameter of message that will replace %1 in its body.
509684bb4b8SJason M. Bills  *
510684bb4b8SJason M. Bills  * @returns Message ResourceCreationConflict formatted to JSON */
511f7725d79SEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view& arg1);
512684bb4b8SJason M. Bills 
513f7725d79SEd Tanous void resourceCreationConflict(crow::Response& res,
514f7725d79SEd Tanous                               const boost::urls::url_view& arg1);
515684bb4b8SJason M. Bills 
516684bb4b8SJason M. Bills /**
517684bb4b8SJason M. Bills  * @brief Formats MaximumErrorsExceeded message into JSON
518684bb4b8SJason M. Bills  * Message body: "Too many errors have occurred to report them all."
519684bb4b8SJason M. Bills  *
520684bb4b8SJason M. Bills  *
521684bb4b8SJason M. Bills  * @returns Message MaximumErrorsExceeded formatted to JSON */
52265176d39SEd Tanous nlohmann::json maximumErrorsExceeded();
523684bb4b8SJason M. Bills 
524684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res);
525684bb4b8SJason M. Bills 
526684bb4b8SJason M. Bills /**
527684bb4b8SJason M. Bills  * @brief Formats PreconditionFailed message into JSON
528684bb4b8SJason M. Bills  * Message body: "The ETag supplied did not match the ETag required to change
529684bb4b8SJason M. Bills  * this resource."
530684bb4b8SJason M. Bills  *
531684bb4b8SJason M. Bills  *
532684bb4b8SJason M. Bills  * @returns Message PreconditionFailed formatted to JSON */
53365176d39SEd Tanous nlohmann::json preconditionFailed();
534684bb4b8SJason M. Bills 
535684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res);
536684bb4b8SJason M. Bills 
537684bb4b8SJason M. Bills /**
538684bb4b8SJason M. Bills  * @brief Formats PreconditionRequired message into JSON
539684bb4b8SJason M. Bills  * Message body: "A precondition header or annotation is required to change this
540684bb4b8SJason M. Bills  * resource."
541684bb4b8SJason M. Bills  *
542684bb4b8SJason M. Bills  *
543684bb4b8SJason M. Bills  * @returns Message PreconditionRequired formatted to JSON */
54465176d39SEd Tanous nlohmann::json preconditionRequired();
545684bb4b8SJason M. Bills 
546684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res);
547684bb4b8SJason M. Bills 
548684bb4b8SJason M. Bills /**
549684bb4b8SJason M. Bills  * @brief Formats OperationFailed message into JSON
550684bb4b8SJason M. Bills  * Message body: "An error occurred internal to the service as part of the
551684bb4b8SJason M. Bills  * overall request.  Partial results may have been returned."
552684bb4b8SJason M. Bills  *
553684bb4b8SJason M. Bills  *
554684bb4b8SJason M. Bills  * @returns Message OperationFailed formatted to JSON */
55565176d39SEd Tanous nlohmann::json operationFailed();
556684bb4b8SJason M. Bills 
557684bb4b8SJason M. Bills void operationFailed(crow::Response& res);
558684bb4b8SJason M. Bills 
559684bb4b8SJason M. Bills /**
560684bb4b8SJason M. Bills  * @brief Formats OperationTimeout message into JSON
561684bb4b8SJason M. Bills  * Message body: "A timeout internal to the service occured as part of the
562684bb4b8SJason M. Bills  * request.  Partial results may have been returned."
563684bb4b8SJason M. Bills  *
564684bb4b8SJason M. Bills  *
565684bb4b8SJason M. Bills  * @returns Message OperationTimeout formatted to JSON */
56665176d39SEd Tanous nlohmann::json operationTimeout();
567684bb4b8SJason M. Bills 
568684bb4b8SJason M. Bills void operationTimeout(crow::Response& res);
569684bb4b8SJason M. Bills 
570684bb4b8SJason M. Bills /**
571f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueTypeError message into JSON
57266ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the property <arg2> is of a different
573f4c4dcf4SKowalski, Kamil  * type than the property can accept."
574f4c4dcf4SKowalski, Kamil  *
575f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
576f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
577f4c4dcf4SKowalski, Kamil  *
578f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueTypeError formatted to JSON */
5791668ce6dSEd Tanous nlohmann::json propertyValueTypeError(std::string_view arg1,
5801668ce6dSEd Tanous                                       std::string_view arg2);
581b5c07418SJames Feist 
5821668ce6dSEd Tanous void propertyValueTypeError(crow::Response& res, std::string_view arg1,
5831668ce6dSEd Tanous                             std::string_view arg2);
584f4c4dcf4SKowalski, Kamil 
585f4c4dcf4SKowalski, Kamil /**
586f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceNotFound message into JSON
58766ac2b8cSJason M. Bills  * Message body: "The requested resource of type <arg1> named <arg2> was not
588f4c4dcf4SKowalski, Kamil  * found."
589f4c4dcf4SKowalski, Kamil  *
590f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
591f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
592f4c4dcf4SKowalski, Kamil  *
593f4c4dcf4SKowalski, Kamil  * @returns Message ResourceNotFound formatted to JSON */
5941668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2);
595b5c07418SJames Feist 
5961668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1,
5971668ce6dSEd Tanous                       std::string_view arg2);
598f4c4dcf4SKowalski, Kamil 
599f4c4dcf4SKowalski, Kamil /**
600f4c4dcf4SKowalski, Kamil  * @brief Formats CouldNotEstablishConnection message into JSON
60155c7b7a2SEd Tanous  * Message body: "The service failed to establish a Connection with the URI
60266ac2b8cSJason M. Bills  * <arg1>."
603f4c4dcf4SKowalski, Kamil  *
604f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
605f4c4dcf4SKowalski, Kamil  *
606f4c4dcf4SKowalski, Kamil  * @returns Message CouldNotEstablishConnection formatted to JSON */
607ace85d60SEd Tanous nlohmann::json couldNotEstablishConnection(const boost::urls::url_view& arg1);
608b5c07418SJames Feist 
609ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res,
610ace85d60SEd Tanous                                  const boost::urls::url_view& arg1);
611f4c4dcf4SKowalski, Kamil 
612f4c4dcf4SKowalski, Kamil /**
613f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyNotWritable message into JSON
61466ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a read only property and cannot be
615f4c4dcf4SKowalski, Kamil  * assigned a value."
616f4c4dcf4SKowalski, Kamil  *
617f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
618f4c4dcf4SKowalski, Kamil  *
619f4c4dcf4SKowalski, Kamil  * @returns Message PropertyNotWritable formatted to JSON */
6201668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1);
621b5c07418SJames Feist 
6221668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1);
623f12894f8SJason M. Bills 
624f12894f8SJason M. Bills /**
625f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueTypeError message into JSON
62666ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is of a
627f4c4dcf4SKowalski, Kamil  * different type than the parameter can accept."
628f4c4dcf4SKowalski, Kamil  *
629f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
630f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
631f4c4dcf4SKowalski, Kamil  *
632f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueTypeError formatted to JSON */
6331668ce6dSEd Tanous nlohmann::json queryParameterValueTypeError(std::string_view arg1,
6341668ce6dSEd Tanous                                             std::string_view arg2);
635b5c07418SJames Feist 
6361668ce6dSEd Tanous void queryParameterValueTypeError(crow::Response& res, std::string_view arg1,
6371668ce6dSEd Tanous                                   std::string_view arg2);
638f4c4dcf4SKowalski, Kamil 
639f4c4dcf4SKowalski, Kamil /**
640f4c4dcf4SKowalski, Kamil  * @brief Formats ServiceShuttingDown message into JSON
641f4c4dcf4SKowalski, Kamil  * Message body: "The operation failed because the service is shutting down and
642f4c4dcf4SKowalski, Kamil  * can no longer take incoming requests."
643f4c4dcf4SKowalski, Kamil  *
644f4c4dcf4SKowalski, Kamil  *
645f4c4dcf4SKowalski, Kamil  * @returns Message ServiceShuttingDown formatted to JSON */
64665176d39SEd Tanous nlohmann::json serviceShuttingDown();
647b5c07418SJames Feist 
648f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res);
649f4c4dcf4SKowalski, Kamil 
650f4c4dcf4SKowalski, Kamil /**
651f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterDuplicate message into JSON
65266ac2b8cSJason M. Bills  * Message body: "The action <arg1> was submitted with more than one value for
65366ac2b8cSJason M. Bills  * the parameter <arg2>."
654f4c4dcf4SKowalski, Kamil  *
655f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
656f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
657f4c4dcf4SKowalski, Kamil  *
658f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterDuplicate formatted to JSON */
6591668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1,
6601668ce6dSEd Tanous                                         std::string_view arg2);
661b5c07418SJames Feist 
6621668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1,
6631668ce6dSEd Tanous                               std::string_view arg2);
664f4c4dcf4SKowalski, Kamil 
665f4c4dcf4SKowalski, Kamil /**
666f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterNotSupported message into JSON
66766ac2b8cSJason M. Bills  * Message body: "The parameter <arg1> for the action <arg2> is not supported on
668f4c4dcf4SKowalski, Kamil  * the target resource."
669f4c4dcf4SKowalski, Kamil  *
670f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
671f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
672f4c4dcf4SKowalski, Kamil  *
673f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterNotSupported formatted to JSON */
6741668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1,
6751668ce6dSEd Tanous                                            std::string_view arg2);
676b5c07418SJames Feist 
6771668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1,
6781668ce6dSEd Tanous                                  std::string_view arg2);
679f4c4dcf4SKowalski, Kamil 
680f4c4dcf4SKowalski, Kamil /**
681f4c4dcf4SKowalski, Kamil  * @brief Formats SourceDoesNotSupportProtocol message into JSON
68266ac2b8cSJason M. Bills  * Message body: "The other end of the Connection at <arg1> does not support the
68366ac2b8cSJason M. Bills  * specified protocol <arg2>."
684f4c4dcf4SKowalski, Kamil  *
685f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
686f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
687f4c4dcf4SKowalski, Kamil  *
688f4c4dcf4SKowalski, Kamil  * @returns Message SourceDoesNotSupportProtocol formatted to JSON */
689ace85d60SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(const boost::urls::url_view& arg1,
6901668ce6dSEd Tanous                                             std::string_view arg2);
691b5c07418SJames Feist 
692ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res,
693ace85d60SEd Tanous                                   const boost::urls::url_view& arg1,
6941668ce6dSEd Tanous                                   std::string_view arg2);
695f4c4dcf4SKowalski, Kamil 
696f4c4dcf4SKowalski, Kamil /**
697b4ad4c05SShantappa Teekappanavar  * @brief Formats StrictAccountTypes message into JSON
698b4ad4c05SShantappa Teekappanavar  * Message body: Indicates the request failed because a set of `AccountTypes` or
699b4ad4c05SShantappa Teekappanavar  * `OEMAccountTypes` was not accepted while `StrictAccountTypes` is set to `true
700b4ad4c05SShantappa Teekappanavar  * @param[in] arg1 Parameter of message that will replace %1 in its body.
701b4ad4c05SShantappa Teekappanavar  *
702b4ad4c05SShantappa Teekappanavar  * @returns Message StrictAccountTypes formatted to JSON */
703b4ad4c05SShantappa Teekappanavar nlohmann::json strictAccountTypes(std::string_view arg1);
704b4ad4c05SShantappa Teekappanavar 
705b4ad4c05SShantappa Teekappanavar void strictAccountTypes(crow::Response& res, std::string_view arg1);
706b4ad4c05SShantappa Teekappanavar 
707b4ad4c05SShantappa Teekappanavar /**
708f4c4dcf4SKowalski, Kamil  * @brief Formats AccountRemoved message into JSON
709f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully removed."
710f4c4dcf4SKowalski, Kamil  *
711f4c4dcf4SKowalski, Kamil  *
712f4c4dcf4SKowalski, Kamil  * @returns Message AccountRemoved formatted to JSON */
71365176d39SEd Tanous nlohmann::json accountRemoved();
714b5c07418SJames Feist 
715f12894f8SJason M. Bills void accountRemoved(crow::Response& res);
716f4c4dcf4SKowalski, Kamil 
717f4c4dcf4SKowalski, Kamil /**
718f4c4dcf4SKowalski, Kamil  * @brief Formats AccessDenied message into JSON
71966ac2b8cSJason M. Bills  * Message body: "While attempting to establish a Connection to <arg1>, the
720f4c4dcf4SKowalski, Kamil  * service denied access."
721f4c4dcf4SKowalski, Kamil  *
722f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
723f4c4dcf4SKowalski, Kamil  *
724f4c4dcf4SKowalski, Kamil  * @returns Message AccessDenied formatted to JSON */
725f7725d79SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view& arg1);
726b5c07418SJames Feist 
727f7725d79SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view& arg1);
728f4c4dcf4SKowalski, Kamil 
729f4c4dcf4SKowalski, Kamil /**
730f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupported message into JSON
731f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported by the implementation."
732f4c4dcf4SKowalski, Kamil  *
733f4c4dcf4SKowalski, Kamil  *
734f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupported formatted to JSON */
73565176d39SEd Tanous nlohmann::json queryNotSupported();
736b5c07418SJames Feist 
737f12894f8SJason M. Bills void queryNotSupported(crow::Response& res);
738f4c4dcf4SKowalski, Kamil 
739f4c4dcf4SKowalski, Kamil /**
740f4c4dcf4SKowalski, Kamil  * @brief Formats CreateLimitReachedForResource message into JSON
741f4c4dcf4SKowalski, Kamil  * Message body: "The create operation failed because the resource has reached
742f4c4dcf4SKowalski, Kamil  * the limit of possible resources."
743f4c4dcf4SKowalski, Kamil  *
744f4c4dcf4SKowalski, Kamil  *
745f4c4dcf4SKowalski, Kamil  * @returns Message CreateLimitReachedForResource formatted to JSON */
74665176d39SEd Tanous nlohmann::json createLimitReachedForResource();
747b5c07418SJames Feist 
748f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res);
749f4c4dcf4SKowalski, Kamil 
750f4c4dcf4SKowalski, Kamil /**
751f4c4dcf4SKowalski, Kamil  * @brief Formats GeneralError message into JSON
752f4c4dcf4SKowalski, Kamil  * Message body: "A general error has occurred. See ExtendedInfo for more
753f4c4dcf4SKowalski, Kamil  * information."
754f4c4dcf4SKowalski, Kamil  *
755f4c4dcf4SKowalski, Kamil  *
756f4c4dcf4SKowalski, Kamil  * @returns Message GeneralError formatted to JSON */
75765176d39SEd Tanous nlohmann::json generalError();
758b5c07418SJames Feist 
759f12894f8SJason M. Bills void generalError(crow::Response& res);
760f4c4dcf4SKowalski, Kamil 
761f4c4dcf4SKowalski, Kamil /**
762f4c4dcf4SKowalski, Kamil  * @brief Formats Success message into JSON
763f4c4dcf4SKowalski, Kamil  * Message body: "Successfully Completed Request"
764f4c4dcf4SKowalski, Kamil  *
765f4c4dcf4SKowalski, Kamil  *
766f4c4dcf4SKowalski, Kamil  * @returns Message Success formatted to JSON */
76765176d39SEd Tanous nlohmann::json success();
768b5c07418SJames Feist 
769f12894f8SJason M. Bills void success(crow::Response& res);
770f12894f8SJason M. Bills 
771f12894f8SJason M. Bills /**
772f4c4dcf4SKowalski, Kamil  * @brief Formats Created message into JSON
773f4c4dcf4SKowalski, Kamil  * Message body: "The resource has been created successfully"
774f4c4dcf4SKowalski, Kamil  *
775f4c4dcf4SKowalski, Kamil  *
776f4c4dcf4SKowalski, Kamil  * @returns Message Created formatted to JSON */
77765176d39SEd Tanous nlohmann::json created();
778b5c07418SJames Feist 
779f12894f8SJason M. Bills void created(crow::Response& res);
780f4c4dcf4SKowalski, Kamil 
781f4c4dcf4SKowalski, Kamil /**
782cc9139ecSJason M. Bills  * @brief Formats NoOperation message into JSON
783cc9139ecSJason M. Bills  * Message body: "The request body submitted contain no data to act upon and
784cc9139ecSJason M. Bills  * no changes to the resource took place."
785cc9139ecSJason M. Bills  *
786cc9139ecSJason M. Bills  *
787cc9139ecSJason M. Bills  * @returns Message NoOperation formatted to JSON */
78865176d39SEd Tanous nlohmann::json noOperation();
789b5c07418SJames Feist 
790cc9139ecSJason M. Bills void noOperation(crow::Response& res);
791cc9139ecSJason M. Bills 
792cc9139ecSJason M. Bills /**
793f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyUnknown message into JSON
79466ac2b8cSJason M. Bills  * Message body: "The property <arg1> is not in the list of valid properties for
795f4c4dcf4SKowalski, Kamil  * the resource."
796f4c4dcf4SKowalski, Kamil  *
797f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
798f4c4dcf4SKowalski, Kamil  *
799f4c4dcf4SKowalski, Kamil  * @returns Message PropertyUnknown formatted to JSON */
8001668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1);
801b5c07418SJames Feist 
8021668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1);
803f12894f8SJason M. Bills 
804f12894f8SJason M. Bills /**
805f4c4dcf4SKowalski, Kamil  * @brief Formats NoValidSession message into JSON
806f4c4dcf4SKowalski, Kamil  * Message body: "There is no valid session established with the
807f4c4dcf4SKowalski, Kamil  * implementation."
808f4c4dcf4SKowalski, Kamil  *
809f4c4dcf4SKowalski, Kamil  *
810f4c4dcf4SKowalski, Kamil  * @returns Message NoValidSession formatted to JSON */
81165176d39SEd Tanous nlohmann::json noValidSession();
812b5c07418SJames Feist 
813f12894f8SJason M. Bills void noValidSession(crow::Response& res);
814f4c4dcf4SKowalski, Kamil 
815f4c4dcf4SKowalski, Kamil /**
816f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidObject message into JSON
81766ac2b8cSJason M. Bills  * Message body: "The object at <arg1> is invalid."
818f4c4dcf4SKowalski, Kamil  *
819f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
820f4c4dcf4SKowalski, Kamil  *
821f4c4dcf4SKowalski, Kamil  * @returns Message InvalidObject formatted to JSON */
822ace85d60SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view& arg1);
823b5c07418SJames Feist 
824ace85d60SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view& arg1);
825f4c4dcf4SKowalski, Kamil 
826f4c4dcf4SKowalski, Kamil /**
827f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceInStandby message into JSON
828f4c4dcf4SKowalski, Kamil  * Message body: "The request could not be performed because the resource is in
829f4c4dcf4SKowalski, Kamil  * standby."
830f4c4dcf4SKowalski, Kamil  *
831f4c4dcf4SKowalski, Kamil  *
832f4c4dcf4SKowalski, Kamil  * @returns Message ResourceInStandby formatted to JSON */
83365176d39SEd Tanous nlohmann::json resourceInStandby();
834b5c07418SJames Feist 
835f12894f8SJason M. Bills void resourceInStandby(crow::Response& res);
836f4c4dcf4SKowalski, Kamil 
837f4c4dcf4SKowalski, Kamil /**
838f4c4dcf4SKowalski, Kamil  * @brief Formats ActionParameterValueTypeError message into JSON
83966ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3>
840f4c4dcf4SKowalski, Kamil  * is of a different type than the parameter can accept."
841f4c4dcf4SKowalski, Kamil  *
842f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
843f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
844f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
845f4c4dcf4SKowalski, Kamil  *
846f4c4dcf4SKowalski, Kamil  * @returns Message ActionParameterValueTypeError formatted to JSON */
8471668ce6dSEd Tanous nlohmann::json actionParameterValueTypeError(std::string_view arg1,
8481668ce6dSEd Tanous                                              std::string_view arg2,
8491668ce6dSEd Tanous                                              std::string_view arg3);
850b5c07418SJames Feist 
8511668ce6dSEd Tanous void actionParameterValueTypeError(crow::Response& res, std::string_view arg1,
8521668ce6dSEd Tanous                                    std::string_view arg2,
8531668ce6dSEd Tanous                                    std::string_view arg3);
854f4c4dcf4SKowalski, Kamil 
855f4c4dcf4SKowalski, Kamil /**
856f4c4dcf4SKowalski, Kamil  * @brief Formats SessionLimitExceeded message into JSON
857f4c4dcf4SKowalski, Kamil  * Message body: "The session establishment failed due to the number of
858f4c4dcf4SKowalski, Kamil  * simultaneous sessions exceeding the limit of the implementation."
859f4c4dcf4SKowalski, Kamil  *
860f4c4dcf4SKowalski, Kamil  *
861f4c4dcf4SKowalski, Kamil  * @returns Message SessionLimitExceeded formatted to JSON */
86265176d39SEd Tanous nlohmann::json sessionLimitExceeded();
863b5c07418SJames Feist 
864f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res);
865f4c4dcf4SKowalski, Kamil 
866f4c4dcf4SKowalski, Kamil /**
867f4c4dcf4SKowalski, Kamil  * @brief Formats ActionNotSupported message into JSON
86866ac2b8cSJason M. Bills  * Message body: "The action <arg1> is not supported by the resource."
869f4c4dcf4SKowalski, Kamil  *
870f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
871f4c4dcf4SKowalski, Kamil  *
872f4c4dcf4SKowalski, Kamil  * @returns Message ActionNotSupported formatted to JSON */
8731668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1);
874b5c07418SJames Feist 
8751668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1);
876f4c4dcf4SKowalski, Kamil 
877f4c4dcf4SKowalski, Kamil /**
878f4c4dcf4SKowalski, Kamil  * @brief Formats InvalidIndex message into JSON
87966ac2b8cSJason M. Bills  * Message body: "The index <arg1> is not a valid offset into the array."
880f4c4dcf4SKowalski, Kamil  *
881f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
882f4c4dcf4SKowalski, Kamil  *
883f4c4dcf4SKowalski, Kamil  * @returns Message InvalidIndex formatted to JSON */
8845187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1);
885b5c07418SJames Feist 
8865187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1);
887f4c4dcf4SKowalski, Kamil 
888f4c4dcf4SKowalski, Kamil /**
889f4c4dcf4SKowalski, Kamil  * @brief Formats EmptyJSON message into JSON
890f4c4dcf4SKowalski, Kamil  * Message body: "The request body submitted contained an empty JSON object and
891f4c4dcf4SKowalski, Kamil  * the service is unable to process it."
892f4c4dcf4SKowalski, Kamil  *
893f4c4dcf4SKowalski, Kamil  *
894f4c4dcf4SKowalski, Kamil  * @returns Message EmptyJSON formatted to JSON */
89565176d39SEd Tanous nlohmann::json emptyJSON();
896b5c07418SJames Feist 
897f12894f8SJason M. Bills void emptyJSON(crow::Response& res);
898f4c4dcf4SKowalski, Kamil 
899f4c4dcf4SKowalski, Kamil /**
900f4c4dcf4SKowalski, Kamil  * @brief Formats QueryNotSupportedOnResource message into JSON
901f4c4dcf4SKowalski, Kamil  * Message body: "Querying is not supported on the requested resource."
902f4c4dcf4SKowalski, Kamil  *
903f4c4dcf4SKowalski, Kamil  *
904f4c4dcf4SKowalski, Kamil  * @returns Message QueryNotSupportedOnResource formatted to JSON */
90565176d39SEd Tanous nlohmann::json queryNotSupportedOnResource();
906b5c07418SJames Feist 
907f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res);
908f4c4dcf4SKowalski, Kamil 
909f4c4dcf4SKowalski, Kamil /**
910684bb4b8SJason M. Bills  * @brief Formats QueryNotSupportedOnOperation message into JSON
911684bb4b8SJason M. Bills  * Message body: "Querying is not supported with the requested operation."
912684bb4b8SJason M. Bills  *
913684bb4b8SJason M. Bills  *
914684bb4b8SJason M. Bills  * @returns Message QueryNotSupportedOnOperation formatted to JSON */
91565176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation();
916684bb4b8SJason M. Bills 
917684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res);
918684bb4b8SJason M. Bills 
919684bb4b8SJason M. Bills /**
920684bb4b8SJason M. Bills  * @brief Formats QueryCombinationInvalid message into JSON
921684bb4b8SJason M. Bills  * Message body: "Two or more query parameters in the request cannot be used
922684bb4b8SJason M. Bills  * together."
923684bb4b8SJason M. Bills  *
924684bb4b8SJason M. Bills  *
925684bb4b8SJason M. Bills  * @returns Message QueryCombinationInvalid formatted to JSON */
92665176d39SEd Tanous nlohmann::json queryCombinationInvalid();
927684bb4b8SJason M. Bills 
928684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res);
929684bb4b8SJason M. Bills 
930684bb4b8SJason M. Bills /**
931f4c4dcf4SKowalski, Kamil  * @brief Formats InsufficientPrivilege message into JSON
932f4c4dcf4SKowalski, Kamil  * Message body: "There are insufficient privileges for the account or
933f4c4dcf4SKowalski, Kamil  * credentials associated with the current session to perform the requested
934f4c4dcf4SKowalski, Kamil  * operation."
935f4c4dcf4SKowalski, Kamil  *
936f4c4dcf4SKowalski, Kamil  *
937f4c4dcf4SKowalski, Kamil  * @returns Message InsufficientPrivilege formatted to JSON */
93865176d39SEd Tanous nlohmann::json insufficientPrivilege();
939b5c07418SJames Feist 
940f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res);
941f4c4dcf4SKowalski, Kamil 
942f4c4dcf4SKowalski, Kamil /**
943f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyValueModified message into JSON
94466ac2b8cSJason M. Bills  * Message body: "The property <arg1> was assigned the value <arg2> due to
945f4c4dcf4SKowalski, Kamil  * modification by the service."
946f4c4dcf4SKowalski, Kamil  *
947f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
948f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
949f4c4dcf4SKowalski, Kamil  *
950f4c4dcf4SKowalski, Kamil  * @returns Message PropertyValueModified formatted to JSON */
9511668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1,
9521668ce6dSEd Tanous                                      std::string_view arg2);
953b5c07418SJames Feist 
9541668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1,
9551668ce6dSEd Tanous                            std::string_view arg2);
956f4c4dcf4SKowalski, Kamil 
957f4c4dcf4SKowalski, Kamil /**
958f4c4dcf4SKowalski, Kamil  * @brief Formats AccountNotModified message into JSON
959f4c4dcf4SKowalski, Kamil  * Message body: "The account modification request failed."
960f4c4dcf4SKowalski, Kamil  *
961f4c4dcf4SKowalski, Kamil  *
962f4c4dcf4SKowalski, Kamil  * @returns Message AccountNotModified formatted to JSON */
96365176d39SEd Tanous nlohmann::json accountNotModified();
964b5c07418SJames Feist 
965f12894f8SJason M. Bills void accountNotModified(crow::Response& res);
966f4c4dcf4SKowalski, Kamil 
967f4c4dcf4SKowalski, Kamil /**
968f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterValueFormatError message into JSON
96966ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the parameter <arg2> is of a different
970f4c4dcf4SKowalski, Kamil  * format than the parameter can accept."
971f4c4dcf4SKowalski, Kamil  *
972f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
973f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
974f4c4dcf4SKowalski, Kamil  *
975f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterValueFormatError formatted to JSON */
976b5c07418SJames Feist 
9771668ce6dSEd Tanous nlohmann::json queryParameterValueFormatError(std::string_view arg1,
9781668ce6dSEd Tanous                                               std::string_view arg2);
979b5c07418SJames Feist 
9801668ce6dSEd Tanous void queryParameterValueFormatError(crow::Response& res, std::string_view arg1,
9811668ce6dSEd Tanous                                     std::string_view arg2);
982f4c4dcf4SKowalski, Kamil 
983f4c4dcf4SKowalski, Kamil /**
984f4c4dcf4SKowalski, Kamil  * @brief Formats PropertyMissing message into JSON
98566ac2b8cSJason M. Bills  * Message body: "The property <arg1> is a required property and must be
986f4c4dcf4SKowalski, Kamil  * included in the request."
987f4c4dcf4SKowalski, Kamil  *
988f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
989f4c4dcf4SKowalski, Kamil  *
990f4c4dcf4SKowalski, Kamil  * @returns Message PropertyMissing formatted to JSON */
9911668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1);
992b5c07418SJames Feist 
9931668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1);
994f12894f8SJason M. Bills 
995f12894f8SJason M. Bills /**
996f4c4dcf4SKowalski, Kamil  * @brief Formats ResourceExhaustion message into JSON
99766ac2b8cSJason M. Bills  * Message body: "The resource <arg1> was unable to satisfy the request due to
998f4c4dcf4SKowalski, Kamil  * unavailability of resources."
999f4c4dcf4SKowalski, Kamil  *
1000f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1001f4c4dcf4SKowalski, Kamil  *
1002f4c4dcf4SKowalski, Kamil  * @returns Message ResourceExhaustion formatted to JSON */
10031668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1);
1004b5c07418SJames Feist 
10051668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1);
1006f4c4dcf4SKowalski, Kamil 
1007f4c4dcf4SKowalski, Kamil /**
1008f4c4dcf4SKowalski, Kamil  * @brief Formats AccountModified message into JSON
1009f4c4dcf4SKowalski, Kamil  * Message body: "The account was successfully modified."
1010f4c4dcf4SKowalski, Kamil  *
1011f4c4dcf4SKowalski, Kamil  *
1012f4c4dcf4SKowalski, Kamil  * @returns Message AccountModified formatted to JSON */
101365176d39SEd Tanous nlohmann::json accountModified();
1014b5c07418SJames Feist 
1015a08b46ccSJason M. Bills void accountModified(crow::Response& res);
1016f4c4dcf4SKowalski, Kamil 
1017f4c4dcf4SKowalski, Kamil /**
1018f4c4dcf4SKowalski, Kamil  * @brief Formats QueryParameterOutOfRange message into JSON
101966ac2b8cSJason M. Bills  * Message body: "The value <arg1> for the query parameter <arg2> is out of
102066ac2b8cSJason M. Bills  * range <arg3>."
1021f4c4dcf4SKowalski, Kamil  *
1022f4c4dcf4SKowalski, Kamil  * @param[in] arg1 Parameter of message that will replace %1 in its body.
1023f4c4dcf4SKowalski, Kamil  * @param[in] arg2 Parameter of message that will replace %2 in its body.
1024f4c4dcf4SKowalski, Kamil  * @param[in] arg3 Parameter of message that will replace %3 in its body.
1025f4c4dcf4SKowalski, Kamil  *
1026f4c4dcf4SKowalski, Kamil  * @returns Message QueryParameterOutOfRange formatted to JSON */
10271668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1,
10281668ce6dSEd Tanous                                         std::string_view arg2,
10291668ce6dSEd Tanous                                         std::string_view arg3);
1030b5c07418SJames Feist 
10311668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1,
10321668ce6dSEd Tanous                               std::string_view arg2, std::string_view arg3);
1033f4c4dcf4SKowalski, Kamil 
10343bf4e632SJoseph Reynolds /**
10353bf4e632SJoseph Reynolds  * @brief Formats PasswordChangeRequired message into JSON
10363bf4e632SJoseph Reynolds  * Message body: The password provided for this account must be changed
10373bf4e632SJoseph Reynolds  * before access is granted.  PATCH the 'Password' property for this
10383bf4e632SJoseph Reynolds  * account located at the target URI '%1' to complete this process.
10393bf4e632SJoseph Reynolds  *
10403bf4e632SJoseph Reynolds  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10413bf4e632SJoseph Reynolds  *
10423bf4e632SJoseph Reynolds  * @returns Message PasswordChangeRequired formatted to JSON */
1043ace85d60SEd Tanous 
1044ace85d60SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view& arg1);
1045ace85d60SEd Tanous 
1046ace85d60SEd Tanous void passwordChangeRequired(crow::Response& res,
1047ace85d60SEd Tanous                             const boost::urls::url_view& arg1);
10483bf4e632SJoseph Reynolds 
10494cde5d90SJames Feist /**
10504cde5d90SJames Feist  * @brief Formats InvalidUpload message into JSON
10514cde5d90SJames Feist  * Message body: Invalid file uploaded to %1: %2.*
10524cde5d90SJames Feist  * @param[in] arg1 Parameter of message that will replace %1 in its body.
10534cde5d90SJames Feist  * @param[in] arg2 Parameter of message that will replace %2 in its body.
10544cde5d90SJames Feist  *
10554cde5d90SJames Feist  * @returns Message InvalidUpload formatted to JSON */
10561668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2);
10574cde5d90SJames Feist 
10581668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1,
10591668ce6dSEd Tanous                    std::string_view arg2);
10604cde5d90SJames Feist 
1061ae688313SNan Zhou /**
1062ae688313SNan Zhou  * @brief Formats InsufficientStorage message into JSON
1063ae688313SNan Zhou  * Message body: "Insufficent storage or memory available to complete the
1064ae688313SNan Zhou  *  request."
1065ae688313SNan Zhou  * @returns Message InsufficientStorage formatted to JSON */
1066ae688313SNan Zhou nlohmann::json insufficientStorage();
1067ae688313SNan Zhou 
1068ae688313SNan Zhou void insufficientStorage(crow::Response& res);
1069ae688313SNan Zhou 
107044c70412SEd Tanous /**
107144c70412SEd Tanous  * @brief Formats OperationNotAllowed message into JSON
107244c70412SEd Tanous  * Message body: "he HTTP method is not allowed on this resource."
107344c70412SEd Tanous  * @returns Message OperationNotAllowed formatted to JSON */
107444c70412SEd Tanous nlohmann::json operationNotAllowed();
107544c70412SEd Tanous 
107644c70412SEd Tanous void operationNotAllowed(crow::Response& res);
107744c70412SEd Tanous 
1078f4c4dcf4SKowalski, Kamil } // namespace messages
1079f4c4dcf4SKowalski, Kamil 
1080f4c4dcf4SKowalski, Kamil } // namespace redfish
1081