1f4c4dcf4SKowalski, Kamil #pragma once 242079ecbSEd Tanous /**************************************************************** 342079ecbSEd Tanous * READ THIS WARNING FIRST 442079ecbSEd Tanous * This is an auto-generated header which contains definitions 542079ecbSEd Tanous * for Redfish DMTF defined messages. 642079ecbSEd Tanous * DO NOT modify this registry outside of running the 742079ecbSEd Tanous * parse_registries.py script. The definitions contained within 842079ecbSEd Tanous * this file are owned by DMTF. Any modifications to these files 942079ecbSEd Tanous * should be first pushed to the relevant registry in the DMTF 1042079ecbSEd Tanous * github organization. 1142079ecbSEd Tanous ***************************************************************/ 12*4aad6ed2SEd Tanous // These generated headers are a superset of what is needed. 13*4aad6ed2SEd Tanous // clang sees them as an error, so ignore 14*4aad6ed2SEd Tanous // NOLINTBEGIN(misc-include-cleaner) 1504e438cbSEd Tanous #include "http_response.hpp" 16f12894f8SJason M. Bills 174a7fbefdSEd Tanous #include <boost/url/url_view_base.hpp> 181214b7e7SGunnar Mills #include <nlohmann/json.hpp> 191214b7e7SGunnar Mills 20d7857201SEd Tanous #include <cstdint> 21d85418e3SPatrick Williams #include <source_location> 220442ef92SNan Zhou #include <string_view> 23*4aad6ed2SEd Tanous // NOLINTEND(misc-include-cleaner) 249ea15c35SEd Tanous 251abe55efSEd Tanous namespace redfish 261abe55efSEd Tanous { 27f4c4dcf4SKowalski, Kamil 281abe55efSEd Tanous namespace messages 291abe55efSEd Tanous { 303590bd1dSNan Zhou /** 31f8cca876SEd Tanous * @brief Formats Success message into JSON 32f8cca876SEd Tanous * Message body: "The request completed successfully." 33f4c4dcf4SKowalski, Kamil * 34f4c4dcf4SKowalski, Kamil * 35f8cca876SEd Tanous * @returns Message Success formatted to JSON */ 36f8cca876SEd Tanous nlohmann::json success(); 37b5c07418SJames Feist 38f8cca876SEd Tanous void success(crow::Response& res); 39f4c4dcf4SKowalski, Kamil 40f4c4dcf4SKowalski, Kamil /** 41f8cca876SEd Tanous * @brief Formats GeneralError message into JSON 42f8cca876SEd Tanous * Message body: "A general error has occurred. See Resolution for information 43f8cca876SEd Tanous * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not 44f8cca876SEd Tanous * provided." 45f4c4dcf4SKowalski, Kamil * 46f4c4dcf4SKowalski, Kamil * 47f8cca876SEd Tanous * @returns Message GeneralError formatted to JSON */ 48f8cca876SEd Tanous nlohmann::json generalError(); 49b5c07418SJames Feist 50f8cca876SEd Tanous void generalError(crow::Response& res); 51f4c4dcf4SKowalski, Kamil 52f4c4dcf4SKowalski, Kamil /** 53f8cca876SEd Tanous * @brief Formats Created message into JSON 54f8cca876SEd Tanous * Message body: "The resource was created successfully." 55f4c4dcf4SKowalski, Kamil * 56f4c4dcf4SKowalski, Kamil * 57f8cca876SEd Tanous * @returns Message Created formatted to JSON */ 58f8cca876SEd Tanous nlohmann::json created(); 59b5c07418SJames Feist 60f8cca876SEd Tanous void created(crow::Response& res); 61f4c4dcf4SKowalski, Kamil 62f4c4dcf4SKowalski, Kamil /** 63f8cca876SEd Tanous * @brief Formats NoOperation message into JSON 64f8cca876SEd Tanous * Message body: "The request body submitted contain no data to act upon and no 65f8cca876SEd Tanous * changes to the resource took place." 66f4c4dcf4SKowalski, Kamil * 67f4c4dcf4SKowalski, Kamil * 68f8cca876SEd Tanous * @returns Message NoOperation formatted to JSON */ 69f8cca876SEd Tanous nlohmann::json noOperation(); 70b5c07418SJames Feist 71f8cca876SEd Tanous void noOperation(crow::Response& res); 72f4c4dcf4SKowalski, Kamil 73f4c4dcf4SKowalski, Kamil /** 74f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 7566ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 76f4c4dcf4SKowalski, Kamil * 77f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 78f4c4dcf4SKowalski, Kamil * 79f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 801668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1); 81b5c07418SJames Feist 821668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1); 83f4c4dcf4SKowalski, Kamil 84f4c4dcf4SKowalski, Kamil /** 85f8cca876SEd Tanous * @brief Formats PropertyUnknown message into JSON 86f8cca876SEd Tanous * Message body: "The property <arg1> is not in the list of valid properties for 87f8cca876SEd Tanous * the resource." 88f4c4dcf4SKowalski, Kamil * 89f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 90f4c4dcf4SKowalski, Kamil * 91f8cca876SEd Tanous * @returns Message PropertyUnknown formatted to JSON */ 92f8cca876SEd Tanous nlohmann::json propertyUnknown(std::string_view arg1); 93b5c07418SJames Feist 94f8cca876SEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1); 95f4c4dcf4SKowalski, Kamil 96f4c4dcf4SKowalski, Kamil /** 97f8cca876SEd Tanous * @brief Formats PropertyValueTypeError message into JSON 98f8cca876SEd Tanous * Message body: "The value <arg1> for the property <arg2> is not a type that 99f8cca876SEd Tanous * the property can accept." 100f4c4dcf4SKowalski, Kamil * 101f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 102f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 103f4c4dcf4SKowalski, Kamil * 104f8cca876SEd Tanous * @returns Message PropertyValueTypeError formatted to JSON */ 105f8cca876SEd Tanous nlohmann::json propertyValueTypeError(const nlohmann::json& arg1, 106f8cca876SEd Tanous std::string_view arg2); 107b5c07418SJames Feist 108f8cca876SEd Tanous void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1, 109f8cca876SEd Tanous std::string_view arg2); 110f4c4dcf4SKowalski, Kamil 111f4c4dcf4SKowalski, Kamil /** 112f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 11342079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is not a format that 11442079ecbSEd Tanous * the property can accept." 115f4c4dcf4SKowalski, Kamil * 116f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 117f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 118f4c4dcf4SKowalski, Kamil * 119f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 120f818b04dSEd Tanous nlohmann::json propertyValueFormatError(const nlohmann::json& arg1, 1211668ce6dSEd Tanous std::string_view arg2); 122b5c07418SJames Feist 123f818b04dSEd Tanous void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1, 1241668ce6dSEd Tanous std::string_view arg2); 125f4c4dcf4SKowalski, Kamil 126f4c4dcf4SKowalski, Kamil /** 127f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 12866ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 129f4c4dcf4SKowalski, Kamil * acceptable values." 130f4c4dcf4SKowalski, Kamil * 131f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 132f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 133f4c4dcf4SKowalski, Kamil * 134f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 135e2616cc5SEd Tanous nlohmann::json propertyValueNotInList(const nlohmann::json& arg1, 1361668ce6dSEd Tanous std::string_view arg2); 137b5c07418SJames Feist 138e2616cc5SEd Tanous void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1, 1391668ce6dSEd Tanous std::string_view arg2); 14042079ecbSEd Tanous 141f4c4dcf4SKowalski, Kamil /** 142227a2b0aSJiaqing Zhao * @brief Formats PropertyValueOutOfRange message into JSON 14342079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is not in the 14442079ecbSEd Tanous * supported range of acceptable values." 145227a2b0aSJiaqing Zhao * 146227a2b0aSJiaqing Zhao * @param[in] arg1 Parameter of message that will replace %1 in its body. 147227a2b0aSJiaqing Zhao * @param[in] arg2 Parameter of message that will replace %2 in its body. 148227a2b0aSJiaqing Zhao * 14942079ecbSEd Tanous * @returns Message PropertyValueOutOfRange formatted to JSON */ 15095b3ad73SEd Tanous nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1, 151227a2b0aSJiaqing Zhao std::string_view arg2); 152227a2b0aSJiaqing Zhao 15395b3ad73SEd Tanous void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1, 154227a2b0aSJiaqing Zhao std::string_view arg2); 155227a2b0aSJiaqing Zhao 156227a2b0aSJiaqing Zhao /** 157f8cca876SEd Tanous * @brief Formats PropertyValueError message into JSON 158f8cca876SEd Tanous * Message body: "The value provided for the property <arg1> is not valid." 159f4c4dcf4SKowalski, Kamil * 160f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 161f4c4dcf4SKowalski, Kamil * 162f8cca876SEd Tanous * @returns Message PropertyValueError formatted to JSON */ 163f8cca876SEd Tanous nlohmann::json propertyValueError(std::string_view arg1); 164b5c07418SJames Feist 165f8cca876SEd Tanous void propertyValueError(crow::Response& res, std::string_view arg1); 166f4c4dcf4SKowalski, Kamil 167f4c4dcf4SKowalski, Kamil /** 168f8cca876SEd Tanous * @brief Formats PropertyNotWritable message into JSON 169f8cca876SEd Tanous * Message body: "The property <arg1> is a read-only property and cannot be 170f8cca876SEd Tanous * assigned a value." 17181856681SAsmitha Karunanithi * 17281856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 17381856681SAsmitha Karunanithi * 174f8cca876SEd Tanous * @returns Message PropertyNotWritable formatted to JSON */ 175f8cca876SEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1); 17681856681SAsmitha Karunanithi 177f8cca876SEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1); 17881856681SAsmitha Karunanithi 17981856681SAsmitha Karunanithi /** 180f8cca876SEd Tanous * @brief Formats PropertyNotUpdated message into JSON 181f8cca876SEd Tanous * Message body: "The property <arg1> was not updated due to an internal service 182f8cca876SEd Tanous * error. The service is still operational." 183f4c4dcf4SKowalski, Kamil * 184f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 185f4c4dcf4SKowalski, Kamil * 186f8cca876SEd Tanous * @returns Message PropertyNotUpdated formatted to JSON */ 187f8cca876SEd Tanous nlohmann::json propertyNotUpdated(std::string_view arg1); 188b5c07418SJames Feist 189f8cca876SEd Tanous void propertyNotUpdated(crow::Response& res, std::string_view arg1); 190f4c4dcf4SKowalski, Kamil 191f4c4dcf4SKowalski, Kamil /** 192f8cca876SEd Tanous * @brief Formats PropertyMissing message into JSON 193f8cca876SEd Tanous * Message body: "The property <arg1> is a required property and must be 194f8cca876SEd Tanous * included in the request." 195f4c4dcf4SKowalski, Kamil * 196f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 197f4c4dcf4SKowalski, Kamil * 198f8cca876SEd Tanous * @returns Message PropertyMissing formatted to JSON */ 199f8cca876SEd Tanous nlohmann::json propertyMissing(std::string_view arg1); 200b5c07418SJames Feist 201f8cca876SEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1); 202f8cca876SEd Tanous 203f8cca876SEd Tanous /** 204f8cca876SEd Tanous * @brief Formats MalformedJSON message into JSON 205f8cca876SEd Tanous * Message body: "The request body submitted was malformed JSON and could not be 206f8cca876SEd Tanous * parsed by the receiving service." 207f8cca876SEd Tanous * 208f8cca876SEd Tanous * 209f8cca876SEd Tanous * @returns Message MalformedJSON formatted to JSON */ 210f8cca876SEd Tanous nlohmann::json malformedJSON(); 211f8cca876SEd Tanous 212f8cca876SEd Tanous void malformedJSON(crow::Response& res); 213f8cca876SEd Tanous 214f8cca876SEd Tanous /** 215f8cca876SEd Tanous * @brief Formats InvalidJSON message into JSON 216f8cca876SEd Tanous * Message body: "The request body submitted is invalid JSON starting at line 217f8cca876SEd Tanous * <arg1> and could not be parsed by the receiving service." 218f8cca876SEd Tanous * 219f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 220f8cca876SEd Tanous * 221f8cca876SEd Tanous * @returns Message InvalidJSON formatted to JSON */ 222f8cca876SEd Tanous nlohmann::json invalidJSON(std::string_view arg1); 223f8cca876SEd Tanous 224f8cca876SEd Tanous void invalidJSON(crow::Response& res, std::string_view arg1); 225f8cca876SEd Tanous 226f8cca876SEd Tanous /** 227f8cca876SEd Tanous * @brief Formats EmptyJSON message into JSON 228f8cca876SEd Tanous * Message body: "The request body submitted contained an empty JSON object and 229f8cca876SEd Tanous * the service is unable to process it." 230f8cca876SEd Tanous * 231f8cca876SEd Tanous * 232f8cca876SEd Tanous * @returns Message EmptyJSON formatted to JSON */ 233f8cca876SEd Tanous nlohmann::json emptyJSON(); 234f8cca876SEd Tanous 235f8cca876SEd Tanous void emptyJSON(crow::Response& res); 236f8cca876SEd Tanous 237f8cca876SEd Tanous /** 238f8cca876SEd Tanous * @brief Formats ActionNotSupported message into JSON 239f8cca876SEd Tanous * Message body: "The action <arg1> is not supported by the resource." 240f8cca876SEd Tanous * 241f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 242f8cca876SEd Tanous * 243f8cca876SEd Tanous * @returns Message ActionNotSupported formatted to JSON */ 244f8cca876SEd Tanous nlohmann::json actionNotSupported(std::string_view arg1); 245f8cca876SEd Tanous 246f8cca876SEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1); 247f4c4dcf4SKowalski, Kamil 248f4c4dcf4SKowalski, Kamil /** 249f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 25066ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 251f4c4dcf4SKowalski, Kamil * in the request body." 252f4c4dcf4SKowalski, Kamil * 253f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 254f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 255f4c4dcf4SKowalski, Kamil * 256f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 2571668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1, 2581668ce6dSEd Tanous std::string_view arg2); 259b5c07418SJames Feist 2601668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1, 2611668ce6dSEd Tanous std::string_view arg2); 262f4c4dcf4SKowalski, Kamil 263f4c4dcf4SKowalski, Kamil /** 264f8cca876SEd Tanous * @brief Formats ActionParameterDuplicate message into JSON 265f8cca876SEd Tanous * Message body: "The action <arg1> was submitted with more than one value for 266f8cca876SEd Tanous * the parameter <arg2>." 267f8cca876SEd Tanous * 268f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 269f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 270f8cca876SEd Tanous * 271f8cca876SEd Tanous * @returns Message ActionParameterDuplicate formatted to JSON */ 272f8cca876SEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1, 273f8cca876SEd Tanous std::string_view arg2); 274f8cca876SEd Tanous 275f8cca876SEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1, 276f8cca876SEd Tanous std::string_view arg2); 277f8cca876SEd Tanous 278f8cca876SEd Tanous /** 279f8cca876SEd Tanous * @brief Formats ActionParameterUnknown message into JSON 280f8cca876SEd Tanous * Message body: "The action <arg1> was submitted with the invalid parameter 281f8cca876SEd Tanous * <arg2>." 282f8cca876SEd Tanous * 283f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 284f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 285f8cca876SEd Tanous * 286f8cca876SEd Tanous * @returns Message ActionParameterUnknown formatted to JSON */ 287f8cca876SEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1, 288f8cca876SEd Tanous std::string_view arg2); 289f8cca876SEd Tanous 290f8cca876SEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1, 291f8cca876SEd Tanous std::string_view arg2); 292f8cca876SEd Tanous 293f8cca876SEd Tanous /** 294f8cca876SEd Tanous * @brief Formats ActionParameterValueTypeError message into JSON 295f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 296f8cca876SEd Tanous * is not a type that the parameter can accept." 297f8cca876SEd Tanous * 298f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 299f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 300f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 301f8cca876SEd Tanous * 302f8cca876SEd Tanous * @returns Message ActionParameterValueTypeError formatted to JSON */ 303f8cca876SEd Tanous nlohmann::json actionParameterValueTypeError( 304f8cca876SEd Tanous const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3); 305f8cca876SEd Tanous 306f8cca876SEd Tanous void actionParameterValueTypeError( 307f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2, 308f8cca876SEd Tanous std::string_view arg3); 309f8cca876SEd Tanous 310f8cca876SEd Tanous /** 311f8cca876SEd Tanous * @brief Formats ActionParameterValueFormatError message into JSON 312f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 313f8cca876SEd Tanous * is not a format that the parameter can accept." 314f8cca876SEd Tanous * 315f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 316f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 317f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 318f8cca876SEd Tanous * 319f8cca876SEd Tanous * @returns Message ActionParameterValueFormatError formatted to JSON */ 320f8cca876SEd Tanous nlohmann::json actionParameterValueFormatError( 321f8cca876SEd Tanous const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3); 322f8cca876SEd Tanous 323f8cca876SEd Tanous void actionParameterValueFormatError( 324f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2, 325f8cca876SEd Tanous std::string_view arg3); 326f8cca876SEd Tanous 327f8cca876SEd Tanous /** 328f8cca876SEd Tanous * @brief Formats ActionParameterValueNotInList message into JSON 329f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 330f8cca876SEd Tanous * is not in the list of acceptable values." 331f8cca876SEd Tanous * 332f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 333f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 334f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 335f8cca876SEd Tanous * 336f8cca876SEd Tanous * @returns Message ActionParameterValueNotInList formatted to JSON */ 337f8cca876SEd Tanous nlohmann::json actionParameterValueNotInList( 338f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 339f8cca876SEd Tanous 340f8cca876SEd Tanous void actionParameterValueNotInList(crow::Response& res, std::string_view arg1, 341f8cca876SEd Tanous std::string_view arg2, 342f8cca876SEd Tanous std::string_view arg3); 343f8cca876SEd Tanous 344f8cca876SEd Tanous /** 345f8cca876SEd Tanous * @brief Formats ActionParameterValueOutOfRange message into JSON 346f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 347f8cca876SEd Tanous * is not in the supported range of acceptable values." 348f8cca876SEd Tanous * 349f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 350f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 351f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 352f8cca876SEd Tanous * 353f8cca876SEd Tanous * @returns Message ActionParameterValueOutOfRange formatted to JSON */ 354f8cca876SEd Tanous nlohmann::json actionParameterValueOutOfRange( 355f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 356f8cca876SEd Tanous 357f8cca876SEd Tanous void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1, 358f8cca876SEd Tanous std::string_view arg2, 359f8cca876SEd Tanous std::string_view arg3); 360f8cca876SEd Tanous 361f8cca876SEd Tanous /** 362f8cca876SEd Tanous * @brief Formats ActionParameterValueError message into JSON 363f8cca876SEd Tanous * Message body: "The value for the parameter <arg1> in the action <arg2> is 364f8cca876SEd Tanous * invalid." 365f8cca876SEd Tanous * 366f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 367f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 368f8cca876SEd Tanous * 369f8cca876SEd Tanous * @returns Message ActionParameterValueError formatted to JSON */ 370f8cca876SEd Tanous nlohmann::json actionParameterValueError(const nlohmann::json& arg1, 371f8cca876SEd Tanous std::string_view arg2); 372f8cca876SEd Tanous 373f8cca876SEd Tanous void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1, 374f8cca876SEd Tanous std::string_view arg2); 375f8cca876SEd Tanous 376f8cca876SEd Tanous /** 377f8cca876SEd Tanous * @brief Formats ActionParameterNotSupported message into JSON 378f8cca876SEd Tanous * Message body: "The parameter <arg1> for the action <arg2> is not supported on 379f8cca876SEd Tanous * the target resource." 380f8cca876SEd Tanous * 381f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 382f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 383f8cca876SEd Tanous * 384f8cca876SEd Tanous * @returns Message ActionParameterNotSupported formatted to JSON */ 385f8cca876SEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1, 386f8cca876SEd Tanous std::string_view arg2); 387f8cca876SEd Tanous 388f8cca876SEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1, 389f8cca876SEd Tanous std::string_view arg2); 390f8cca876SEd Tanous 391f8cca876SEd Tanous /** 392f8cca876SEd Tanous * @brief Formats ArraySizeTooLong message into JSON 393f8cca876SEd Tanous * Message body: "The array provided for property <arg1> exceeds the size limit 394f8cca876SEd Tanous * <arg2>." 395f8cca876SEd Tanous * 396f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 397f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 398f8cca876SEd Tanous * 399f8cca876SEd Tanous * @returns Message ArraySizeTooLong formatted to JSON */ 400f8cca876SEd Tanous nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2); 401f8cca876SEd Tanous 402f8cca876SEd Tanous void arraySizeTooLong(crow::Response& res, std::string_view arg1, 403f8cca876SEd Tanous uint64_t arg2); 404f8cca876SEd Tanous 405f8cca876SEd Tanous /** 406f8cca876SEd Tanous * @brief Formats ArraySizeTooShort message into JSON 407f8cca876SEd Tanous * Message body: "The array provided for property <arg1> is under the minimum 408f8cca876SEd Tanous * size limit <arg2>." 409f8cca876SEd Tanous * 410f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 411f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 412f8cca876SEd Tanous * 413f8cca876SEd Tanous * @returns Message ArraySizeTooShort formatted to JSON */ 414f8cca876SEd Tanous nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2); 415f8cca876SEd Tanous 416f8cca876SEd Tanous void arraySizeTooShort(crow::Response& res, std::string_view arg1, 417f8cca876SEd Tanous std::string_view arg2); 418f8cca876SEd Tanous 419f8cca876SEd Tanous /** 420f8cca876SEd Tanous * @brief Formats QueryParameterValueTypeError message into JSON 421f8cca876SEd Tanous * Message body: "The value <arg1> for the query parameter <arg2> is not a type 422f8cca876SEd Tanous * that the parameter can accept." 423f8cca876SEd Tanous * 424f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 425f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 426f8cca876SEd Tanous * 427f8cca876SEd Tanous * @returns Message QueryParameterValueTypeError formatted to JSON */ 428f8cca876SEd Tanous nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1, 429f8cca876SEd Tanous std::string_view arg2); 430f8cca876SEd Tanous 431f8cca876SEd Tanous void queryParameterValueTypeError( 432f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2); 433f8cca876SEd Tanous 434f8cca876SEd Tanous /** 435f8cca876SEd Tanous * @brief Formats QueryParameterValueFormatError message into JSON 436f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> is not a format that 437f8cca876SEd Tanous * the parameter can accept." 438f8cca876SEd Tanous * 439f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 440f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 441f8cca876SEd Tanous * 442f8cca876SEd Tanous * @returns Message QueryParameterValueFormatError formatted to JSON */ 443f8cca876SEd Tanous nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1, 444f8cca876SEd Tanous std::string_view arg2); 445f8cca876SEd Tanous 446f8cca876SEd Tanous void queryParameterValueFormatError( 447f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2); 448f8cca876SEd Tanous 449f8cca876SEd Tanous /** 450f8cca876SEd Tanous * @brief Formats QueryParameterValueError message into JSON 451f8cca876SEd Tanous * Message body: "The value for the parameter <arg1> is invalid." 452f8cca876SEd Tanous * 453f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 454f8cca876SEd Tanous * 455f8cca876SEd Tanous * @returns Message QueryParameterValueError formatted to JSON */ 456f8cca876SEd Tanous nlohmann::json queryParameterValueError(std::string_view arg1); 457f8cca876SEd Tanous 458f8cca876SEd Tanous void queryParameterValueError(crow::Response& res, std::string_view arg1); 459f8cca876SEd Tanous 460f8cca876SEd Tanous /** 461f8cca876SEd Tanous * @brief Formats QueryParameterOutOfRange message into JSON 462f8cca876SEd Tanous * Message body: "The value <arg1> for the query parameter <arg2> is out of 463f8cca876SEd Tanous * range <arg3>." 464f8cca876SEd Tanous * 465f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 466f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 467f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 468f8cca876SEd Tanous * 469f8cca876SEd Tanous * @returns Message QueryParameterOutOfRange formatted to JSON */ 470f8cca876SEd Tanous nlohmann::json queryParameterOutOfRange( 471f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 472f8cca876SEd Tanous 473f8cca876SEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1, 474f8cca876SEd Tanous std::string_view arg2, std::string_view arg3); 475f8cca876SEd Tanous 476f8cca876SEd Tanous /** 477f8cca876SEd Tanous * @brief Formats QueryNotSupportedOnResource message into JSON 478f8cca876SEd Tanous * Message body: "Querying is not supported on the requested resource." 479f8cca876SEd Tanous * 480f8cca876SEd Tanous * 481f8cca876SEd Tanous * @returns Message QueryNotSupportedOnResource formatted to JSON */ 482f8cca876SEd Tanous nlohmann::json queryNotSupportedOnResource(); 483f8cca876SEd Tanous 484f8cca876SEd Tanous void queryNotSupportedOnResource(crow::Response& res); 485f8cca876SEd Tanous 486f8cca876SEd Tanous /** 487f8cca876SEd Tanous * @brief Formats QueryNotSupportedOnOperation message into JSON 488f8cca876SEd Tanous * Message body: "Querying is not supported with the requested operation." 489f8cca876SEd Tanous * 490f8cca876SEd Tanous * 491f8cca876SEd Tanous * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 492f8cca876SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 493f8cca876SEd Tanous 494f8cca876SEd Tanous void queryNotSupportedOnOperation(crow::Response& res); 495f8cca876SEd Tanous 496f8cca876SEd Tanous /** 497f8cca876SEd Tanous * @brief Formats QueryNotSupported message into JSON 498f8cca876SEd Tanous * Message body: "Querying is not supported by the implementation." 499f8cca876SEd Tanous * 500f8cca876SEd Tanous * 501f8cca876SEd Tanous * @returns Message QueryNotSupported formatted to JSON */ 502f8cca876SEd Tanous nlohmann::json queryNotSupported(); 503f8cca876SEd Tanous 504f8cca876SEd Tanous void queryNotSupported(crow::Response& res); 505f8cca876SEd Tanous 506f8cca876SEd Tanous /** 507f8cca876SEd Tanous * @brief Formats QueryCombinationInvalid message into JSON 508f8cca876SEd Tanous * Message body: "Two or more query parameters in the request cannot be used 509f8cca876SEd Tanous * together." 510f8cca876SEd Tanous * 511f8cca876SEd Tanous * 512f8cca876SEd Tanous * @returns Message QueryCombinationInvalid formatted to JSON */ 513f8cca876SEd Tanous nlohmann::json queryCombinationInvalid(); 514f8cca876SEd Tanous 515f8cca876SEd Tanous void queryCombinationInvalid(crow::Response& res); 516f8cca876SEd Tanous 517f8cca876SEd Tanous /** 518f8cca876SEd Tanous * @brief Formats QueryParameterUnsupported message into JSON 519f8cca876SEd Tanous * Message body: "Query parameter <arg1> is not supported." 520f8cca876SEd Tanous * 521f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 522f8cca876SEd Tanous * 523f8cca876SEd Tanous * @returns Message QueryParameterUnsupported formatted to JSON */ 524f8cca876SEd Tanous nlohmann::json queryParameterUnsupported(std::string_view arg1); 525f8cca876SEd Tanous 526f8cca876SEd Tanous void queryParameterUnsupported(crow::Response& res, std::string_view arg1); 527f8cca876SEd Tanous 528f8cca876SEd Tanous /** 529f8cca876SEd Tanous * @brief Formats SessionLimitExceeded message into JSON 530f8cca876SEd Tanous * Message body: "The session establishment failed due to the number of 531f8cca876SEd Tanous * simultaneous sessions exceeding the limit of the implementation." 532f8cca876SEd Tanous * 533f8cca876SEd Tanous * 534f8cca876SEd Tanous * @returns Message SessionLimitExceeded formatted to JSON */ 535f8cca876SEd Tanous nlohmann::json sessionLimitExceeded(); 536f8cca876SEd Tanous 537f8cca876SEd Tanous void sessionLimitExceeded(crow::Response& res); 538f8cca876SEd Tanous 539f8cca876SEd Tanous /** 540f8cca876SEd Tanous * @brief Formats EventSubscriptionLimitExceeded message into JSON 541f8cca876SEd Tanous * Message body: "The event subscription failed due to the number of 542f8cca876SEd Tanous * simultaneous subscriptions exceeding the limit of the implementation." 543f8cca876SEd Tanous * 544f8cca876SEd Tanous * 545f8cca876SEd Tanous * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 546f8cca876SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 547f8cca876SEd Tanous 548f8cca876SEd Tanous void eventSubscriptionLimitExceeded(crow::Response& res); 549f8cca876SEd Tanous 550f8cca876SEd Tanous /** 551f8cca876SEd Tanous * @brief Formats ResourceCannotBeDeleted message into JSON 552f8cca876SEd Tanous * Message body: "The delete request failed because the resource requested 553f8cca876SEd Tanous * cannot be deleted." 554f8cca876SEd Tanous * 555f8cca876SEd Tanous * 556f8cca876SEd Tanous * @returns Message ResourceCannotBeDeleted formatted to JSON */ 557f8cca876SEd Tanous nlohmann::json resourceCannotBeDeleted(); 558f8cca876SEd Tanous 559f8cca876SEd Tanous void resourceCannotBeDeleted(crow::Response& res); 560f8cca876SEd Tanous 561f8cca876SEd Tanous /** 562f8cca876SEd Tanous * @brief Formats ResourceInUse message into JSON 563f8cca876SEd Tanous * Message body: "The change to the requested resource failed because the 564f8cca876SEd Tanous * resource is in use or in transition." 565f8cca876SEd Tanous * 566f8cca876SEd Tanous * 567f8cca876SEd Tanous * @returns Message ResourceInUse formatted to JSON */ 568f8cca876SEd Tanous nlohmann::json resourceInUse(); 569f8cca876SEd Tanous 570f8cca876SEd Tanous void resourceInUse(crow::Response& res); 571f8cca876SEd Tanous 572f8cca876SEd Tanous /** 573f8cca876SEd Tanous * @brief Formats ResourceAlreadyExists message into JSON 574f8cca876SEd Tanous * Message body: "The requested resource of type <arg1> with the property <arg2> 575f8cca876SEd Tanous * with the value <arg3> already exists." 576f8cca876SEd Tanous * 577f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 578f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 579f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 580f8cca876SEd Tanous * 581f8cca876SEd Tanous * @returns Message ResourceAlreadyExists formatted to JSON */ 582f8cca876SEd Tanous nlohmann::json resourceAlreadyExists( 583f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 584f8cca876SEd Tanous 585f8cca876SEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1, 586f8cca876SEd Tanous std::string_view arg2, std::string_view arg3); 587f8cca876SEd Tanous 588f8cca876SEd Tanous /** 589f8cca876SEd Tanous * @brief Formats ResourceNotFound message into JSON 590f8cca876SEd Tanous * Message body: "The requested resource of type <arg1> named <arg2> was not 591f8cca876SEd Tanous * found." 592f8cca876SEd Tanous * 593f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 594f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 595f8cca876SEd Tanous * 596f8cca876SEd Tanous * @returns Message ResourceNotFound formatted to JSON */ 597f8cca876SEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2); 598f8cca876SEd Tanous 599f8cca876SEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1, 600f8cca876SEd Tanous std::string_view arg2); 601f8cca876SEd Tanous 602f8cca876SEd Tanous /** 603f8cca876SEd Tanous * @brief Formats PayloadTooLarge message into JSON 604f8cca876SEd Tanous * Message body: "The supplied payload exceeds the maximum size supported by the 605f8cca876SEd Tanous * service." 606f8cca876SEd Tanous * 607f8cca876SEd Tanous * 608f8cca876SEd Tanous * @returns Message PayloadTooLarge formatted to JSON */ 609f8cca876SEd Tanous nlohmann::json payloadTooLarge(); 610f8cca876SEd Tanous 611f8cca876SEd Tanous void payloadTooLarge(crow::Response& res); 612f8cca876SEd Tanous 613f8cca876SEd Tanous /** 614f8cca876SEd Tanous * @brief Formats InsufficientStorage message into JSON 615f8cca876SEd Tanous * Message body: "Insufficient storage or memory available to complete the 616f8cca876SEd Tanous * request." 617f8cca876SEd Tanous * 618f8cca876SEd Tanous * 619f8cca876SEd Tanous * @returns Message InsufficientStorage formatted to JSON */ 620f8cca876SEd Tanous nlohmann::json insufficientStorage(); 621f8cca876SEd Tanous 622f8cca876SEd Tanous void insufficientStorage(crow::Response& res); 623f8cca876SEd Tanous 624f8cca876SEd Tanous /** 625f8cca876SEd Tanous * @brief Formats MissingOrMalformedPart message into JSON 626f8cca876SEd Tanous * Message body: "The multipart request contains malformed parts or is missing 627f8cca876SEd Tanous * required parts." 628f8cca876SEd Tanous * 629f8cca876SEd Tanous * 630f8cca876SEd Tanous * @returns Message MissingOrMalformedPart formatted to JSON */ 631f8cca876SEd Tanous nlohmann::json missingOrMalformedPart(); 632f8cca876SEd Tanous 633f8cca876SEd Tanous void missingOrMalformedPart(crow::Response& res); 634f8cca876SEd Tanous 635f8cca876SEd Tanous /** 636f8cca876SEd Tanous * @brief Formats InvalidURI message into JSON 637f8cca876SEd Tanous * Message body: "The URI <arg1> was not found." 638f8cca876SEd Tanous * 639f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 640f8cca876SEd Tanous * 641f8cca876SEd Tanous * @returns Message InvalidURI formatted to JSON */ 642f8cca876SEd Tanous nlohmann::json invalidURI(std::string_view arg1); 643f8cca876SEd Tanous 644f8cca876SEd Tanous void invalidURI(crow::Response& res, std::string_view arg1); 645f8cca876SEd Tanous 646f8cca876SEd Tanous /** 647f8cca876SEd Tanous * @brief Formats CreateFailedMissingReqProperties message into JSON 648f8cca876SEd Tanous * Message body: "The create operation failed because the required property 649f8cca876SEd Tanous * <arg1> was missing from the request." 650f8cca876SEd Tanous * 651f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 652f8cca876SEd Tanous * 653f8cca876SEd Tanous * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 654f8cca876SEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1); 655f8cca876SEd Tanous 656f8cca876SEd Tanous void createFailedMissingReqProperties(crow::Response& res, 657f8cca876SEd Tanous std::string_view arg1); 658f8cca876SEd Tanous 659f8cca876SEd Tanous /** 660f8cca876SEd Tanous * @brief Formats CreateLimitReachedForResource message into JSON 661f8cca876SEd Tanous * Message body: "The create operation failed because the resource has reached 662f8cca876SEd Tanous * the limit of possible resources." 663f8cca876SEd Tanous * 664f8cca876SEd Tanous * 665f8cca876SEd Tanous * @returns Message CreateLimitReachedForResource formatted to JSON */ 666f8cca876SEd Tanous nlohmann::json createLimitReachedForResource(); 667f8cca876SEd Tanous 668f8cca876SEd Tanous void createLimitReachedForResource(crow::Response& res); 669f8cca876SEd Tanous 670f8cca876SEd Tanous /** 671f8cca876SEd Tanous * @brief Formats ServiceShuttingDown message into JSON 672f8cca876SEd Tanous * Message body: "The operation failed because the service is shutting down and 673f8cca876SEd Tanous * can no longer take incoming requests." 674f8cca876SEd Tanous * 675f8cca876SEd Tanous * 676f8cca876SEd Tanous * @returns Message ServiceShuttingDown formatted to JSON */ 677f8cca876SEd Tanous nlohmann::json serviceShuttingDown(); 678f8cca876SEd Tanous 679f8cca876SEd Tanous void serviceShuttingDown(crow::Response& res); 680f8cca876SEd Tanous 681f8cca876SEd Tanous /** 682f8cca876SEd Tanous * @brief Formats ServiceInUnknownState message into JSON 683f8cca876SEd Tanous * Message body: "The operation failed because the service is in an unknown 684f8cca876SEd Tanous * state and can no longer take incoming requests." 685f8cca876SEd Tanous * 686f8cca876SEd Tanous * 687f8cca876SEd Tanous * @returns Message ServiceInUnknownState formatted to JSON */ 688f8cca876SEd Tanous nlohmann::json serviceInUnknownState(); 689f8cca876SEd Tanous 690f8cca876SEd Tanous void serviceInUnknownState(crow::Response& res); 691f8cca876SEd Tanous 692f8cca876SEd Tanous /** 693f8cca876SEd Tanous * @brief Formats NoValidSession message into JSON 694f8cca876SEd Tanous * Message body: "There is no valid session established with the 695f8cca876SEd Tanous * implementation." 696f8cca876SEd Tanous * 697f8cca876SEd Tanous * 698f8cca876SEd Tanous * @returns Message NoValidSession formatted to JSON */ 699f8cca876SEd Tanous nlohmann::json noValidSession(); 700f8cca876SEd Tanous 701f8cca876SEd Tanous void noValidSession(crow::Response& res); 702f8cca876SEd Tanous 703f8cca876SEd Tanous /** 704f8cca876SEd Tanous * @brief Formats InsufficientPrivilege message into JSON 705f8cca876SEd Tanous * Message body: "There are insufficient privileges for the account or 706f8cca876SEd Tanous * credentials associated with the current session to perform the requested 707f8cca876SEd Tanous * operation." 708f8cca876SEd Tanous * 709f8cca876SEd Tanous * 710f8cca876SEd Tanous * @returns Message InsufficientPrivilege formatted to JSON */ 711f8cca876SEd Tanous nlohmann::json insufficientPrivilege(); 712f8cca876SEd Tanous 713f8cca876SEd Tanous void insufficientPrivilege(crow::Response& res); 714f8cca876SEd Tanous 715f8cca876SEd Tanous /** 716f8cca876SEd Tanous * @brief Formats AccountModified message into JSON 717f8cca876SEd Tanous * Message body: "The account was successfully modified." 718f8cca876SEd Tanous * 719f8cca876SEd Tanous * 720f8cca876SEd Tanous * @returns Message AccountModified formatted to JSON */ 721f8cca876SEd Tanous nlohmann::json accountModified(); 722f8cca876SEd Tanous 723f8cca876SEd Tanous void accountModified(crow::Response& res); 724f8cca876SEd Tanous 725f8cca876SEd Tanous /** 726f8cca876SEd Tanous * @brief Formats AccountNotModified message into JSON 727f8cca876SEd Tanous * Message body: "The account modification request failed." 728f8cca876SEd Tanous * 729f8cca876SEd Tanous * 730f8cca876SEd Tanous * @returns Message AccountNotModified formatted to JSON */ 731f8cca876SEd Tanous nlohmann::json accountNotModified(); 732f8cca876SEd Tanous 733f8cca876SEd Tanous void accountNotModified(crow::Response& res); 734f8cca876SEd Tanous 735f8cca876SEd Tanous /** 736f8cca876SEd Tanous * @brief Formats AccountRemoved message into JSON 737f8cca876SEd Tanous * Message body: "The account was successfully removed." 738f8cca876SEd Tanous * 739f8cca876SEd Tanous * 740f8cca876SEd Tanous * @returns Message AccountRemoved formatted to JSON */ 741f8cca876SEd Tanous nlohmann::json accountRemoved(); 742f8cca876SEd Tanous 743f8cca876SEd Tanous void accountRemoved(crow::Response& res); 744f8cca876SEd Tanous 745f8cca876SEd Tanous /** 746f8cca876SEd Tanous * @brief Formats AccountForSessionNoLongerExists message into JSON 747f8cca876SEd Tanous * Message body: "The account for the current session was removed, and so the 748f8cca876SEd Tanous * current session was removed as well." 749f8cca876SEd Tanous * 750f8cca876SEd Tanous * 751f8cca876SEd Tanous * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 752f8cca876SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 753f8cca876SEd Tanous 754f8cca876SEd Tanous void accountForSessionNoLongerExists(crow::Response& res); 755f8cca876SEd Tanous 756f8cca876SEd Tanous /** 757f8cca876SEd Tanous * @brief Formats InvalidObject message into JSON 758f8cca876SEd Tanous * Message body: "The object at <arg1> is invalid." 759f8cca876SEd Tanous * 760f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 761f8cca876SEd Tanous * 762f8cca876SEd Tanous * @returns Message InvalidObject formatted to JSON */ 763f8cca876SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view_base& arg1); 764f8cca876SEd Tanous 765f8cca876SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1); 766f8cca876SEd Tanous 767f8cca876SEd Tanous /** 768f8cca876SEd Tanous * @brief Formats InternalError message into JSON 769f8cca876SEd Tanous * Message body: "The request failed due to an internal service error. The 770f8cca876SEd Tanous * service is still operational." 771f8cca876SEd Tanous * 772f8cca876SEd Tanous * 773f8cca876SEd Tanous * @returns Message InternalError formatted to JSON */ 774f8cca876SEd Tanous nlohmann::json internalError(); 775f8cca876SEd Tanous 776f8cca876SEd Tanous void internalError(crow::Response& res, std::source_location location = 777f8cca876SEd Tanous std::source_location::current()); 778f8cca876SEd Tanous 779f8cca876SEd Tanous /** 780f8cca876SEd Tanous * @brief Formats UnrecognizedRequestBody message into JSON 781f8cca876SEd Tanous * Message body: "The service detected a malformed request body that it was 782f8cca876SEd Tanous * unable to interpret." 783f8cca876SEd Tanous * 784f8cca876SEd Tanous * 785f8cca876SEd Tanous * @returns Message UnrecognizedRequestBody formatted to JSON */ 786f8cca876SEd Tanous nlohmann::json unrecognizedRequestBody(); 787f8cca876SEd Tanous 788f8cca876SEd Tanous void unrecognizedRequestBody(crow::Response& res); 789f8cca876SEd Tanous 790f8cca876SEd Tanous /** 791f8cca876SEd Tanous * @brief Formats ResourceMissingAtURI message into JSON 792f8cca876SEd Tanous * Message body: "The resource at the URI <arg1> was not found." 793f8cca876SEd Tanous * 794f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 795f8cca876SEd Tanous * 796f8cca876SEd Tanous * @returns Message ResourceMissingAtURI formatted to JSON */ 797f8cca876SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1); 798f8cca876SEd Tanous 799f8cca876SEd Tanous void resourceMissingAtURI(crow::Response& res, 800f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 801f8cca876SEd Tanous 802f8cca876SEd Tanous /** 803f8cca876SEd Tanous * @brief Formats ResourceAtUriInUnknownFormat message into JSON 804f8cca876SEd Tanous * Message body: "The resource at <arg1> is in a format not recognized by the 805f8cca876SEd Tanous * service." 806f8cca876SEd Tanous * 807f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 808f8cca876SEd Tanous * 809f8cca876SEd Tanous * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 810f8cca876SEd Tanous nlohmann::json 811f8cca876SEd Tanous resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1); 812f8cca876SEd Tanous 813f8cca876SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 814f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 815f8cca876SEd Tanous 816f8cca876SEd Tanous /** 817f8cca876SEd Tanous * @brief Formats ResourceAtUriUnauthorized message into JSON 818f8cca876SEd Tanous * Message body: "While accessing the resource at <arg1>, the service received 819f8cca876SEd Tanous * an authorization error <arg2>." 820f8cca876SEd Tanous * 821f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 822f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 823f8cca876SEd Tanous * 824f8cca876SEd Tanous * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 825f8cca876SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1, 826f8cca876SEd Tanous std::string_view arg2); 827f8cca876SEd Tanous 828f8cca876SEd Tanous void resourceAtUriUnauthorized(crow::Response& res, 829f8cca876SEd Tanous const boost::urls::url_view_base& arg1, 830f8cca876SEd Tanous std::string_view arg2); 831f8cca876SEd Tanous 832f8cca876SEd Tanous /** 833f8cca876SEd Tanous * @brief Formats CouldNotEstablishConnection message into JSON 834f8cca876SEd Tanous * Message body: "The service failed to establish a connection with the URI 835f8cca876SEd Tanous * <arg1>." 836f8cca876SEd Tanous * 837f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 838f8cca876SEd Tanous * 839f8cca876SEd Tanous * @returns Message CouldNotEstablishConnection formatted to JSON */ 840f8cca876SEd Tanous nlohmann::json 841f8cca876SEd Tanous couldNotEstablishConnection(const boost::urls::url_view_base& arg1); 842f8cca876SEd Tanous 843f8cca876SEd Tanous void couldNotEstablishConnection(crow::Response& res, 844f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 845f8cca876SEd Tanous 846f8cca876SEd Tanous /** 847f8cca876SEd Tanous * @brief Formats SourceDoesNotSupportProtocol message into JSON 848f8cca876SEd Tanous * Message body: "The other end of the connection at <arg1> does not support the 849f8cca876SEd Tanous * specified protocol <arg2>." 850f8cca876SEd Tanous * 851f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 852f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 853f8cca876SEd Tanous * 854f8cca876SEd Tanous * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 855f8cca876SEd Tanous nlohmann::json sourceDoesNotSupportProtocol( 856f8cca876SEd Tanous const boost::urls::url_view_base& arg1, std::string_view arg2); 857f8cca876SEd Tanous 858f8cca876SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 859f8cca876SEd Tanous const boost::urls::url_view_base& arg1, 860f8cca876SEd Tanous std::string_view arg2); 861f8cca876SEd Tanous 862f8cca876SEd Tanous /** 863f8cca876SEd Tanous * @brief Formats AccessDenied message into JSON 864f8cca876SEd Tanous * Message body: "While attempting to establish a connection to <arg1>, the 865f8cca876SEd Tanous * service denied access." 866f8cca876SEd Tanous * 867f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 868f8cca876SEd Tanous * 869f8cca876SEd Tanous * @returns Message AccessDenied formatted to JSON */ 870f8cca876SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view_base& arg1); 871f8cca876SEd Tanous 872f8cca876SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1); 873f8cca876SEd Tanous 874f8cca876SEd Tanous /** 875f8cca876SEd Tanous * @brief Formats ServiceTemporarilyUnavailable message into JSON 876f8cca876SEd Tanous * Message body: "The service is temporarily unavailable. Retry in <arg1> 877f8cca876SEd Tanous * seconds." 878f8cca876SEd Tanous * 879f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 880f8cca876SEd Tanous * 881f8cca876SEd Tanous * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 882f8cca876SEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1); 883f8cca876SEd Tanous 884f8cca876SEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1); 885f8cca876SEd Tanous 886f8cca876SEd Tanous /** 887f8cca876SEd Tanous * @brief Formats InvalidIndex message into JSON 888f8cca876SEd Tanous * Message body: "The index <arg1> is not a valid offset into the array." 889f8cca876SEd Tanous * 890f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 891f8cca876SEd Tanous * 892f8cca876SEd Tanous * @returns Message InvalidIndex formatted to JSON */ 893644cdcb8SEd Tanous nlohmann::json invalidIndex(uint64_t arg1); 894f8cca876SEd Tanous 895644cdcb8SEd Tanous void invalidIndex(crow::Response& res, uint64_t arg1); 896f8cca876SEd Tanous 897f8cca876SEd Tanous /** 898f8cca876SEd Tanous * @brief Formats PropertyValueModified message into JSON 899f8cca876SEd Tanous * Message body: "The property <arg1> was assigned the value <arg2> due to 900f8cca876SEd Tanous * modification by the service." 901f8cca876SEd Tanous * 902f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 903f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 904f8cca876SEd Tanous * 905f8cca876SEd Tanous * @returns Message PropertyValueModified formatted to JSON */ 906f8cca876SEd Tanous nlohmann::json propertyValueModified(std::string_view arg1, 907f8cca876SEd Tanous const nlohmann::json& arg2); 908f8cca876SEd Tanous 909f8cca876SEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1, 910f8cca876SEd Tanous const nlohmann::json& arg2); 911f8cca876SEd Tanous 912f8cca876SEd Tanous /** 913f8cca876SEd Tanous * @brief Formats ResourceInStandby message into JSON 914f8cca876SEd Tanous * Message body: "The request could not be performed because the resource is in 915f8cca876SEd Tanous * standby." 916f8cca876SEd Tanous * 917f8cca876SEd Tanous * 918f8cca876SEd Tanous * @returns Message ResourceInStandby formatted to JSON */ 919f8cca876SEd Tanous nlohmann::json resourceInStandby(); 920f8cca876SEd Tanous 921f8cca876SEd Tanous void resourceInStandby(crow::Response& res); 922f8cca876SEd Tanous 923f8cca876SEd Tanous /** 924f8cca876SEd Tanous * @brief Formats ResourceExhaustion message into JSON 925f8cca876SEd Tanous * Message body: "The resource <arg1> was unable to satisfy the request due to 926f8cca876SEd Tanous * unavailability of resources." 927f8cca876SEd Tanous * 928f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 929f8cca876SEd Tanous * 930f8cca876SEd Tanous * @returns Message ResourceExhaustion formatted to JSON */ 931f8cca876SEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1); 932f8cca876SEd Tanous 933f8cca876SEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1); 934f8cca876SEd Tanous 935f8cca876SEd Tanous /** 936f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 93766ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 938f4c4dcf4SKowalski, Kamil * 939f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 940f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 941f4c4dcf4SKowalski, Kamil * 942f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 943644cdcb8SEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, uint64_t arg2); 944b5c07418SJames Feist 945644cdcb8SEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, 946644cdcb8SEd Tanous uint64_t arg2); 947f4c4dcf4SKowalski, Kamil 948f4c4dcf4SKowalski, Kamil /** 949f8cca876SEd Tanous * @brief Formats StringValueTooShort message into JSON 950f8cca876SEd Tanous * Message body: "The string <arg1> was under the minimum required length 951f8cca876SEd Tanous * <arg2>." 952f8cca876SEd Tanous * 953f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 954f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 955f8cca876SEd Tanous * 956f8cca876SEd Tanous * @returns Message StringValueTooShort formatted to JSON */ 957f8cca876SEd Tanous nlohmann::json stringValueTooShort(std::string_view arg1, 958f8cca876SEd Tanous std::string_view arg2); 959f8cca876SEd Tanous 960f8cca876SEd Tanous void stringValueTooShort(crow::Response& res, std::string_view arg1, 961f8cca876SEd Tanous std::string_view arg2); 962f8cca876SEd Tanous 963f8cca876SEd Tanous /** 964cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 965cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 966cc9139ecSJason M. Bills * 967cc9139ecSJason M. Bills * 968cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 96965176d39SEd Tanous nlohmann::json sessionTerminated(); 970b5c07418SJames Feist 971cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 972cc9139ecSJason M. Bills 973cc9139ecSJason M. Bills /** 974684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 97542079ecbSEd Tanous * Message body: "The event subscription was terminated." 976684bb4b8SJason M. Bills * 977684bb4b8SJason M. Bills * 978684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 97965176d39SEd Tanous nlohmann::json subscriptionTerminated(); 980684bb4b8SJason M. Bills 981684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 982684bb4b8SJason M. Bills 983684bb4b8SJason M. Bills /** 984cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 985cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 98642079ecbSEd Tanous * with the @odata.type of the resource, which is <arg2>." 987cc9139ecSJason M. Bills * 988cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 989cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 990cc9139ecSJason M. Bills * 991cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 9921668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1, 9931668ce6dSEd Tanous std::string_view arg2); 994b5c07418SJames Feist 9951668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1, 9961668ce6dSEd Tanous std::string_view arg2); 997cc9139ecSJason M. Bills 998cc9139ecSJason M. Bills /** 999f8cca876SEd Tanous * @brief Formats PasswordChangeRequired message into JSON 1000f8cca876SEd Tanous * Message body: "The password provided for this account must be changed before 1001f8cca876SEd Tanous * access is granted. PATCH the Password property for this account located at 1002f8cca876SEd Tanous * the target URI <arg1> to complete this process." 1003f8cca876SEd Tanous * 1004f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1005f8cca876SEd Tanous * 1006f8cca876SEd Tanous * @returns Message PasswordChangeRequired formatted to JSON */ 1007f8cca876SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1); 1008f8cca876SEd Tanous 1009f8cca876SEd Tanous void passwordChangeRequired(crow::Response& res, 1010f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 1011f8cca876SEd Tanous 1012f8cca876SEd Tanous /** 1013684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 101442079ecbSEd Tanous * Message body: "In order to apply changes, recover from errors, or complete 101542079ecbSEd Tanous * the operation, a component reset is required with the Reset action URI <arg1> 101642079ecbSEd Tanous * and ResetType <arg2>." 1017684bb4b8SJason M. Bills * 1018684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1019684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1020684bb4b8SJason M. Bills * 1021684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 10224a7fbefdSEd Tanous nlohmann::json resetRequired(const boost::urls::url_view_base& arg1, 10234a7fbefdSEd Tanous std::string_view arg2); 1024684bb4b8SJason M. Bills 10254a7fbefdSEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view_base& arg1, 10261668ce6dSEd Tanous std::string_view arg2); 1027684bb4b8SJason M. Bills 1028684bb4b8SJason M. Bills /** 1029f8cca876SEd Tanous * @brief Formats ResetRecommended message into JSON 1030f8cca876SEd Tanous * Message body: "In order to recover from errors, a component reset is 1031f8cca876SEd Tanous * recommended with the Reset action URI <arg1> and ResetType <arg2>." 1032f8cca876SEd Tanous * 1033f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1034f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 1035f8cca876SEd Tanous * 1036f8cca876SEd Tanous * @returns Message ResetRecommended formatted to JSON */ 1037f8cca876SEd Tanous nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2); 1038f8cca876SEd Tanous 1039f8cca876SEd Tanous void resetRecommended(crow::Response& res, std::string_view arg1, 1040f8cca876SEd Tanous std::string_view arg2); 1041f8cca876SEd Tanous 1042f8cca876SEd Tanous /** 1043684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 104442079ecbSEd Tanous * Message body: "The chassis with Id <arg1> is required to be powered on to 1045684bb4b8SJason M. Bills * perform this request." 1046684bb4b8SJason M. Bills * 1047684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1048684bb4b8SJason M. Bills * 1049684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 10501668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1); 1051684bb4b8SJason M. Bills 10521668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1); 1053684bb4b8SJason M. Bills 1054684bb4b8SJason M. Bills /** 1055684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 105642079ecbSEd Tanous * Message body: "The chassis with Id <arg1> is required to be powered off to 1057684bb4b8SJason M. Bills * perform this request." 1058684bb4b8SJason M. Bills * 1059684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1060684bb4b8SJason M. Bills * 1061684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 10621668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1); 1063684bb4b8SJason M. Bills 10641668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1); 1065684bb4b8SJason M. Bills 1066684bb4b8SJason M. Bills /** 1067684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 106842079ecbSEd Tanous * Message body: "The property <arg1> could not be written because its value 106942079ecbSEd Tanous * would conflict with the value of the <arg2> property." 1070684bb4b8SJason M. Bills * 1071684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1072684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1073684bb4b8SJason M. Bills * 1074684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 10751668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1, 10761668ce6dSEd Tanous std::string_view arg2); 1077684bb4b8SJason M. Bills 10781668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1, 10791668ce6dSEd Tanous std::string_view arg2); 1080684bb4b8SJason M. Bills 1081684bb4b8SJason M. Bills /** 10822a6af81cSRamesh Iyyar * @brief Formats PropertyValueResourceConflict message into JSON 108342079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 108442079ecbSEd Tanous * not be written because the value conflicts with the state or configuration of 108542079ecbSEd Tanous * the resource at <arg3>." 10862a6af81cSRamesh Iyyar * 10872a6af81cSRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 10882a6af81cSRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 10892a6af81cSRamesh Iyyar * @param[in] arg3 Parameter of message that will replace %3 in its body. 10902a6af81cSRamesh Iyyar * 109142079ecbSEd Tanous * @returns Message PropertyValueResourceConflict formatted to JSON */ 1092bd79bce8SPatrick Williams nlohmann::json propertyValueResourceConflict( 1093bd79bce8SPatrick Williams std::string_view arg1, const nlohmann::json& arg2, 10944a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 10952a6af81cSRamesh Iyyar 10962a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1, 109795b3ad73SEd Tanous const nlohmann::json& arg2, 10984a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 10992a6af81cSRamesh Iyyar 11002a6af81cSRamesh Iyyar /** 110124861a28SRamesh Iyyar * @brief Formats PropertyValueExternalConflict message into JSON 110242079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 110342079ecbSEd Tanous * not be written because the value is not available due to a configuration 110424861a28SRamesh Iyyar * conflict." 110524861a28SRamesh Iyyar * 110624861a28SRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 110724861a28SRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 110824861a28SRamesh Iyyar * 110924861a28SRamesh Iyyar * @returns Message PropertyValueExternalConflict formatted to JSON */ 111024861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1, 111195b3ad73SEd Tanous const nlohmann::json& arg2); 111224861a28SRamesh Iyyar 111324861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, 111495b3ad73SEd Tanous const nlohmann::json& arg2); 111524861a28SRamesh Iyyar 111624861a28SRamesh Iyyar /** 1117684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 111842079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 111942079ecbSEd Tanous * not be written because the value does not meet the constraints of the 1120684bb4b8SJason M. Bills * implementation." 1121684bb4b8SJason M. Bills * 1122684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1123684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1124684bb4b8SJason M. Bills * 1125684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 1126367b3dceSGinu George nlohmann::json propertyValueIncorrect(std::string_view arg1, 1127367b3dceSGinu George const nlohmann::json& arg2); 1128684bb4b8SJason M. Bills 1129367b3dceSGinu George void propertyValueIncorrect(crow::Response& res, std::string_view arg1, 1130367b3dceSGinu George const nlohmann::json& arg2); 1131684bb4b8SJason M. Bills 1132684bb4b8SJason M. Bills /** 1133684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 1134684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 113542079ecbSEd Tanous * at URI <arg1> that conflicts with the creation request." 1136684bb4b8SJason M. Bills * 1137684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1138684bb4b8SJason M. Bills * 1139684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 11404a7fbefdSEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1); 1141684bb4b8SJason M. Bills 11424a7fbefdSEd Tanous void resourceCreationConflict(crow::Response& res, 11434a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 1144684bb4b8SJason M. Bills 1145684bb4b8SJason M. Bills /** 1146f8cca876SEd Tanous * @brief Formats ActionParameterValueConflict message into JSON 1147f8cca876SEd Tanous * Message body: "The parameter <arg1> with the requested value of <arg2> does 1148f8cca876SEd Tanous * not meet the constraints of the implementation." 1149f8cca876SEd Tanous * 1150f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1151f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 1152f8cca876SEd Tanous * 1153f8cca876SEd Tanous * @returns Message ActionParameterValueConflict formatted to JSON */ 1154f8cca876SEd Tanous nlohmann::json 1155f8cca876SEd Tanous actionParameterValueConflict(std::string_view arg1, std::string_view arg2); 1156f8cca876SEd Tanous 1157f8cca876SEd Tanous void actionParameterValueConflict(crow::Response& res, std::string_view arg1, 1158f8cca876SEd Tanous std::string_view arg2); 1159f8cca876SEd Tanous 1160f8cca876SEd Tanous /** 1161684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 1162684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 1163684bb4b8SJason M. Bills * 1164684bb4b8SJason M. Bills * 1165684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 116665176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 1167684bb4b8SJason M. Bills 1168684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 1169684bb4b8SJason M. Bills 1170684bb4b8SJason M. Bills /** 1171684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 1172684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 1173684bb4b8SJason M. Bills * this resource." 1174684bb4b8SJason M. Bills * 1175684bb4b8SJason M. Bills * 1176684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 117765176d39SEd Tanous nlohmann::json preconditionFailed(); 1178684bb4b8SJason M. Bills 1179684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 1180684bb4b8SJason M. Bills 1181684bb4b8SJason M. Bills /** 1182684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 1183684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 1184684bb4b8SJason M. Bills * resource." 1185684bb4b8SJason M. Bills * 1186684bb4b8SJason M. Bills * 1187684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 118865176d39SEd Tanous nlohmann::json preconditionRequired(); 1189684bb4b8SJason M. Bills 1190684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 1191684bb4b8SJason M. Bills 1192684bb4b8SJason M. Bills /** 1193f8cca876SEd Tanous * @brief Formats HeaderMissing message into JSON 1194f8cca876SEd Tanous * Message body: "Required header <arg1> is missing in the request." 1195f8cca876SEd Tanous * 1196f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1197f8cca876SEd Tanous * 1198f8cca876SEd Tanous * @returns Message HeaderMissing formatted to JSON */ 1199f8cca876SEd Tanous nlohmann::json headerMissing(std::string_view arg1); 1200f8cca876SEd Tanous 1201f8cca876SEd Tanous void headerMissing(crow::Response& res, std::string_view arg1); 1202f8cca876SEd Tanous 1203f8cca876SEd Tanous /** 1204f8cca876SEd Tanous * @brief Formats HeaderInvalid message into JSON 1205f8cca876SEd Tanous * Message body: "Header <arg1> is invalid." 1206f8cca876SEd Tanous * 1207f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1208f8cca876SEd Tanous * 1209f8cca876SEd Tanous * @returns Message HeaderInvalid formatted to JSON */ 1210f8cca876SEd Tanous nlohmann::json headerInvalid(std::string_view arg1); 1211f8cca876SEd Tanous 1212f8cca876SEd Tanous void headerInvalid(crow::Response& res, std::string_view arg1); 1213f8cca876SEd Tanous 1214f8cca876SEd Tanous /** 1215684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 1216684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 1217684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 1218684bb4b8SJason M. Bills * 1219684bb4b8SJason M. Bills * 1220684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 122165176d39SEd Tanous nlohmann::json operationFailed(); 1222684bb4b8SJason M. Bills 1223684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 1224684bb4b8SJason M. Bills 1225684bb4b8SJason M. Bills /** 1226684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 12278ece0e45SEd Tanous * Message body: "A timeout internal to the service occurred as part of the 1228684bb4b8SJason M. Bills * request. Partial results may have been returned." 1229684bb4b8SJason M. Bills * 1230684bb4b8SJason M. Bills * 1231684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 123265176d39SEd Tanous nlohmann::json operationTimeout(); 1233684bb4b8SJason M. Bills 1234684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 1235684bb4b8SJason M. Bills 1236684bb4b8SJason M. Bills /** 123744c70412SEd Tanous * @brief Formats OperationNotAllowed message into JSON 123842079ecbSEd Tanous * Message body: "The HTTP method is not allowed on this resource." 123942079ecbSEd Tanous * 124042079ecbSEd Tanous * 124144c70412SEd Tanous * @returns Message OperationNotAllowed formatted to JSON */ 124244c70412SEd Tanous nlohmann::json operationNotAllowed(); 124344c70412SEd Tanous 124444c70412SEd Tanous void operationNotAllowed(crow::Response& res); 124544c70412SEd Tanous 1246600af5f1SAppaRao Puli /** 124742079ecbSEd Tanous * @brief Formats UndeterminedFault message into JSON 124842079ecbSEd Tanous * Message body: "An undetermined fault condition was reported by <arg1>." 124942079ecbSEd Tanous * 125042079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 125142079ecbSEd Tanous * 125242079ecbSEd Tanous * @returns Message UndeterminedFault formatted to JSON */ 125342079ecbSEd Tanous nlohmann::json undeterminedFault(std::string_view arg1); 125442079ecbSEd Tanous 125542079ecbSEd Tanous void undeterminedFault(crow::Response& res, std::string_view arg1); 125642079ecbSEd Tanous 125742079ecbSEd Tanous /** 125842079ecbSEd Tanous * @brief Formats ConditionInRelatedResource message into JSON 125942079ecbSEd Tanous * Message body: "One or more conditions exist in a related resource. See the 126042079ecbSEd Tanous * OriginOfCondition property." 126142079ecbSEd Tanous * 126242079ecbSEd Tanous * 126342079ecbSEd Tanous * @returns Message ConditionInRelatedResource formatted to JSON */ 126442079ecbSEd Tanous nlohmann::json conditionInRelatedResource(); 126542079ecbSEd Tanous 126642079ecbSEd Tanous void conditionInRelatedResource(crow::Response& res); 126742079ecbSEd Tanous 126842079ecbSEd Tanous /** 126942079ecbSEd Tanous * @brief Formats RestrictedRole message into JSON 127042079ecbSEd Tanous * Message body: "The operation was not successful because the role <arg1> is 127142079ecbSEd Tanous * restricted." 127242079ecbSEd Tanous * 127342079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 127442079ecbSEd Tanous * 127542079ecbSEd Tanous * @returns Message RestrictedRole formatted to JSON */ 127642079ecbSEd Tanous nlohmann::json restrictedRole(std::string_view arg1); 127742079ecbSEd Tanous 127842079ecbSEd Tanous void restrictedRole(crow::Response& res, std::string_view arg1); 127942079ecbSEd Tanous 128042079ecbSEd Tanous /** 128142079ecbSEd Tanous * @brief Formats RestrictedPrivilege message into JSON 128242079ecbSEd Tanous * Message body: "The operation was not successful because the privilege <arg1> 128342079ecbSEd Tanous * is restricted." 128442079ecbSEd Tanous * 128542079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 128642079ecbSEd Tanous * 128742079ecbSEd Tanous * @returns Message RestrictedPrivilege formatted to JSON */ 128842079ecbSEd Tanous nlohmann::json restrictedPrivilege(std::string_view arg1); 128942079ecbSEd Tanous 129042079ecbSEd Tanous void restrictedPrivilege(crow::Response& res, std::string_view arg1); 129142079ecbSEd Tanous 129242079ecbSEd Tanous /** 1293f8cca876SEd Tanous * @brief Formats StrictAccountTypes message into JSON 1294f8cca876SEd Tanous * Message body: "The request could not be fulfilled with the account types 1295f8cca876SEd Tanous * included in property <arg1> because the property StrictAccountTypes is set to 1296f8cca876SEd Tanous * true." 1297f8cca876SEd Tanous * 1298f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1299f8cca876SEd Tanous * 1300f8cca876SEd Tanous * @returns Message StrictAccountTypes formatted to JSON */ 1301f8cca876SEd Tanous nlohmann::json strictAccountTypes(std::string_view arg1); 1302f8cca876SEd Tanous 1303f8cca876SEd Tanous void strictAccountTypes(crow::Response& res, std::string_view arg1); 1304f8cca876SEd Tanous 1305f8cca876SEd Tanous /** 130642079ecbSEd Tanous * @brief Formats PropertyDeprecated message into JSON 130742079ecbSEd Tanous * Message body: "The deprecated property <arg1> was included in the request 130842079ecbSEd Tanous * body." 130942079ecbSEd Tanous * 131042079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 131142079ecbSEd Tanous * 131242079ecbSEd Tanous * @returns Message PropertyDeprecated formatted to JSON */ 131342079ecbSEd Tanous nlohmann::json propertyDeprecated(std::string_view arg1); 131442079ecbSEd Tanous 131542079ecbSEd Tanous void propertyDeprecated(crow::Response& res, std::string_view arg1); 131642079ecbSEd Tanous 131742079ecbSEd Tanous /** 131842079ecbSEd Tanous * @brief Formats ResourceDeprecated message into JSON 131942079ecbSEd Tanous * Message body: "The operation was performed on a deprecated resource <arg1>." 132042079ecbSEd Tanous * 132142079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 132242079ecbSEd Tanous * 132342079ecbSEd Tanous * @returns Message ResourceDeprecated formatted to JSON */ 132442079ecbSEd Tanous nlohmann::json resourceDeprecated(std::string_view arg1); 132542079ecbSEd Tanous 132642079ecbSEd Tanous void resourceDeprecated(crow::Response& res, std::string_view arg1); 132742079ecbSEd Tanous 132842079ecbSEd Tanous /** 132942079ecbSEd Tanous * @brief Formats PropertyValueDeprecated message into JSON 133042079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is deprecated." 133142079ecbSEd Tanous * 133242079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 133342079ecbSEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 133442079ecbSEd Tanous * 133542079ecbSEd Tanous * @returns Message PropertyValueDeprecated formatted to JSON */ 133642079ecbSEd Tanous nlohmann::json propertyValueDeprecated(std::string_view arg1, 133742079ecbSEd Tanous std::string_view arg2); 133842079ecbSEd Tanous 133942079ecbSEd Tanous void propertyValueDeprecated(crow::Response& res, std::string_view arg1, 134042079ecbSEd Tanous std::string_view arg2); 134142079ecbSEd Tanous 134242079ecbSEd Tanous /** 134342079ecbSEd Tanous * @brief Formats ActionDeprecated message into JSON 134442079ecbSEd Tanous * Message body: "The action <arg1> is deprecated." 134542079ecbSEd Tanous * 134642079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 134742079ecbSEd Tanous * 134842079ecbSEd Tanous * @returns Message ActionDeprecated formatted to JSON */ 134942079ecbSEd Tanous nlohmann::json actionDeprecated(std::string_view arg1); 135042079ecbSEd Tanous 135142079ecbSEd Tanous void actionDeprecated(crow::Response& res, std::string_view arg1); 135242079ecbSEd Tanous 135342079ecbSEd Tanous /** 135442079ecbSEd Tanous * @brief Formats NetworkNameResolutionNotConfigured message into JSON 135542079ecbSEd Tanous * Message body: "Network name resolution is not configured on this service." 135642079ecbSEd Tanous * 135742079ecbSEd Tanous * 135842079ecbSEd Tanous * @returns Message NetworkNameResolutionNotConfigured formatted to JSON */ 135942079ecbSEd Tanous nlohmann::json networkNameResolutionNotConfigured(); 136042079ecbSEd Tanous 136142079ecbSEd Tanous void networkNameResolutionNotConfigured(crow::Response& res); 136242079ecbSEd Tanous 136342079ecbSEd Tanous /** 136442079ecbSEd Tanous * @brief Formats NetworkNameResolutionNotSupported message into JSON 136542079ecbSEd Tanous * Message body: "Resolution of network-based names is not supported by this 136642079ecbSEd Tanous * service." 136742079ecbSEd Tanous * 136842079ecbSEd Tanous * 136942079ecbSEd Tanous * @returns Message NetworkNameResolutionNotSupported formatted to JSON */ 137042079ecbSEd Tanous nlohmann::json networkNameResolutionNotSupported(); 137142079ecbSEd Tanous 137242079ecbSEd Tanous void networkNameResolutionNotSupported(crow::Response& res); 137342079ecbSEd Tanous 137442079ecbSEd Tanous /** 1375f8cca876SEd Tanous * @brief Formats ServiceDisabled message into JSON 1376f8cca876SEd Tanous * Message body: "The operation failed because the service at <arg1> is disabled 1377f8cca876SEd Tanous * and cannot accept requests." 1378f8cca876SEd Tanous * 1379f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1380f8cca876SEd Tanous * 1381f8cca876SEd Tanous * @returns Message ServiceDisabled formatted to JSON */ 1382f8cca876SEd Tanous nlohmann::json serviceDisabled(std::string_view arg1); 1383f8cca876SEd Tanous 1384f8cca876SEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1); 1385f8cca876SEd Tanous 1386f8cca876SEd Tanous /** 1387f8cca876SEd Tanous * @brief Formats EventBufferExceeded message into JSON 1388f8cca876SEd Tanous * Message body: "Undelivered events may have been lost due to exceeding the 1389f8cca876SEd Tanous * event buffer." 1390f8cca876SEd Tanous * 1391f8cca876SEd Tanous * 1392f8cca876SEd Tanous * @returns Message EventBufferExceeded formatted to JSON */ 1393f8cca876SEd Tanous nlohmann::json eventBufferExceeded(); 1394f8cca876SEd Tanous 1395f8cca876SEd Tanous void eventBufferExceeded(crow::Response& res); 1396f8cca876SEd Tanous 1397f8cca876SEd Tanous /** 139842079ecbSEd Tanous * @brief Formats AuthenticationTokenRequired message into JSON 139942079ecbSEd Tanous * Message body: "The request could not be performed because an authentication 140042079ecbSEd Tanous * token was not provided." 140142079ecbSEd Tanous * 140242079ecbSEd Tanous * 140342079ecbSEd Tanous * @returns Message AuthenticationTokenRequired formatted to JSON */ 140442079ecbSEd Tanous nlohmann::json authenticationTokenRequired(); 140542079ecbSEd Tanous 140642079ecbSEd Tanous void authenticationTokenRequired(crow::Response& res); 140742079ecbSEd Tanous 140842079ecbSEd Tanous /** 140942079ecbSEd Tanous * @brief Formats OneTimePasscodeSent message into JSON 141042079ecbSEd Tanous * Message body: "A one-time passcode was sent to: <arg1>. Supply the passcode 141142079ecbSEd Tanous * as the `Token` property in the request to create a session." 141242079ecbSEd Tanous * 141342079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 141442079ecbSEd Tanous * 141542079ecbSEd Tanous * @returns Message OneTimePasscodeSent formatted to JSON */ 141642079ecbSEd Tanous nlohmann::json oneTimePasscodeSent(std::string_view arg1); 141742079ecbSEd Tanous 141842079ecbSEd Tanous void oneTimePasscodeSent(crow::Response& res, std::string_view arg1); 141942079ecbSEd Tanous 142042079ecbSEd Tanous /** 142142079ecbSEd Tanous * @brief Formats LicenseRequired message into JSON 142242079ecbSEd Tanous * Message body: "A license is required for this operation: <arg1>." 142342079ecbSEd Tanous * 142442079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 142542079ecbSEd Tanous * 142642079ecbSEd Tanous * @returns Message LicenseRequired formatted to JSON */ 142742079ecbSEd Tanous nlohmann::json licenseRequired(std::string_view arg1); 142842079ecbSEd Tanous 142942079ecbSEd Tanous void licenseRequired(crow::Response& res, std::string_view arg1); 143042079ecbSEd Tanous 143142079ecbSEd Tanous /** 143242079ecbSEd Tanous * @brief Formats PropertyModified message into JSON 143342079ecbSEd Tanous * Message body: "One or more properties were successfully modified." 143442079ecbSEd Tanous * 143542079ecbSEd Tanous * 143642079ecbSEd Tanous * @returns Message PropertyModified formatted to JSON */ 143742079ecbSEd Tanous nlohmann::json propertyModified(); 143842079ecbSEd Tanous 143942079ecbSEd Tanous void propertyModified(crow::Response& res); 144042079ecbSEd Tanous 1441f8cca876SEd Tanous /** 1442f8cca876SEd Tanous * @brief Formats GenerateSecretKeyRequired message into JSON 1443f8cca876SEd Tanous * Message body: "The Time-based One-Time Password (TOTP) secret key for this 1444f8cca876SEd Tanous * account must be generated before access is granted. Perform the 1445f8cca876SEd Tanous * GenerateSecretKey action at URI <arg1> and retain the secret key from the 1446f8cca876SEd Tanous * response." 1447f8cca876SEd Tanous * 1448f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1449f8cca876SEd Tanous * 1450f8cca876SEd Tanous * @returns Message GenerateSecretKeyRequired formatted to JSON */ 1451f8cca876SEd Tanous nlohmann::json 1452f8cca876SEd Tanous generateSecretKeyRequired(const boost::urls::url_view_base& arg1); 1453f8cca876SEd Tanous 1454f8cca876SEd Tanous void generateSecretKeyRequired(crow::Response& res, 1455f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 1456f8cca876SEd Tanous 145742079ecbSEd Tanous } // namespace messages 1458f4c4dcf4SKowalski, Kamil } // namespace redfish 1459