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 ***************************************************************/ 120442ef92SNan Zhou 1304e438cbSEd Tanous #include "http_response.hpp" 14f12894f8SJason M. Bills 154a7fbefdSEd Tanous #include <boost/url/url_view_base.hpp> 161214b7e7SGunnar Mills #include <nlohmann/json.hpp> 171214b7e7SGunnar Mills 180442ef92SNan Zhou #include <cstdint> 19d85418e3SPatrick Williams #include <source_location> 209ea15c35SEd Tanous #include <string> 210442ef92SNan Zhou #include <string_view> 220442ef92SNan Zhou 230442ef92SNan Zhou // IWYU pragma: no_forward_declare crow::Response 249ea15c35SEd Tanous 251abe55efSEd Tanous namespace redfish 261abe55efSEd Tanous { 27f4c4dcf4SKowalski, Kamil 281abe55efSEd Tanous namespace messages 291abe55efSEd Tanous { 30f4c4dcf4SKowalski, Kamil 3181856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0."; 3255c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo"; 33f4c4dcf4SKowalski, Kamil 34f4c4dcf4SKowalski, Kamil /** 353590bd1dSNan Zhou * @brief Moves all error messages from the |source| JSON to |target| 363590bd1dSNan Zhou */ 373590bd1dSNan Zhou void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source); 383590bd1dSNan Zhou 393590bd1dSNan Zhou /** 40f8cca876SEd Tanous * @brief Formats Success message into JSON 41f8cca876SEd Tanous * Message body: "The request completed successfully." 42f4c4dcf4SKowalski, Kamil * 43f4c4dcf4SKowalski, Kamil * 44f8cca876SEd Tanous * @returns Message Success formatted to JSON */ 45f8cca876SEd Tanous nlohmann::json success(); 46b5c07418SJames Feist 47f8cca876SEd Tanous void success(crow::Response& res); 48f4c4dcf4SKowalski, Kamil 49f4c4dcf4SKowalski, Kamil /** 50f8cca876SEd Tanous * @brief Formats GeneralError message into JSON 51f8cca876SEd Tanous * Message body: "A general error has occurred. See Resolution for information 52f8cca876SEd Tanous * on how to resolve the error, or @Message.ExtendedInfo if Resolution is not 53f8cca876SEd Tanous * provided." 54f4c4dcf4SKowalski, Kamil * 55f4c4dcf4SKowalski, Kamil * 56f8cca876SEd Tanous * @returns Message GeneralError formatted to JSON */ 57f8cca876SEd Tanous nlohmann::json generalError(); 58b5c07418SJames Feist 59f8cca876SEd Tanous void generalError(crow::Response& res); 60f4c4dcf4SKowalski, Kamil 61f4c4dcf4SKowalski, Kamil /** 62f8cca876SEd Tanous * @brief Formats Created message into JSON 63f8cca876SEd Tanous * Message body: "The resource was created successfully." 64f4c4dcf4SKowalski, Kamil * 65f4c4dcf4SKowalski, Kamil * 66f8cca876SEd Tanous * @returns Message Created formatted to JSON */ 67f8cca876SEd Tanous nlohmann::json created(); 68b5c07418SJames Feist 69f8cca876SEd Tanous void created(crow::Response& res); 70f4c4dcf4SKowalski, Kamil 71f4c4dcf4SKowalski, Kamil /** 72f8cca876SEd Tanous * @brief Formats NoOperation message into JSON 73f8cca876SEd Tanous * Message body: "The request body submitted contain no data to act upon and no 74f8cca876SEd Tanous * changes to the resource took place." 75f4c4dcf4SKowalski, Kamil * 76f4c4dcf4SKowalski, Kamil * 77f8cca876SEd Tanous * @returns Message NoOperation formatted to JSON */ 78f8cca876SEd Tanous nlohmann::json noOperation(); 79b5c07418SJames Feist 80f8cca876SEd Tanous void noOperation(crow::Response& res); 81f4c4dcf4SKowalski, Kamil 82f4c4dcf4SKowalski, Kamil /** 83f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 8466ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 85f4c4dcf4SKowalski, Kamil * 86f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 87f4c4dcf4SKowalski, Kamil * 88f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 891668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1); 90b5c07418SJames Feist 911668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1); 92f4c4dcf4SKowalski, Kamil 93f4c4dcf4SKowalski, Kamil /** 94f8cca876SEd Tanous * @brief Formats PropertyUnknown message into JSON 95f8cca876SEd Tanous * Message body: "The property <arg1> is not in the list of valid properties for 96f8cca876SEd Tanous * the resource." 97f4c4dcf4SKowalski, Kamil * 98f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 99f4c4dcf4SKowalski, Kamil * 100f8cca876SEd Tanous * @returns Message PropertyUnknown formatted to JSON */ 101f8cca876SEd Tanous nlohmann::json propertyUnknown(std::string_view arg1); 102b5c07418SJames Feist 103f8cca876SEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1); 104f4c4dcf4SKowalski, Kamil 105f4c4dcf4SKowalski, Kamil /** 106f8cca876SEd Tanous * @brief Formats PropertyValueTypeError message into JSON 107f8cca876SEd Tanous * Message body: "The value <arg1> for the property <arg2> is not a type that 108f8cca876SEd Tanous * the property can accept." 109f4c4dcf4SKowalski, Kamil * 110f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 111f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 112f4c4dcf4SKowalski, Kamil * 113f8cca876SEd Tanous * @returns Message PropertyValueTypeError formatted to JSON */ 114f8cca876SEd Tanous nlohmann::json propertyValueTypeError(const nlohmann::json& arg1, 115f8cca876SEd Tanous std::string_view arg2); 116b5c07418SJames Feist 117f8cca876SEd Tanous void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1, 118f8cca876SEd Tanous std::string_view arg2); 119f4c4dcf4SKowalski, Kamil 120f4c4dcf4SKowalski, Kamil /** 121f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 12242079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is not a format that 12342079ecbSEd Tanous * the property can accept." 124f4c4dcf4SKowalski, Kamil * 125f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 126f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 127f4c4dcf4SKowalski, Kamil * 128f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 129f818b04dSEd Tanous nlohmann::json propertyValueFormatError(const nlohmann::json& arg1, 1301668ce6dSEd Tanous std::string_view arg2); 131b5c07418SJames Feist 132f818b04dSEd Tanous void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1, 1331668ce6dSEd Tanous std::string_view arg2); 134f4c4dcf4SKowalski, Kamil 135f4c4dcf4SKowalski, Kamil /** 136f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 13766ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 138f4c4dcf4SKowalski, Kamil * acceptable values." 139f4c4dcf4SKowalski, Kamil * 140f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 141f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 142f4c4dcf4SKowalski, Kamil * 143f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 144e2616cc5SEd Tanous nlohmann::json propertyValueNotInList(const nlohmann::json& arg1, 1451668ce6dSEd Tanous std::string_view arg2); 146b5c07418SJames Feist 147e2616cc5SEd Tanous void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1, 1481668ce6dSEd Tanous std::string_view arg2); 14942079ecbSEd Tanous 150f4c4dcf4SKowalski, Kamil /** 151227a2b0aSJiaqing Zhao * @brief Formats PropertyValueOutOfRange message into JSON 15242079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is not in the 15342079ecbSEd Tanous * supported range of acceptable values." 154227a2b0aSJiaqing Zhao * 155227a2b0aSJiaqing Zhao * @param[in] arg1 Parameter of message that will replace %1 in its body. 156227a2b0aSJiaqing Zhao * @param[in] arg2 Parameter of message that will replace %2 in its body. 157227a2b0aSJiaqing Zhao * 15842079ecbSEd Tanous * @returns Message PropertyValueOutOfRange formatted to JSON */ 15995b3ad73SEd Tanous nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1, 160227a2b0aSJiaqing Zhao std::string_view arg2); 161227a2b0aSJiaqing Zhao 16295b3ad73SEd Tanous void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1, 163227a2b0aSJiaqing Zhao std::string_view arg2); 164227a2b0aSJiaqing Zhao 165227a2b0aSJiaqing Zhao /** 166f8cca876SEd Tanous * @brief Formats PropertyValueError message into JSON 167f8cca876SEd Tanous * Message body: "The value provided for the property <arg1> is not valid." 168f4c4dcf4SKowalski, Kamil * 169f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 170f4c4dcf4SKowalski, Kamil * 171f8cca876SEd Tanous * @returns Message PropertyValueError formatted to JSON */ 172f8cca876SEd Tanous nlohmann::json propertyValueError(std::string_view arg1); 173b5c07418SJames Feist 174f8cca876SEd Tanous void propertyValueError(crow::Response& res, std::string_view arg1); 175f4c4dcf4SKowalski, Kamil 176f4c4dcf4SKowalski, Kamil /** 177f8cca876SEd Tanous * @brief Formats PropertyNotWritable message into JSON 178f8cca876SEd Tanous * Message body: "The property <arg1> is a read-only property and cannot be 179f8cca876SEd Tanous * assigned a value." 18081856681SAsmitha Karunanithi * 18181856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 18281856681SAsmitha Karunanithi * 183f8cca876SEd Tanous * @returns Message PropertyNotWritable formatted to JSON */ 184f8cca876SEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1); 18581856681SAsmitha Karunanithi 186f8cca876SEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1); 18781856681SAsmitha Karunanithi 18881856681SAsmitha Karunanithi /** 189f8cca876SEd Tanous * @brief Formats PropertyNotUpdated message into JSON 190f8cca876SEd Tanous * Message body: "The property <arg1> was not updated due to an internal service 191f8cca876SEd Tanous * error. The service is still operational." 192f4c4dcf4SKowalski, Kamil * 193f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 194f4c4dcf4SKowalski, Kamil * 195f8cca876SEd Tanous * @returns Message PropertyNotUpdated formatted to JSON */ 196f8cca876SEd Tanous nlohmann::json propertyNotUpdated(std::string_view arg1); 197b5c07418SJames Feist 198f8cca876SEd Tanous void propertyNotUpdated(crow::Response& res, std::string_view arg1); 199f4c4dcf4SKowalski, Kamil 200f4c4dcf4SKowalski, Kamil /** 201f8cca876SEd Tanous * @brief Formats PropertyMissing message into JSON 202f8cca876SEd Tanous * Message body: "The property <arg1> is a required property and must be 203f8cca876SEd Tanous * included in the request." 204f4c4dcf4SKowalski, Kamil * 205f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 206f4c4dcf4SKowalski, Kamil * 207f8cca876SEd Tanous * @returns Message PropertyMissing formatted to JSON */ 208f8cca876SEd Tanous nlohmann::json propertyMissing(std::string_view arg1); 209b5c07418SJames Feist 210f8cca876SEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1); 211f8cca876SEd Tanous 212f8cca876SEd Tanous /** 213f8cca876SEd Tanous * @brief Formats MalformedJSON message into JSON 214f8cca876SEd Tanous * Message body: "The request body submitted was malformed JSON and could not be 215f8cca876SEd Tanous * parsed by the receiving service." 216f8cca876SEd Tanous * 217f8cca876SEd Tanous * 218f8cca876SEd Tanous * @returns Message MalformedJSON formatted to JSON */ 219f8cca876SEd Tanous nlohmann::json malformedJSON(); 220f8cca876SEd Tanous 221f8cca876SEd Tanous void malformedJSON(crow::Response& res); 222f8cca876SEd Tanous 223f8cca876SEd Tanous /** 224f8cca876SEd Tanous * @brief Formats InvalidJSON message into JSON 225f8cca876SEd Tanous * Message body: "The request body submitted is invalid JSON starting at line 226f8cca876SEd Tanous * <arg1> and could not be parsed by the receiving service." 227f8cca876SEd Tanous * 228f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 229f8cca876SEd Tanous * 230f8cca876SEd Tanous * @returns Message InvalidJSON formatted to JSON */ 231f8cca876SEd Tanous nlohmann::json invalidJSON(std::string_view arg1); 232f8cca876SEd Tanous 233f8cca876SEd Tanous void invalidJSON(crow::Response& res, std::string_view arg1); 234f8cca876SEd Tanous 235f8cca876SEd Tanous /** 236f8cca876SEd Tanous * @brief Formats EmptyJSON message into JSON 237f8cca876SEd Tanous * Message body: "The request body submitted contained an empty JSON object and 238f8cca876SEd Tanous * the service is unable to process it." 239f8cca876SEd Tanous * 240f8cca876SEd Tanous * 241f8cca876SEd Tanous * @returns Message EmptyJSON formatted to JSON */ 242f8cca876SEd Tanous nlohmann::json emptyJSON(); 243f8cca876SEd Tanous 244f8cca876SEd Tanous void emptyJSON(crow::Response& res); 245f8cca876SEd Tanous 246f8cca876SEd Tanous /** 247f8cca876SEd Tanous * @brief Formats ActionNotSupported message into JSON 248f8cca876SEd Tanous * Message body: "The action <arg1> is not supported by the resource." 249f8cca876SEd Tanous * 250f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 251f8cca876SEd Tanous * 252f8cca876SEd Tanous * @returns Message ActionNotSupported formatted to JSON */ 253f8cca876SEd Tanous nlohmann::json actionNotSupported(std::string_view arg1); 254f8cca876SEd Tanous 255f8cca876SEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1); 256f4c4dcf4SKowalski, Kamil 257f4c4dcf4SKowalski, Kamil /** 258f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 25966ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 260f4c4dcf4SKowalski, Kamil * in the request body." 261f4c4dcf4SKowalski, Kamil * 262f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 263f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 264f4c4dcf4SKowalski, Kamil * 265f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 2661668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1, 2671668ce6dSEd Tanous std::string_view arg2); 268b5c07418SJames Feist 2691668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1, 2701668ce6dSEd Tanous std::string_view arg2); 271f4c4dcf4SKowalski, Kamil 272f4c4dcf4SKowalski, Kamil /** 273f8cca876SEd Tanous * @brief Formats ActionParameterDuplicate message into JSON 274f8cca876SEd Tanous * Message body: "The action <arg1> was submitted with more than one value for 275f8cca876SEd Tanous * the parameter <arg2>." 276f8cca876SEd Tanous * 277f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 278f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 279f8cca876SEd Tanous * 280f8cca876SEd Tanous * @returns Message ActionParameterDuplicate formatted to JSON */ 281f8cca876SEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1, 282f8cca876SEd Tanous std::string_view arg2); 283f8cca876SEd Tanous 284f8cca876SEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1, 285f8cca876SEd Tanous std::string_view arg2); 286f8cca876SEd Tanous 287f8cca876SEd Tanous /** 288f8cca876SEd Tanous * @brief Formats ActionParameterUnknown message into JSON 289f8cca876SEd Tanous * Message body: "The action <arg1> was submitted with the invalid parameter 290f8cca876SEd Tanous * <arg2>." 291f8cca876SEd Tanous * 292f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 293f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 294f8cca876SEd Tanous * 295f8cca876SEd Tanous * @returns Message ActionParameterUnknown formatted to JSON */ 296f8cca876SEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1, 297f8cca876SEd Tanous std::string_view arg2); 298f8cca876SEd Tanous 299f8cca876SEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1, 300f8cca876SEd Tanous std::string_view arg2); 301f8cca876SEd Tanous 302f8cca876SEd Tanous /** 303f8cca876SEd Tanous * @brief Formats ActionParameterValueTypeError message into JSON 304f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 305f8cca876SEd Tanous * is not a type that the parameter can accept." 306f8cca876SEd Tanous * 307f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 308f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 309f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 310f8cca876SEd Tanous * 311f8cca876SEd Tanous * @returns Message ActionParameterValueTypeError formatted to JSON */ 312f8cca876SEd Tanous nlohmann::json actionParameterValueTypeError( 313f8cca876SEd Tanous const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3); 314f8cca876SEd Tanous 315f8cca876SEd Tanous void actionParameterValueTypeError( 316f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2, 317f8cca876SEd Tanous std::string_view arg3); 318f8cca876SEd Tanous 319f8cca876SEd Tanous /** 320f8cca876SEd Tanous * @brief Formats ActionParameterValueFormatError message into JSON 321f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 322f8cca876SEd Tanous * is not a format that the parameter can accept." 323f8cca876SEd Tanous * 324f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 325f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 326f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 327f8cca876SEd Tanous * 328f8cca876SEd Tanous * @returns Message ActionParameterValueFormatError formatted to JSON */ 329f8cca876SEd Tanous nlohmann::json actionParameterValueFormatError( 330f8cca876SEd Tanous const nlohmann::json& arg1, std::string_view arg2, std::string_view arg3); 331f8cca876SEd Tanous 332f8cca876SEd Tanous void actionParameterValueFormatError( 333f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2, 334f8cca876SEd Tanous std::string_view arg3); 335f8cca876SEd Tanous 336f8cca876SEd Tanous /** 337f8cca876SEd Tanous * @brief Formats ActionParameterValueNotInList message into JSON 338f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 339f8cca876SEd Tanous * is not in the list of acceptable values." 340f8cca876SEd Tanous * 341f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 342f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 343f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 344f8cca876SEd Tanous * 345f8cca876SEd Tanous * @returns Message ActionParameterValueNotInList formatted to JSON */ 346f8cca876SEd Tanous nlohmann::json actionParameterValueNotInList( 347f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 348f8cca876SEd Tanous 349f8cca876SEd Tanous void actionParameterValueNotInList(crow::Response& res, std::string_view arg1, 350f8cca876SEd Tanous std::string_view arg2, 351f8cca876SEd Tanous std::string_view arg3); 352f8cca876SEd Tanous 353f8cca876SEd Tanous /** 354f8cca876SEd Tanous * @brief Formats ActionParameterValueOutOfRange message into JSON 355f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 356f8cca876SEd Tanous * is not in the supported range of acceptable values." 357f8cca876SEd Tanous * 358f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 359f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 360f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 361f8cca876SEd Tanous * 362f8cca876SEd Tanous * @returns Message ActionParameterValueOutOfRange formatted to JSON */ 363f8cca876SEd Tanous nlohmann::json actionParameterValueOutOfRange( 364f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 365f8cca876SEd Tanous 366f8cca876SEd Tanous void actionParameterValueOutOfRange(crow::Response& res, std::string_view arg1, 367f8cca876SEd Tanous std::string_view arg2, 368f8cca876SEd Tanous std::string_view arg3); 369f8cca876SEd Tanous 370f8cca876SEd Tanous /** 371f8cca876SEd Tanous * @brief Formats ActionParameterValueError message into JSON 372f8cca876SEd Tanous * Message body: "The value for the parameter <arg1> in the action <arg2> is 373f8cca876SEd Tanous * invalid." 374f8cca876SEd Tanous * 375f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 376f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 377f8cca876SEd Tanous * 378f8cca876SEd Tanous * @returns Message ActionParameterValueError formatted to JSON */ 379f8cca876SEd Tanous nlohmann::json actionParameterValueError(const nlohmann::json& arg1, 380f8cca876SEd Tanous std::string_view arg2); 381f8cca876SEd Tanous 382f8cca876SEd Tanous void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1, 383f8cca876SEd Tanous std::string_view arg2); 384f8cca876SEd Tanous 385f8cca876SEd Tanous /** 386f8cca876SEd Tanous * @brief Formats ActionParameterNotSupported message into JSON 387f8cca876SEd Tanous * Message body: "The parameter <arg1> for the action <arg2> is not supported on 388f8cca876SEd Tanous * the target resource." 389f8cca876SEd Tanous * 390f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 391f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 392f8cca876SEd Tanous * 393f8cca876SEd Tanous * @returns Message ActionParameterNotSupported formatted to JSON */ 394f8cca876SEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1, 395f8cca876SEd Tanous std::string_view arg2); 396f8cca876SEd Tanous 397f8cca876SEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1, 398f8cca876SEd Tanous std::string_view arg2); 399f8cca876SEd Tanous 400f8cca876SEd Tanous /** 401f8cca876SEd Tanous * @brief Formats ArraySizeTooLong message into JSON 402f8cca876SEd Tanous * Message body: "The array provided for property <arg1> exceeds the size limit 403f8cca876SEd Tanous * <arg2>." 404f8cca876SEd Tanous * 405f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 406f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 407f8cca876SEd Tanous * 408f8cca876SEd Tanous * @returns Message ArraySizeTooLong formatted to JSON */ 409f8cca876SEd Tanous nlohmann::json arraySizeTooLong(std::string_view arg1, uint64_t arg2); 410f8cca876SEd Tanous 411f8cca876SEd Tanous void arraySizeTooLong(crow::Response& res, std::string_view arg1, 412f8cca876SEd Tanous uint64_t arg2); 413f8cca876SEd Tanous 414f8cca876SEd Tanous /** 415f8cca876SEd Tanous * @brief Formats ArraySizeTooShort message into JSON 416f8cca876SEd Tanous * Message body: "The array provided for property <arg1> is under the minimum 417f8cca876SEd Tanous * size limit <arg2>." 418f8cca876SEd Tanous * 419f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 420f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 421f8cca876SEd Tanous * 422f8cca876SEd Tanous * @returns Message ArraySizeTooShort formatted to JSON */ 423f8cca876SEd Tanous nlohmann::json arraySizeTooShort(std::string_view arg1, std::string_view arg2); 424f8cca876SEd Tanous 425f8cca876SEd Tanous void arraySizeTooShort(crow::Response& res, std::string_view arg1, 426f8cca876SEd Tanous std::string_view arg2); 427f8cca876SEd Tanous 428f8cca876SEd Tanous /** 429f8cca876SEd Tanous * @brief Formats QueryParameterValueTypeError message into JSON 430f8cca876SEd Tanous * Message body: "The value <arg1> for the query parameter <arg2> is not a type 431f8cca876SEd Tanous * that the parameter can accept." 432f8cca876SEd Tanous * 433f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 434f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 435f8cca876SEd Tanous * 436f8cca876SEd Tanous * @returns Message QueryParameterValueTypeError formatted to JSON */ 437f8cca876SEd Tanous nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1, 438f8cca876SEd Tanous std::string_view arg2); 439f8cca876SEd Tanous 440f8cca876SEd Tanous void queryParameterValueTypeError( 441f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2); 442f8cca876SEd Tanous 443f8cca876SEd Tanous /** 444f8cca876SEd Tanous * @brief Formats QueryParameterValueFormatError message into JSON 445f8cca876SEd Tanous * Message body: "The value <arg1> for the parameter <arg2> is not a format that 446f8cca876SEd Tanous * the parameter can accept." 447f8cca876SEd Tanous * 448f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 449f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 450f8cca876SEd Tanous * 451f8cca876SEd Tanous * @returns Message QueryParameterValueFormatError formatted to JSON */ 452f8cca876SEd Tanous nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1, 453f8cca876SEd Tanous std::string_view arg2); 454f8cca876SEd Tanous 455f8cca876SEd Tanous void queryParameterValueFormatError( 456f8cca876SEd Tanous crow::Response& res, const nlohmann::json& arg1, std::string_view arg2); 457f8cca876SEd Tanous 458f8cca876SEd Tanous /** 459f8cca876SEd Tanous * @brief Formats QueryParameterValueError message into JSON 460f8cca876SEd Tanous * Message body: "The value for the parameter <arg1> is invalid." 461f8cca876SEd Tanous * 462f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 463f8cca876SEd Tanous * 464f8cca876SEd Tanous * @returns Message QueryParameterValueError formatted to JSON */ 465f8cca876SEd Tanous nlohmann::json queryParameterValueError(std::string_view arg1); 466f8cca876SEd Tanous 467f8cca876SEd Tanous void queryParameterValueError(crow::Response& res, std::string_view arg1); 468f8cca876SEd Tanous 469f8cca876SEd Tanous /** 470f8cca876SEd Tanous * @brief Formats QueryParameterOutOfRange message into JSON 471f8cca876SEd Tanous * Message body: "The value <arg1> for the query parameter <arg2> is out of 472f8cca876SEd Tanous * range <arg3>." 473f8cca876SEd Tanous * 474f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 475f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 476f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 477f8cca876SEd Tanous * 478f8cca876SEd Tanous * @returns Message QueryParameterOutOfRange formatted to JSON */ 479f8cca876SEd Tanous nlohmann::json queryParameterOutOfRange( 480f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 481f8cca876SEd Tanous 482f8cca876SEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1, 483f8cca876SEd Tanous std::string_view arg2, std::string_view arg3); 484f8cca876SEd Tanous 485f8cca876SEd Tanous /** 486f8cca876SEd Tanous * @brief Formats QueryNotSupportedOnResource message into JSON 487f8cca876SEd Tanous * Message body: "Querying is not supported on the requested resource." 488f8cca876SEd Tanous * 489f8cca876SEd Tanous * 490f8cca876SEd Tanous * @returns Message QueryNotSupportedOnResource formatted to JSON */ 491f8cca876SEd Tanous nlohmann::json queryNotSupportedOnResource(); 492f8cca876SEd Tanous 493f8cca876SEd Tanous void queryNotSupportedOnResource(crow::Response& res); 494f8cca876SEd Tanous 495f8cca876SEd Tanous /** 496f8cca876SEd Tanous * @brief Formats QueryNotSupportedOnOperation message into JSON 497f8cca876SEd Tanous * Message body: "Querying is not supported with the requested operation." 498f8cca876SEd Tanous * 499f8cca876SEd Tanous * 500f8cca876SEd Tanous * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 501f8cca876SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 502f8cca876SEd Tanous 503f8cca876SEd Tanous void queryNotSupportedOnOperation(crow::Response& res); 504f8cca876SEd Tanous 505f8cca876SEd Tanous /** 506f8cca876SEd Tanous * @brief Formats QueryNotSupported message into JSON 507f8cca876SEd Tanous * Message body: "Querying is not supported by the implementation." 508f8cca876SEd Tanous * 509f8cca876SEd Tanous * 510f8cca876SEd Tanous * @returns Message QueryNotSupported formatted to JSON */ 511f8cca876SEd Tanous nlohmann::json queryNotSupported(); 512f8cca876SEd Tanous 513f8cca876SEd Tanous void queryNotSupported(crow::Response& res); 514f8cca876SEd Tanous 515f8cca876SEd Tanous /** 516f8cca876SEd Tanous * @brief Formats QueryCombinationInvalid message into JSON 517f8cca876SEd Tanous * Message body: "Two or more query parameters in the request cannot be used 518f8cca876SEd Tanous * together." 519f8cca876SEd Tanous * 520f8cca876SEd Tanous * 521f8cca876SEd Tanous * @returns Message QueryCombinationInvalid formatted to JSON */ 522f8cca876SEd Tanous nlohmann::json queryCombinationInvalid(); 523f8cca876SEd Tanous 524f8cca876SEd Tanous void queryCombinationInvalid(crow::Response& res); 525f8cca876SEd Tanous 526f8cca876SEd Tanous /** 527f8cca876SEd Tanous * @brief Formats QueryParameterUnsupported message into JSON 528f8cca876SEd Tanous * Message body: "Query parameter <arg1> is not supported." 529f8cca876SEd Tanous * 530f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 531f8cca876SEd Tanous * 532f8cca876SEd Tanous * @returns Message QueryParameterUnsupported formatted to JSON */ 533f8cca876SEd Tanous nlohmann::json queryParameterUnsupported(std::string_view arg1); 534f8cca876SEd Tanous 535f8cca876SEd Tanous void queryParameterUnsupported(crow::Response& res, std::string_view arg1); 536f8cca876SEd Tanous 537f8cca876SEd Tanous /** 538f8cca876SEd Tanous * @brief Formats SessionLimitExceeded message into JSON 539f8cca876SEd Tanous * Message body: "The session establishment failed due to the number of 540f8cca876SEd Tanous * simultaneous sessions exceeding the limit of the implementation." 541f8cca876SEd Tanous * 542f8cca876SEd Tanous * 543f8cca876SEd Tanous * @returns Message SessionLimitExceeded formatted to JSON */ 544f8cca876SEd Tanous nlohmann::json sessionLimitExceeded(); 545f8cca876SEd Tanous 546f8cca876SEd Tanous void sessionLimitExceeded(crow::Response& res); 547f8cca876SEd Tanous 548f8cca876SEd Tanous /** 549f8cca876SEd Tanous * @brief Formats EventSubscriptionLimitExceeded message into JSON 550f8cca876SEd Tanous * Message body: "The event subscription failed due to the number of 551f8cca876SEd Tanous * simultaneous subscriptions exceeding the limit of the implementation." 552f8cca876SEd Tanous * 553f8cca876SEd Tanous * 554f8cca876SEd Tanous * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 555f8cca876SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 556f8cca876SEd Tanous 557f8cca876SEd Tanous void eventSubscriptionLimitExceeded(crow::Response& res); 558f8cca876SEd Tanous 559f8cca876SEd Tanous /** 560f8cca876SEd Tanous * @brief Formats ResourceCannotBeDeleted message into JSON 561f8cca876SEd Tanous * Message body: "The delete request failed because the resource requested 562f8cca876SEd Tanous * cannot be deleted." 563f8cca876SEd Tanous * 564f8cca876SEd Tanous * 565f8cca876SEd Tanous * @returns Message ResourceCannotBeDeleted formatted to JSON */ 566f8cca876SEd Tanous nlohmann::json resourceCannotBeDeleted(); 567f8cca876SEd Tanous 568f8cca876SEd Tanous void resourceCannotBeDeleted(crow::Response& res); 569f8cca876SEd Tanous 570f8cca876SEd Tanous /** 571f8cca876SEd Tanous * @brief Formats ResourceInUse message into JSON 572f8cca876SEd Tanous * Message body: "The change to the requested resource failed because the 573f8cca876SEd Tanous * resource is in use or in transition." 574f8cca876SEd Tanous * 575f8cca876SEd Tanous * 576f8cca876SEd Tanous * @returns Message ResourceInUse formatted to JSON */ 577f8cca876SEd Tanous nlohmann::json resourceInUse(); 578f8cca876SEd Tanous 579f8cca876SEd Tanous void resourceInUse(crow::Response& res); 580f8cca876SEd Tanous 581f8cca876SEd Tanous /** 582f8cca876SEd Tanous * @brief Formats ResourceAlreadyExists message into JSON 583f8cca876SEd Tanous * Message body: "The requested resource of type <arg1> with the property <arg2> 584f8cca876SEd Tanous * with the value <arg3> already exists." 585f8cca876SEd Tanous * 586f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 587f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 588f8cca876SEd Tanous * @param[in] arg3 Parameter of message that will replace %3 in its body. 589f8cca876SEd Tanous * 590f8cca876SEd Tanous * @returns Message ResourceAlreadyExists formatted to JSON */ 591f8cca876SEd Tanous nlohmann::json resourceAlreadyExists( 592f8cca876SEd Tanous std::string_view arg1, std::string_view arg2, std::string_view arg3); 593f8cca876SEd Tanous 594f8cca876SEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1, 595f8cca876SEd Tanous std::string_view arg2, std::string_view arg3); 596f8cca876SEd Tanous 597f8cca876SEd Tanous /** 598f8cca876SEd Tanous * @brief Formats ResourceNotFound message into JSON 599f8cca876SEd Tanous * Message body: "The requested resource of type <arg1> named <arg2> was not 600f8cca876SEd Tanous * found." 601f8cca876SEd Tanous * 602f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 603f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 604f8cca876SEd Tanous * 605f8cca876SEd Tanous * @returns Message ResourceNotFound formatted to JSON */ 606f8cca876SEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2); 607f8cca876SEd Tanous 608f8cca876SEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1, 609f8cca876SEd Tanous std::string_view arg2); 610f8cca876SEd Tanous 611f8cca876SEd Tanous /** 612f8cca876SEd Tanous * @brief Formats PayloadTooLarge message into JSON 613f8cca876SEd Tanous * Message body: "The supplied payload exceeds the maximum size supported by the 614f8cca876SEd Tanous * service." 615f8cca876SEd Tanous * 616f8cca876SEd Tanous * 617f8cca876SEd Tanous * @returns Message PayloadTooLarge formatted to JSON */ 618f8cca876SEd Tanous nlohmann::json payloadTooLarge(); 619f8cca876SEd Tanous 620f8cca876SEd Tanous void payloadTooLarge(crow::Response& res); 621f8cca876SEd Tanous 622f8cca876SEd Tanous /** 623f8cca876SEd Tanous * @brief Formats InsufficientStorage message into JSON 624f8cca876SEd Tanous * Message body: "Insufficient storage or memory available to complete the 625f8cca876SEd Tanous * request." 626f8cca876SEd Tanous * 627f8cca876SEd Tanous * 628f8cca876SEd Tanous * @returns Message InsufficientStorage formatted to JSON */ 629f8cca876SEd Tanous nlohmann::json insufficientStorage(); 630f8cca876SEd Tanous 631f8cca876SEd Tanous void insufficientStorage(crow::Response& res); 632f8cca876SEd Tanous 633f8cca876SEd Tanous /** 634f8cca876SEd Tanous * @brief Formats MissingOrMalformedPart message into JSON 635f8cca876SEd Tanous * Message body: "The multipart request contains malformed parts or is missing 636f8cca876SEd Tanous * required parts." 637f8cca876SEd Tanous * 638f8cca876SEd Tanous * 639f8cca876SEd Tanous * @returns Message MissingOrMalformedPart formatted to JSON */ 640f8cca876SEd Tanous nlohmann::json missingOrMalformedPart(); 641f8cca876SEd Tanous 642f8cca876SEd Tanous void missingOrMalformedPart(crow::Response& res); 643f8cca876SEd Tanous 644f8cca876SEd Tanous /** 645f8cca876SEd Tanous * @brief Formats InvalidURI message into JSON 646f8cca876SEd Tanous * Message body: "The URI <arg1> was not found." 647f8cca876SEd Tanous * 648f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 649f8cca876SEd Tanous * 650f8cca876SEd Tanous * @returns Message InvalidURI formatted to JSON */ 651f8cca876SEd Tanous nlohmann::json invalidURI(std::string_view arg1); 652f8cca876SEd Tanous 653f8cca876SEd Tanous void invalidURI(crow::Response& res, std::string_view arg1); 654f8cca876SEd Tanous 655f8cca876SEd Tanous /** 656f8cca876SEd Tanous * @brief Formats CreateFailedMissingReqProperties message into JSON 657f8cca876SEd Tanous * Message body: "The create operation failed because the required property 658f8cca876SEd Tanous * <arg1> was missing from the request." 659f8cca876SEd Tanous * 660f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 661f8cca876SEd Tanous * 662f8cca876SEd Tanous * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 663f8cca876SEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1); 664f8cca876SEd Tanous 665f8cca876SEd Tanous void createFailedMissingReqProperties(crow::Response& res, 666f8cca876SEd Tanous std::string_view arg1); 667f8cca876SEd Tanous 668f8cca876SEd Tanous /** 669f8cca876SEd Tanous * @brief Formats CreateLimitReachedForResource message into JSON 670f8cca876SEd Tanous * Message body: "The create operation failed because the resource has reached 671f8cca876SEd Tanous * the limit of possible resources." 672f8cca876SEd Tanous * 673f8cca876SEd Tanous * 674f8cca876SEd Tanous * @returns Message CreateLimitReachedForResource formatted to JSON */ 675f8cca876SEd Tanous nlohmann::json createLimitReachedForResource(); 676f8cca876SEd Tanous 677f8cca876SEd Tanous void createLimitReachedForResource(crow::Response& res); 678f8cca876SEd Tanous 679f8cca876SEd Tanous /** 680f8cca876SEd Tanous * @brief Formats ServiceShuttingDown message into JSON 681f8cca876SEd Tanous * Message body: "The operation failed because the service is shutting down and 682f8cca876SEd Tanous * can no longer take incoming requests." 683f8cca876SEd Tanous * 684f8cca876SEd Tanous * 685f8cca876SEd Tanous * @returns Message ServiceShuttingDown formatted to JSON */ 686f8cca876SEd Tanous nlohmann::json serviceShuttingDown(); 687f8cca876SEd Tanous 688f8cca876SEd Tanous void serviceShuttingDown(crow::Response& res); 689f8cca876SEd Tanous 690f8cca876SEd Tanous /** 691f8cca876SEd Tanous * @brief Formats ServiceInUnknownState message into JSON 692f8cca876SEd Tanous * Message body: "The operation failed because the service is in an unknown 693f8cca876SEd Tanous * state and can no longer take incoming requests." 694f8cca876SEd Tanous * 695f8cca876SEd Tanous * 696f8cca876SEd Tanous * @returns Message ServiceInUnknownState formatted to JSON */ 697f8cca876SEd Tanous nlohmann::json serviceInUnknownState(); 698f8cca876SEd Tanous 699f8cca876SEd Tanous void serviceInUnknownState(crow::Response& res); 700f8cca876SEd Tanous 701f8cca876SEd Tanous /** 702f8cca876SEd Tanous * @brief Formats NoValidSession message into JSON 703f8cca876SEd Tanous * Message body: "There is no valid session established with the 704f8cca876SEd Tanous * implementation." 705f8cca876SEd Tanous * 706f8cca876SEd Tanous * 707f8cca876SEd Tanous * @returns Message NoValidSession formatted to JSON */ 708f8cca876SEd Tanous nlohmann::json noValidSession(); 709f8cca876SEd Tanous 710f8cca876SEd Tanous void noValidSession(crow::Response& res); 711f8cca876SEd Tanous 712f8cca876SEd Tanous /** 713f8cca876SEd Tanous * @brief Formats InsufficientPrivilege message into JSON 714f8cca876SEd Tanous * Message body: "There are insufficient privileges for the account or 715f8cca876SEd Tanous * credentials associated with the current session to perform the requested 716f8cca876SEd Tanous * operation." 717f8cca876SEd Tanous * 718f8cca876SEd Tanous * 719f8cca876SEd Tanous * @returns Message InsufficientPrivilege formatted to JSON */ 720f8cca876SEd Tanous nlohmann::json insufficientPrivilege(); 721f8cca876SEd Tanous 722f8cca876SEd Tanous void insufficientPrivilege(crow::Response& res); 723f8cca876SEd Tanous 724f8cca876SEd Tanous /** 725f8cca876SEd Tanous * @brief Formats AccountModified message into JSON 726f8cca876SEd Tanous * Message body: "The account was successfully modified." 727f8cca876SEd Tanous * 728f8cca876SEd Tanous * 729f8cca876SEd Tanous * @returns Message AccountModified formatted to JSON */ 730f8cca876SEd Tanous nlohmann::json accountModified(); 731f8cca876SEd Tanous 732f8cca876SEd Tanous void accountModified(crow::Response& res); 733f8cca876SEd Tanous 734f8cca876SEd Tanous /** 735f8cca876SEd Tanous * @brief Formats AccountNotModified message into JSON 736f8cca876SEd Tanous * Message body: "The account modification request failed." 737f8cca876SEd Tanous * 738f8cca876SEd Tanous * 739f8cca876SEd Tanous * @returns Message AccountNotModified formatted to JSON */ 740f8cca876SEd Tanous nlohmann::json accountNotModified(); 741f8cca876SEd Tanous 742f8cca876SEd Tanous void accountNotModified(crow::Response& res); 743f8cca876SEd Tanous 744f8cca876SEd Tanous /** 745f8cca876SEd Tanous * @brief Formats AccountRemoved message into JSON 746f8cca876SEd Tanous * Message body: "The account was successfully removed." 747f8cca876SEd Tanous * 748f8cca876SEd Tanous * 749f8cca876SEd Tanous * @returns Message AccountRemoved formatted to JSON */ 750f8cca876SEd Tanous nlohmann::json accountRemoved(); 751f8cca876SEd Tanous 752f8cca876SEd Tanous void accountRemoved(crow::Response& res); 753f8cca876SEd Tanous 754f8cca876SEd Tanous /** 755f8cca876SEd Tanous * @brief Formats AccountForSessionNoLongerExists message into JSON 756f8cca876SEd Tanous * Message body: "The account for the current session was removed, and so the 757f8cca876SEd Tanous * current session was removed as well." 758f8cca876SEd Tanous * 759f8cca876SEd Tanous * 760f8cca876SEd Tanous * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 761f8cca876SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 762f8cca876SEd Tanous 763f8cca876SEd Tanous void accountForSessionNoLongerExists(crow::Response& res); 764f8cca876SEd Tanous 765f8cca876SEd Tanous /** 766f8cca876SEd Tanous * @brief Formats InvalidObject message into JSON 767f8cca876SEd Tanous * Message body: "The object at <arg1> is invalid." 768f8cca876SEd Tanous * 769f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 770f8cca876SEd Tanous * 771f8cca876SEd Tanous * @returns Message InvalidObject formatted to JSON */ 772f8cca876SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view_base& arg1); 773f8cca876SEd Tanous 774f8cca876SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1); 775f8cca876SEd Tanous 776f8cca876SEd Tanous /** 777f8cca876SEd Tanous * @brief Formats InternalError message into JSON 778f8cca876SEd Tanous * Message body: "The request failed due to an internal service error. The 779f8cca876SEd Tanous * service is still operational." 780f8cca876SEd Tanous * 781f8cca876SEd Tanous * 782f8cca876SEd Tanous * @returns Message InternalError formatted to JSON */ 783f8cca876SEd Tanous nlohmann::json internalError(); 784f8cca876SEd Tanous 785f8cca876SEd Tanous void internalError(crow::Response& res, std::source_location location = 786f8cca876SEd Tanous std::source_location::current()); 787f8cca876SEd Tanous 788f8cca876SEd Tanous /** 789f8cca876SEd Tanous * @brief Formats UnrecognizedRequestBody message into JSON 790f8cca876SEd Tanous * Message body: "The service detected a malformed request body that it was 791f8cca876SEd Tanous * unable to interpret." 792f8cca876SEd Tanous * 793f8cca876SEd Tanous * 794f8cca876SEd Tanous * @returns Message UnrecognizedRequestBody formatted to JSON */ 795f8cca876SEd Tanous nlohmann::json unrecognizedRequestBody(); 796f8cca876SEd Tanous 797f8cca876SEd Tanous void unrecognizedRequestBody(crow::Response& res); 798f8cca876SEd Tanous 799f8cca876SEd Tanous /** 800f8cca876SEd Tanous * @brief Formats ResourceMissingAtURI message into JSON 801f8cca876SEd Tanous * Message body: "The resource at the URI <arg1> was not found." 802f8cca876SEd Tanous * 803f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 804f8cca876SEd Tanous * 805f8cca876SEd Tanous * @returns Message ResourceMissingAtURI formatted to JSON */ 806f8cca876SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1); 807f8cca876SEd Tanous 808f8cca876SEd Tanous void resourceMissingAtURI(crow::Response& res, 809f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 810f8cca876SEd Tanous 811f8cca876SEd Tanous /** 812f8cca876SEd Tanous * @brief Formats ResourceAtUriInUnknownFormat message into JSON 813f8cca876SEd Tanous * Message body: "The resource at <arg1> is in a format not recognized by the 814f8cca876SEd Tanous * service." 815f8cca876SEd Tanous * 816f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 817f8cca876SEd Tanous * 818f8cca876SEd Tanous * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 819f8cca876SEd Tanous nlohmann::json 820f8cca876SEd Tanous resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1); 821f8cca876SEd Tanous 822f8cca876SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 823f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 824f8cca876SEd Tanous 825f8cca876SEd Tanous /** 826f8cca876SEd Tanous * @brief Formats ResourceAtUriUnauthorized message into JSON 827f8cca876SEd Tanous * Message body: "While accessing the resource at <arg1>, the service received 828f8cca876SEd Tanous * an authorization error <arg2>." 829f8cca876SEd Tanous * 830f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 831f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 832f8cca876SEd Tanous * 833f8cca876SEd Tanous * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 834f8cca876SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1, 835f8cca876SEd Tanous std::string_view arg2); 836f8cca876SEd Tanous 837f8cca876SEd Tanous void resourceAtUriUnauthorized(crow::Response& res, 838f8cca876SEd Tanous const boost::urls::url_view_base& arg1, 839f8cca876SEd Tanous std::string_view arg2); 840f8cca876SEd Tanous 841f8cca876SEd Tanous /** 842f8cca876SEd Tanous * @brief Formats CouldNotEstablishConnection message into JSON 843f8cca876SEd Tanous * Message body: "The service failed to establish a connection with the URI 844f8cca876SEd Tanous * <arg1>." 845f8cca876SEd Tanous * 846f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 847f8cca876SEd Tanous * 848f8cca876SEd Tanous * @returns Message CouldNotEstablishConnection formatted to JSON */ 849f8cca876SEd Tanous nlohmann::json 850f8cca876SEd Tanous couldNotEstablishConnection(const boost::urls::url_view_base& arg1); 851f8cca876SEd Tanous 852f8cca876SEd Tanous void couldNotEstablishConnection(crow::Response& res, 853f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 854f8cca876SEd Tanous 855f8cca876SEd Tanous /** 856f8cca876SEd Tanous * @brief Formats SourceDoesNotSupportProtocol message into JSON 857f8cca876SEd Tanous * Message body: "The other end of the connection at <arg1> does not support the 858f8cca876SEd Tanous * specified protocol <arg2>." 859f8cca876SEd Tanous * 860f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 861f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 862f8cca876SEd Tanous * 863f8cca876SEd Tanous * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 864f8cca876SEd Tanous nlohmann::json sourceDoesNotSupportProtocol( 865f8cca876SEd Tanous const boost::urls::url_view_base& arg1, std::string_view arg2); 866f8cca876SEd Tanous 867f8cca876SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 868f8cca876SEd Tanous const boost::urls::url_view_base& arg1, 869f8cca876SEd Tanous std::string_view arg2); 870f8cca876SEd Tanous 871f8cca876SEd Tanous /** 872f8cca876SEd Tanous * @brief Formats AccessDenied message into JSON 873f8cca876SEd Tanous * Message body: "While attempting to establish a connection to <arg1>, the 874f8cca876SEd Tanous * service denied access." 875f8cca876SEd Tanous * 876f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 877f8cca876SEd Tanous * 878f8cca876SEd Tanous * @returns Message AccessDenied formatted to JSON */ 879f8cca876SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view_base& arg1); 880f8cca876SEd Tanous 881f8cca876SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1); 882f8cca876SEd Tanous 883f8cca876SEd Tanous /** 884f8cca876SEd Tanous * @brief Formats ServiceTemporarilyUnavailable message into JSON 885f8cca876SEd Tanous * Message body: "The service is temporarily unavailable. Retry in <arg1> 886f8cca876SEd Tanous * seconds." 887f8cca876SEd Tanous * 888f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 889f8cca876SEd Tanous * 890f8cca876SEd Tanous * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 891f8cca876SEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1); 892f8cca876SEd Tanous 893f8cca876SEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1); 894f8cca876SEd Tanous 895f8cca876SEd Tanous /** 896f8cca876SEd Tanous * @brief Formats InvalidIndex message into JSON 897f8cca876SEd Tanous * Message body: "The index <arg1> is not a valid offset into the array." 898f8cca876SEd Tanous * 899f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 900f8cca876SEd Tanous * 901f8cca876SEd Tanous * @returns Message InvalidIndex formatted to JSON */ 902*644cdcb8SEd Tanous nlohmann::json invalidIndex(uint64_t arg1); 903f8cca876SEd Tanous 904*644cdcb8SEd Tanous void invalidIndex(crow::Response& res, uint64_t arg1); 905f8cca876SEd Tanous 906f8cca876SEd Tanous /** 907f8cca876SEd Tanous * @brief Formats PropertyValueModified message into JSON 908f8cca876SEd Tanous * Message body: "The property <arg1> was assigned the value <arg2> due to 909f8cca876SEd Tanous * modification by the service." 910f8cca876SEd Tanous * 911f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 912f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 913f8cca876SEd Tanous * 914f8cca876SEd Tanous * @returns Message PropertyValueModified formatted to JSON */ 915f8cca876SEd Tanous nlohmann::json propertyValueModified(std::string_view arg1, 916f8cca876SEd Tanous const nlohmann::json& arg2); 917f8cca876SEd Tanous 918f8cca876SEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1, 919f8cca876SEd Tanous const nlohmann::json& arg2); 920f8cca876SEd Tanous 921f8cca876SEd Tanous /** 922f8cca876SEd Tanous * @brief Formats ResourceInStandby message into JSON 923f8cca876SEd Tanous * Message body: "The request could not be performed because the resource is in 924f8cca876SEd Tanous * standby." 925f8cca876SEd Tanous * 926f8cca876SEd Tanous * 927f8cca876SEd Tanous * @returns Message ResourceInStandby formatted to JSON */ 928f8cca876SEd Tanous nlohmann::json resourceInStandby(); 929f8cca876SEd Tanous 930f8cca876SEd Tanous void resourceInStandby(crow::Response& res); 931f8cca876SEd Tanous 932f8cca876SEd Tanous /** 933f8cca876SEd Tanous * @brief Formats ResourceExhaustion message into JSON 934f8cca876SEd Tanous * Message body: "The resource <arg1> was unable to satisfy the request due to 935f8cca876SEd Tanous * unavailability of resources." 936f8cca876SEd Tanous * 937f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 938f8cca876SEd Tanous * 939f8cca876SEd Tanous * @returns Message ResourceExhaustion formatted to JSON */ 940f8cca876SEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1); 941f8cca876SEd Tanous 942f8cca876SEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1); 943f8cca876SEd Tanous 944f8cca876SEd Tanous /** 945f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 94666ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 947f4c4dcf4SKowalski, Kamil * 948f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 949f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 950f4c4dcf4SKowalski, Kamil * 951f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 952*644cdcb8SEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, uint64_t arg2); 953b5c07418SJames Feist 954*644cdcb8SEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, 955*644cdcb8SEd Tanous uint64_t arg2); 956f4c4dcf4SKowalski, Kamil 957f4c4dcf4SKowalski, Kamil /** 958f8cca876SEd Tanous * @brief Formats StringValueTooShort message into JSON 959f8cca876SEd Tanous * Message body: "The string <arg1> was under the minimum required length 960f8cca876SEd Tanous * <arg2>." 961f8cca876SEd Tanous * 962f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 963f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 964f8cca876SEd Tanous * 965f8cca876SEd Tanous * @returns Message StringValueTooShort formatted to JSON */ 966f8cca876SEd Tanous nlohmann::json stringValueTooShort(std::string_view arg1, 967f8cca876SEd Tanous std::string_view arg2); 968f8cca876SEd Tanous 969f8cca876SEd Tanous void stringValueTooShort(crow::Response& res, std::string_view arg1, 970f8cca876SEd Tanous std::string_view arg2); 971f8cca876SEd Tanous 972f8cca876SEd Tanous /** 973cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 974cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 975cc9139ecSJason M. Bills * 976cc9139ecSJason M. Bills * 977cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 97865176d39SEd Tanous nlohmann::json sessionTerminated(); 979b5c07418SJames Feist 980cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 981cc9139ecSJason M. Bills 982cc9139ecSJason M. Bills /** 983684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 98442079ecbSEd Tanous * Message body: "The event subscription was terminated." 985684bb4b8SJason M. Bills * 986684bb4b8SJason M. Bills * 987684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 98865176d39SEd Tanous nlohmann::json subscriptionTerminated(); 989684bb4b8SJason M. Bills 990684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 991684bb4b8SJason M. Bills 992684bb4b8SJason M. Bills /** 993cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 994cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 99542079ecbSEd Tanous * with the @odata.type of the resource, which is <arg2>." 996cc9139ecSJason M. Bills * 997cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 998cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 999cc9139ecSJason M. Bills * 1000cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 10011668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1, 10021668ce6dSEd Tanous std::string_view arg2); 1003b5c07418SJames Feist 10041668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1, 10051668ce6dSEd Tanous std::string_view arg2); 1006cc9139ecSJason M. Bills 1007cc9139ecSJason M. Bills /** 1008f8cca876SEd Tanous * @brief Formats PasswordChangeRequired message into JSON 1009f8cca876SEd Tanous * Message body: "The password provided for this account must be changed before 1010f8cca876SEd Tanous * access is granted. PATCH the Password property for this account located at 1011f8cca876SEd Tanous * the target URI <arg1> to complete this process." 1012f8cca876SEd Tanous * 1013f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1014f8cca876SEd Tanous * 1015f8cca876SEd Tanous * @returns Message PasswordChangeRequired formatted to JSON */ 1016f8cca876SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1); 1017f8cca876SEd Tanous 1018f8cca876SEd Tanous void passwordChangeRequired(crow::Response& res, 1019f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 1020f8cca876SEd Tanous 1021f8cca876SEd Tanous /** 1022684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 102342079ecbSEd Tanous * Message body: "In order to apply changes, recover from errors, or complete 102442079ecbSEd Tanous * the operation, a component reset is required with the Reset action URI <arg1> 102542079ecbSEd Tanous * and ResetType <arg2>." 1026684bb4b8SJason M. Bills * 1027684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1028684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1029684bb4b8SJason M. Bills * 1030684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 10314a7fbefdSEd Tanous nlohmann::json resetRequired(const boost::urls::url_view_base& arg1, 10324a7fbefdSEd Tanous std::string_view arg2); 1033684bb4b8SJason M. Bills 10344a7fbefdSEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view_base& arg1, 10351668ce6dSEd Tanous std::string_view arg2); 1036684bb4b8SJason M. Bills 1037684bb4b8SJason M. Bills /** 1038f8cca876SEd Tanous * @brief Formats ResetRecommended message into JSON 1039f8cca876SEd Tanous * Message body: "In order to recover from errors, a component reset is 1040f8cca876SEd Tanous * recommended with the Reset action URI <arg1> and ResetType <arg2>." 1041f8cca876SEd Tanous * 1042f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1043f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 1044f8cca876SEd Tanous * 1045f8cca876SEd Tanous * @returns Message ResetRecommended formatted to JSON */ 1046f8cca876SEd Tanous nlohmann::json resetRecommended(std::string_view arg1, std::string_view arg2); 1047f8cca876SEd Tanous 1048f8cca876SEd Tanous void resetRecommended(crow::Response& res, std::string_view arg1, 1049f8cca876SEd Tanous std::string_view arg2); 1050f8cca876SEd Tanous 1051f8cca876SEd Tanous /** 1052684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 105342079ecbSEd Tanous * Message body: "The chassis with Id <arg1> is required to be powered on to 1054684bb4b8SJason M. Bills * perform this request." 1055684bb4b8SJason M. Bills * 1056684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1057684bb4b8SJason M. Bills * 1058684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 10591668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1); 1060684bb4b8SJason M. Bills 10611668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1); 1062684bb4b8SJason M. Bills 1063684bb4b8SJason M. Bills /** 1064684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 106542079ecbSEd Tanous * Message body: "The chassis with Id <arg1> is required to be powered off to 1066684bb4b8SJason M. Bills * perform this request." 1067684bb4b8SJason M. Bills * 1068684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1069684bb4b8SJason M. Bills * 1070684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 10711668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1); 1072684bb4b8SJason M. Bills 10731668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1); 1074684bb4b8SJason M. Bills 1075684bb4b8SJason M. Bills /** 1076684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 107742079ecbSEd Tanous * Message body: "The property <arg1> could not be written because its value 107842079ecbSEd Tanous * would conflict with the value of the <arg2> property." 1079684bb4b8SJason M. Bills * 1080684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1081684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1082684bb4b8SJason M. Bills * 1083684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 10841668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1, 10851668ce6dSEd Tanous std::string_view arg2); 1086684bb4b8SJason M. Bills 10871668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1, 10881668ce6dSEd Tanous std::string_view arg2); 1089684bb4b8SJason M. Bills 1090684bb4b8SJason M. Bills /** 10912a6af81cSRamesh Iyyar * @brief Formats PropertyValueResourceConflict message into JSON 109242079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 109342079ecbSEd Tanous * not be written because the value conflicts with the state or configuration of 109442079ecbSEd Tanous * the resource at <arg3>." 10952a6af81cSRamesh Iyyar * 10962a6af81cSRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 10972a6af81cSRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 10982a6af81cSRamesh Iyyar * @param[in] arg3 Parameter of message that will replace %3 in its body. 10992a6af81cSRamesh Iyyar * 110042079ecbSEd Tanous * @returns Message PropertyValueResourceConflict formatted to JSON */ 1101bd79bce8SPatrick Williams nlohmann::json propertyValueResourceConflict( 1102bd79bce8SPatrick Williams std::string_view arg1, const nlohmann::json& arg2, 11034a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 11042a6af81cSRamesh Iyyar 11052a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1, 110695b3ad73SEd Tanous const nlohmann::json& arg2, 11074a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 11082a6af81cSRamesh Iyyar 11092a6af81cSRamesh Iyyar /** 111024861a28SRamesh Iyyar * @brief Formats PropertyValueExternalConflict message into JSON 111142079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 111242079ecbSEd Tanous * not be written because the value is not available due to a configuration 111324861a28SRamesh Iyyar * conflict." 111424861a28SRamesh Iyyar * 111524861a28SRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 111624861a28SRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 111724861a28SRamesh Iyyar * 111824861a28SRamesh Iyyar * @returns Message PropertyValueExternalConflict formatted to JSON */ 111924861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1, 112095b3ad73SEd Tanous const nlohmann::json& arg2); 112124861a28SRamesh Iyyar 112224861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, 112395b3ad73SEd Tanous const nlohmann::json& arg2); 112424861a28SRamesh Iyyar 112524861a28SRamesh Iyyar /** 1126684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 112742079ecbSEd Tanous * Message body: "The property <arg1> with the requested value of <arg2> could 112842079ecbSEd Tanous * not be written because the value does not meet the constraints of the 1129684bb4b8SJason M. Bills * implementation." 1130684bb4b8SJason M. Bills * 1131684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1132684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 1133684bb4b8SJason M. Bills * 1134684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 1135367b3dceSGinu George nlohmann::json propertyValueIncorrect(std::string_view arg1, 1136367b3dceSGinu George const nlohmann::json& arg2); 1137684bb4b8SJason M. Bills 1138367b3dceSGinu George void propertyValueIncorrect(crow::Response& res, std::string_view arg1, 1139367b3dceSGinu George const nlohmann::json& arg2); 1140684bb4b8SJason M. Bills 1141684bb4b8SJason M. Bills /** 1142684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 1143684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 114442079ecbSEd Tanous * at URI <arg1> that conflicts with the creation request." 1145684bb4b8SJason M. Bills * 1146684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 1147684bb4b8SJason M. Bills * 1148684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 11494a7fbefdSEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1); 1150684bb4b8SJason M. Bills 11514a7fbefdSEd Tanous void resourceCreationConflict(crow::Response& res, 11524a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 1153684bb4b8SJason M. Bills 1154684bb4b8SJason M. Bills /** 1155f8cca876SEd Tanous * @brief Formats ActionParameterValueConflict message into JSON 1156f8cca876SEd Tanous * Message body: "The parameter <arg1> with the requested value of <arg2> does 1157f8cca876SEd Tanous * not meet the constraints of the implementation." 1158f8cca876SEd Tanous * 1159f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1160f8cca876SEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 1161f8cca876SEd Tanous * 1162f8cca876SEd Tanous * @returns Message ActionParameterValueConflict formatted to JSON */ 1163f8cca876SEd Tanous nlohmann::json 1164f8cca876SEd Tanous actionParameterValueConflict(std::string_view arg1, std::string_view arg2); 1165f8cca876SEd Tanous 1166f8cca876SEd Tanous void actionParameterValueConflict(crow::Response& res, std::string_view arg1, 1167f8cca876SEd Tanous std::string_view arg2); 1168f8cca876SEd Tanous 1169f8cca876SEd Tanous /** 1170684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 1171684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 1172684bb4b8SJason M. Bills * 1173684bb4b8SJason M. Bills * 1174684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 117565176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 1176684bb4b8SJason M. Bills 1177684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 1178684bb4b8SJason M. Bills 1179684bb4b8SJason M. Bills /** 1180684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 1181684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 1182684bb4b8SJason M. Bills * this resource." 1183684bb4b8SJason M. Bills * 1184684bb4b8SJason M. Bills * 1185684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 118665176d39SEd Tanous nlohmann::json preconditionFailed(); 1187684bb4b8SJason M. Bills 1188684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 1189684bb4b8SJason M. Bills 1190684bb4b8SJason M. Bills /** 1191684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 1192684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 1193684bb4b8SJason M. Bills * resource." 1194684bb4b8SJason M. Bills * 1195684bb4b8SJason M. Bills * 1196684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 119765176d39SEd Tanous nlohmann::json preconditionRequired(); 1198684bb4b8SJason M. Bills 1199684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 1200684bb4b8SJason M. Bills 1201684bb4b8SJason M. Bills /** 1202f8cca876SEd Tanous * @brief Formats HeaderMissing message into JSON 1203f8cca876SEd Tanous * Message body: "Required header <arg1> is missing in the request." 1204f8cca876SEd Tanous * 1205f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1206f8cca876SEd Tanous * 1207f8cca876SEd Tanous * @returns Message HeaderMissing formatted to JSON */ 1208f8cca876SEd Tanous nlohmann::json headerMissing(std::string_view arg1); 1209f8cca876SEd Tanous 1210f8cca876SEd Tanous void headerMissing(crow::Response& res, std::string_view arg1); 1211f8cca876SEd Tanous 1212f8cca876SEd Tanous /** 1213f8cca876SEd Tanous * @brief Formats HeaderInvalid message into JSON 1214f8cca876SEd Tanous * Message body: "Header <arg1> is invalid." 1215f8cca876SEd Tanous * 1216f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1217f8cca876SEd Tanous * 1218f8cca876SEd Tanous * @returns Message HeaderInvalid formatted to JSON */ 1219f8cca876SEd Tanous nlohmann::json headerInvalid(std::string_view arg1); 1220f8cca876SEd Tanous 1221f8cca876SEd Tanous void headerInvalid(crow::Response& res, std::string_view arg1); 1222f8cca876SEd Tanous 1223f8cca876SEd Tanous /** 1224684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 1225684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 1226684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 1227684bb4b8SJason M. Bills * 1228684bb4b8SJason M. Bills * 1229684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 123065176d39SEd Tanous nlohmann::json operationFailed(); 1231684bb4b8SJason M. Bills 1232684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 1233684bb4b8SJason M. Bills 1234684bb4b8SJason M. Bills /** 1235684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 12368ece0e45SEd Tanous * Message body: "A timeout internal to the service occurred as part of the 1237684bb4b8SJason M. Bills * request. Partial results may have been returned." 1238684bb4b8SJason M. Bills * 1239684bb4b8SJason M. Bills * 1240684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 124165176d39SEd Tanous nlohmann::json operationTimeout(); 1242684bb4b8SJason M. Bills 1243684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 1244684bb4b8SJason M. Bills 1245684bb4b8SJason M. Bills /** 124644c70412SEd Tanous * @brief Formats OperationNotAllowed message into JSON 124742079ecbSEd Tanous * Message body: "The HTTP method is not allowed on this resource." 124842079ecbSEd Tanous * 124942079ecbSEd Tanous * 125044c70412SEd Tanous * @returns Message OperationNotAllowed formatted to JSON */ 125144c70412SEd Tanous nlohmann::json operationNotAllowed(); 125244c70412SEd Tanous 125344c70412SEd Tanous void operationNotAllowed(crow::Response& res); 125444c70412SEd Tanous 1255600af5f1SAppaRao Puli /** 125642079ecbSEd Tanous * @brief Formats UndeterminedFault message into JSON 125742079ecbSEd Tanous * Message body: "An undetermined fault condition was reported by <arg1>." 125842079ecbSEd Tanous * 125942079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 126042079ecbSEd Tanous * 126142079ecbSEd Tanous * @returns Message UndeterminedFault formatted to JSON */ 126242079ecbSEd Tanous nlohmann::json undeterminedFault(std::string_view arg1); 126342079ecbSEd Tanous 126442079ecbSEd Tanous void undeterminedFault(crow::Response& res, std::string_view arg1); 126542079ecbSEd Tanous 126642079ecbSEd Tanous /** 126742079ecbSEd Tanous * @brief Formats ConditionInRelatedResource message into JSON 126842079ecbSEd Tanous * Message body: "One or more conditions exist in a related resource. See the 126942079ecbSEd Tanous * OriginOfCondition property." 127042079ecbSEd Tanous * 127142079ecbSEd Tanous * 127242079ecbSEd Tanous * @returns Message ConditionInRelatedResource formatted to JSON */ 127342079ecbSEd Tanous nlohmann::json conditionInRelatedResource(); 127442079ecbSEd Tanous 127542079ecbSEd Tanous void conditionInRelatedResource(crow::Response& res); 127642079ecbSEd Tanous 127742079ecbSEd Tanous /** 127842079ecbSEd Tanous * @brief Formats RestrictedRole message into JSON 127942079ecbSEd Tanous * Message body: "The operation was not successful because the role <arg1> is 128042079ecbSEd Tanous * restricted." 128142079ecbSEd Tanous * 128242079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 128342079ecbSEd Tanous * 128442079ecbSEd Tanous * @returns Message RestrictedRole formatted to JSON */ 128542079ecbSEd Tanous nlohmann::json restrictedRole(std::string_view arg1); 128642079ecbSEd Tanous 128742079ecbSEd Tanous void restrictedRole(crow::Response& res, std::string_view arg1); 128842079ecbSEd Tanous 128942079ecbSEd Tanous /** 129042079ecbSEd Tanous * @brief Formats RestrictedPrivilege message into JSON 129142079ecbSEd Tanous * Message body: "The operation was not successful because the privilege <arg1> 129242079ecbSEd Tanous * is restricted." 129342079ecbSEd Tanous * 129442079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 129542079ecbSEd Tanous * 129642079ecbSEd Tanous * @returns Message RestrictedPrivilege formatted to JSON */ 129742079ecbSEd Tanous nlohmann::json restrictedPrivilege(std::string_view arg1); 129842079ecbSEd Tanous 129942079ecbSEd Tanous void restrictedPrivilege(crow::Response& res, std::string_view arg1); 130042079ecbSEd Tanous 130142079ecbSEd Tanous /** 1302f8cca876SEd Tanous * @brief Formats StrictAccountTypes message into JSON 1303f8cca876SEd Tanous * Message body: "The request could not be fulfilled with the account types 1304f8cca876SEd Tanous * included in property <arg1> because the property StrictAccountTypes is set to 1305f8cca876SEd Tanous * true." 1306f8cca876SEd Tanous * 1307f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1308f8cca876SEd Tanous * 1309f8cca876SEd Tanous * @returns Message StrictAccountTypes formatted to JSON */ 1310f8cca876SEd Tanous nlohmann::json strictAccountTypes(std::string_view arg1); 1311f8cca876SEd Tanous 1312f8cca876SEd Tanous void strictAccountTypes(crow::Response& res, std::string_view arg1); 1313f8cca876SEd Tanous 1314f8cca876SEd Tanous /** 131542079ecbSEd Tanous * @brief Formats PropertyDeprecated message into JSON 131642079ecbSEd Tanous * Message body: "The deprecated property <arg1> was included in the request 131742079ecbSEd Tanous * body." 131842079ecbSEd Tanous * 131942079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 132042079ecbSEd Tanous * 132142079ecbSEd Tanous * @returns Message PropertyDeprecated formatted to JSON */ 132242079ecbSEd Tanous nlohmann::json propertyDeprecated(std::string_view arg1); 132342079ecbSEd Tanous 132442079ecbSEd Tanous void propertyDeprecated(crow::Response& res, std::string_view arg1); 132542079ecbSEd Tanous 132642079ecbSEd Tanous /** 132742079ecbSEd Tanous * @brief Formats ResourceDeprecated message into JSON 132842079ecbSEd Tanous * Message body: "The operation was performed on a deprecated resource <arg1>." 132942079ecbSEd Tanous * 133042079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 133142079ecbSEd Tanous * 133242079ecbSEd Tanous * @returns Message ResourceDeprecated formatted to JSON */ 133342079ecbSEd Tanous nlohmann::json resourceDeprecated(std::string_view arg1); 133442079ecbSEd Tanous 133542079ecbSEd Tanous void resourceDeprecated(crow::Response& res, std::string_view arg1); 133642079ecbSEd Tanous 133742079ecbSEd Tanous /** 133842079ecbSEd Tanous * @brief Formats PropertyValueDeprecated message into JSON 133942079ecbSEd Tanous * Message body: "The value <arg1> for the property <arg2> is deprecated." 134042079ecbSEd Tanous * 134142079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 134242079ecbSEd Tanous * @param[in] arg2 Parameter of message that will replace %2 in its body. 134342079ecbSEd Tanous * 134442079ecbSEd Tanous * @returns Message PropertyValueDeprecated formatted to JSON */ 134542079ecbSEd Tanous nlohmann::json propertyValueDeprecated(std::string_view arg1, 134642079ecbSEd Tanous std::string_view arg2); 134742079ecbSEd Tanous 134842079ecbSEd Tanous void propertyValueDeprecated(crow::Response& res, std::string_view arg1, 134942079ecbSEd Tanous std::string_view arg2); 135042079ecbSEd Tanous 135142079ecbSEd Tanous /** 135242079ecbSEd Tanous * @brief Formats ActionDeprecated message into JSON 135342079ecbSEd Tanous * Message body: "The action <arg1> is deprecated." 135442079ecbSEd Tanous * 135542079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 135642079ecbSEd Tanous * 135742079ecbSEd Tanous * @returns Message ActionDeprecated formatted to JSON */ 135842079ecbSEd Tanous nlohmann::json actionDeprecated(std::string_view arg1); 135942079ecbSEd Tanous 136042079ecbSEd Tanous void actionDeprecated(crow::Response& res, std::string_view arg1); 136142079ecbSEd Tanous 136242079ecbSEd Tanous /** 136342079ecbSEd Tanous * @brief Formats NetworkNameResolutionNotConfigured message into JSON 136442079ecbSEd Tanous * Message body: "Network name resolution is not configured on this service." 136542079ecbSEd Tanous * 136642079ecbSEd Tanous * 136742079ecbSEd Tanous * @returns Message NetworkNameResolutionNotConfigured formatted to JSON */ 136842079ecbSEd Tanous nlohmann::json networkNameResolutionNotConfigured(); 136942079ecbSEd Tanous 137042079ecbSEd Tanous void networkNameResolutionNotConfigured(crow::Response& res); 137142079ecbSEd Tanous 137242079ecbSEd Tanous /** 137342079ecbSEd Tanous * @brief Formats NetworkNameResolutionNotSupported message into JSON 137442079ecbSEd Tanous * Message body: "Resolution of network-based names is not supported by this 137542079ecbSEd Tanous * service." 137642079ecbSEd Tanous * 137742079ecbSEd Tanous * 137842079ecbSEd Tanous * @returns Message NetworkNameResolutionNotSupported formatted to JSON */ 137942079ecbSEd Tanous nlohmann::json networkNameResolutionNotSupported(); 138042079ecbSEd Tanous 138142079ecbSEd Tanous void networkNameResolutionNotSupported(crow::Response& res); 138242079ecbSEd Tanous 138342079ecbSEd Tanous /** 1384f8cca876SEd Tanous * @brief Formats ServiceDisabled message into JSON 1385f8cca876SEd Tanous * Message body: "The operation failed because the service at <arg1> is disabled 1386f8cca876SEd Tanous * and cannot accept requests." 1387f8cca876SEd Tanous * 1388f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1389f8cca876SEd Tanous * 1390f8cca876SEd Tanous * @returns Message ServiceDisabled formatted to JSON */ 1391f8cca876SEd Tanous nlohmann::json serviceDisabled(std::string_view arg1); 1392f8cca876SEd Tanous 1393f8cca876SEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1); 1394f8cca876SEd Tanous 1395f8cca876SEd Tanous /** 1396f8cca876SEd Tanous * @brief Formats EventBufferExceeded message into JSON 1397f8cca876SEd Tanous * Message body: "Undelivered events may have been lost due to exceeding the 1398f8cca876SEd Tanous * event buffer." 1399f8cca876SEd Tanous * 1400f8cca876SEd Tanous * 1401f8cca876SEd Tanous * @returns Message EventBufferExceeded formatted to JSON */ 1402f8cca876SEd Tanous nlohmann::json eventBufferExceeded(); 1403f8cca876SEd Tanous 1404f8cca876SEd Tanous void eventBufferExceeded(crow::Response& res); 1405f8cca876SEd Tanous 1406f8cca876SEd Tanous /** 140742079ecbSEd Tanous * @brief Formats AuthenticationTokenRequired message into JSON 140842079ecbSEd Tanous * Message body: "The request could not be performed because an authentication 140942079ecbSEd Tanous * token was not provided." 141042079ecbSEd Tanous * 141142079ecbSEd Tanous * 141242079ecbSEd Tanous * @returns Message AuthenticationTokenRequired formatted to JSON */ 141342079ecbSEd Tanous nlohmann::json authenticationTokenRequired(); 141442079ecbSEd Tanous 141542079ecbSEd Tanous void authenticationTokenRequired(crow::Response& res); 141642079ecbSEd Tanous 141742079ecbSEd Tanous /** 141842079ecbSEd Tanous * @brief Formats OneTimePasscodeSent message into JSON 141942079ecbSEd Tanous * Message body: "A one-time passcode was sent to: <arg1>. Supply the passcode 142042079ecbSEd Tanous * as the `Token` property in the request to create a session." 142142079ecbSEd Tanous * 142242079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 142342079ecbSEd Tanous * 142442079ecbSEd Tanous * @returns Message OneTimePasscodeSent formatted to JSON */ 142542079ecbSEd Tanous nlohmann::json oneTimePasscodeSent(std::string_view arg1); 142642079ecbSEd Tanous 142742079ecbSEd Tanous void oneTimePasscodeSent(crow::Response& res, std::string_view arg1); 142842079ecbSEd Tanous 142942079ecbSEd Tanous /** 143042079ecbSEd Tanous * @brief Formats LicenseRequired message into JSON 143142079ecbSEd Tanous * Message body: "A license is required for this operation: <arg1>." 143242079ecbSEd Tanous * 143342079ecbSEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 143442079ecbSEd Tanous * 143542079ecbSEd Tanous * @returns Message LicenseRequired formatted to JSON */ 143642079ecbSEd Tanous nlohmann::json licenseRequired(std::string_view arg1); 143742079ecbSEd Tanous 143842079ecbSEd Tanous void licenseRequired(crow::Response& res, std::string_view arg1); 143942079ecbSEd Tanous 144042079ecbSEd Tanous /** 144142079ecbSEd Tanous * @brief Formats PropertyModified message into JSON 144242079ecbSEd Tanous * Message body: "One or more properties were successfully modified." 144342079ecbSEd Tanous * 144442079ecbSEd Tanous * 144542079ecbSEd Tanous * @returns Message PropertyModified formatted to JSON */ 144642079ecbSEd Tanous nlohmann::json propertyModified(); 144742079ecbSEd Tanous 144842079ecbSEd Tanous void propertyModified(crow::Response& res); 144942079ecbSEd Tanous 1450f8cca876SEd Tanous /** 1451f8cca876SEd Tanous * @brief Formats GenerateSecretKeyRequired message into JSON 1452f8cca876SEd Tanous * Message body: "The Time-based One-Time Password (TOTP) secret key for this 1453f8cca876SEd Tanous * account must be generated before access is granted. Perform the 1454f8cca876SEd Tanous * GenerateSecretKey action at URI <arg1> and retain the secret key from the 1455f8cca876SEd Tanous * response." 1456f8cca876SEd Tanous * 1457f8cca876SEd Tanous * @param[in] arg1 Parameter of message that will replace %1 in its body. 1458f8cca876SEd Tanous * 1459f8cca876SEd Tanous * @returns Message GenerateSecretKeyRequired formatted to JSON */ 1460f8cca876SEd Tanous nlohmann::json 1461f8cca876SEd Tanous generateSecretKeyRequired(const boost::urls::url_view_base& arg1); 1462f8cca876SEd Tanous 1463f8cca876SEd Tanous void generateSecretKeyRequired(crow::Response& res, 1464f8cca876SEd Tanous const boost::urls::url_view_base& arg1); 1465f8cca876SEd Tanous 146642079ecbSEd Tanous } // namespace messages 1467f4c4dcf4SKowalski, Kamil } // namespace redfish 1468