1f4c4dcf4SKowalski, Kamil /* 2f4c4dcf4SKowalski, Kamil // Copyright (c) 2018 Intel Corporation 3f4c4dcf4SKowalski, Kamil // 4f4c4dcf4SKowalski, Kamil // Licensed under the Apache License, Version 2.0 (the "License"); 5f4c4dcf4SKowalski, Kamil // you may not use this file except in compliance with the License. 6f4c4dcf4SKowalski, Kamil // You may obtain a copy of the License at 7f4c4dcf4SKowalski, Kamil // 8f4c4dcf4SKowalski, Kamil // http://www.apache.org/licenses/LICENSE-2.0 9f4c4dcf4SKowalski, Kamil // 10f4c4dcf4SKowalski, Kamil // Unless required by applicable law or agreed to in writing, software 11f4c4dcf4SKowalski, Kamil // distributed under the License is distributed on an "AS IS" BASIS, 12f4c4dcf4SKowalski, Kamil // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13f4c4dcf4SKowalski, Kamil // See the License for the specific language governing permissions and 14f4c4dcf4SKowalski, Kamil // limitations under the License. 15f4c4dcf4SKowalski, Kamil */ 16f4c4dcf4SKowalski, Kamil #pragma once 170442ef92SNan Zhou 1804e438cbSEd Tanous #include "http_response.hpp" 190442ef92SNan Zhou #include "source_location.hpp" 20f12894f8SJason M. Bills 2102fea7a7SEd Tanous #include <boost/url/url_view.hpp> 221214b7e7SGunnar Mills #include <nlohmann/json.hpp> 231214b7e7SGunnar Mills 240442ef92SNan Zhou #include <cstdint> 259ea15c35SEd Tanous #include <string> 260442ef92SNan Zhou #include <string_view> 270442ef92SNan Zhou 280442ef92SNan Zhou // IWYU pragma: no_include <cstdint.h> 290442ef92SNan Zhou // IWYU pragma: no_forward_declare crow::Response 309ea15c35SEd Tanous 311abe55efSEd Tanous namespace redfish 321abe55efSEd Tanous { 33f4c4dcf4SKowalski, Kamil 341abe55efSEd Tanous namespace messages 351abe55efSEd Tanous { 36f4c4dcf4SKowalski, Kamil 3781856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0."; 3855c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo"; 39f4c4dcf4SKowalski, Kamil 40f4c4dcf4SKowalski, Kamil /** 413590bd1dSNan Zhou * @brief Moves all error messages from the |source| JSON to |target| 423590bd1dSNan Zhou */ 433590bd1dSNan Zhou void moveErrorsToErrorJson(nlohmann::json& target, nlohmann::json& source); 443590bd1dSNan Zhou 453590bd1dSNan Zhou /** 46f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInUse message into JSON 47f4c4dcf4SKowalski, Kamil * Message body: "The change to the requested resource failed because the 48f4c4dcf4SKowalski, Kamil * resource is in use or in transition." 49f4c4dcf4SKowalski, Kamil * 50f4c4dcf4SKowalski, Kamil * 51f4c4dcf4SKowalski, Kamil * @returns Message ResourceInUse formatted to JSON */ 5265176d39SEd Tanous nlohmann::json resourceInUse(); 53b5c07418SJames Feist 54f12894f8SJason M. Bills void resourceInUse(crow::Response& res); 55f4c4dcf4SKowalski, Kamil 56f4c4dcf4SKowalski, Kamil /** 57f4c4dcf4SKowalski, Kamil * @brief Formats MalformedJSON message into JSON 58f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted was malformed JSON and could not be 59f4c4dcf4SKowalski, Kamil * parsed by the receiving service." 60f4c4dcf4SKowalski, Kamil * 61f4c4dcf4SKowalski, Kamil * 62f4c4dcf4SKowalski, Kamil * @returns Message MalformedJSON formatted to JSON */ 6365176d39SEd Tanous nlohmann::json malformedJSON(); 64b5c07418SJames Feist 65f12894f8SJason M. Bills void malformedJSON(crow::Response& res); 66f4c4dcf4SKowalski, Kamil 67f4c4dcf4SKowalski, Kamil /** 68f4c4dcf4SKowalski, Kamil * @brief Formats ResourceMissingAtURI message into JSON 6966ac2b8cSJason M. Bills * Message body: "The resource at the URI <arg1> was not found." 70f4c4dcf4SKowalski, Kamil * 71f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 72f4c4dcf4SKowalski, Kamil * 73f4c4dcf4SKowalski, Kamil * @returns Message ResourceMissingAtURI formatted to JSON */ 74d9f466b3SEd Tanous nlohmann::json resourceMissingAtURI(boost::urls::url_view arg1); 75b5c07418SJames Feist 76d9f466b3SEd Tanous void resourceMissingAtURI(crow::Response& res, boost::urls::url_view arg1); 77f4c4dcf4SKowalski, Kamil 78f4c4dcf4SKowalski, Kamil /** 79f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueFormatError message into JSON 8066ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 81f4c4dcf4SKowalski, Kamil * is of a different format than the parameter can accept." 82f4c4dcf4SKowalski, Kamil * 83f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 84f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 85f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 86f4c4dcf4SKowalski, Kamil * 87f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueFormatError formatted to JSON */ 881668ce6dSEd Tanous nlohmann::json actionParameterValueFormatError(std::string_view arg1, 891668ce6dSEd Tanous std::string_view arg2, 901668ce6dSEd Tanous std::string_view arg3); 91b5c07418SJames Feist 921668ce6dSEd Tanous void actionParameterValueFormatError(crow::Response& res, std::string_view arg1, 931668ce6dSEd Tanous std::string_view arg2, 941668ce6dSEd Tanous std::string_view arg3); 95f4c4dcf4SKowalski, Kamil 96f4c4dcf4SKowalski, Kamil /** 974ef82a15SAlex Schendel * @brief Formats ActionParameterValueNotInList message into JSON 984ef82a15SAlex Schendel * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 994ef82a15SAlex Schendel * is not in the list of acceptable values." 1004ef82a15SAlex Schendel * 1014ef82a15SAlex Schendel * @param[in] arg1 Parameter of message that will replace %1 in its body. 1024ef82a15SAlex Schendel * @param[in] arg2 Parameter of message that will replace %2 in its body. 1034ef82a15SAlex Schendel * @param[in] arg3 Parameter of message that will replace %3 in its body. 1044ef82a15SAlex Schendel * 1054ef82a15SAlex Schendel * @returns Message ActionParameterValueFormatError formatted to JSON */ 1064ef82a15SAlex Schendel nlohmann::json actionParameterValueNotInList(std::string_view arg1, 1074ef82a15SAlex Schendel std::string_view arg2, 1084ef82a15SAlex Schendel std::string_view arg3); 1094ef82a15SAlex Schendel 1104ef82a15SAlex Schendel void actionParameterValueNotInList(crow::Response& res, std::string_view arg1, 1114ef82a15SAlex Schendel std::string_view arg2, 1124ef82a15SAlex Schendel std::string_view arg3); 1134ef82a15SAlex Schendel 1144ef82a15SAlex Schendel /** 115f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 116f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 117f4c4dcf4SKowalski, Kamil * service is still operational." 118f4c4dcf4SKowalski, Kamil * 119f4c4dcf4SKowalski, Kamil * 120f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 12165176d39SEd Tanous nlohmann::json internalError(); 122b5c07418SJames Feist 1239eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location = 124df5415fcSEd Tanous bmcweb::source_location::current()); 125f12894f8SJason M. Bills 126f12894f8SJason M. Bills /** 127f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 128f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 129f4c4dcf4SKowalski, Kamil * unable to interpret." 130f4c4dcf4SKowalski, Kamil * 131f4c4dcf4SKowalski, Kamil * 132f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 13365176d39SEd Tanous nlohmann::json unrecognizedRequestBody(); 134b5c07418SJames Feist 135f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 136f4c4dcf4SKowalski, Kamil 137f4c4dcf4SKowalski, Kamil /** 138f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 13966ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 14066ac2b8cSJason M. Bills * an authorization error <arg2>." 141f4c4dcf4SKowalski, Kamil * 142f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 143f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 144f4c4dcf4SKowalski, Kamil * 145f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 146d9f466b3SEd Tanous nlohmann::json resourceAtUriUnauthorized(boost::urls::url_view arg1, 1471668ce6dSEd Tanous std::string_view arg2); 148b5c07418SJames Feist 149d9f466b3SEd Tanous void resourceAtUriUnauthorized(crow::Response& res, boost::urls::url_view arg1, 1501668ce6dSEd Tanous std::string_view arg2); 151f4c4dcf4SKowalski, Kamil 152f4c4dcf4SKowalski, Kamil /** 153f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 15466ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 15566ac2b8cSJason M. Bills * <arg2>." 156f4c4dcf4SKowalski, Kamil * 157f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 158f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 159f4c4dcf4SKowalski, Kamil * 160f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 1611668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1, 1621668ce6dSEd Tanous std::string_view arg2); 163b5c07418SJames Feist 1641668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1, 1651668ce6dSEd Tanous std::string_view arg2); 166f4c4dcf4SKowalski, Kamil 167f4c4dcf4SKowalski, Kamil /** 168f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 169f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 170f4c4dcf4SKowalski, Kamil * cannot be deleted." 171f4c4dcf4SKowalski, Kamil * 172f4c4dcf4SKowalski, Kamil * 173f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 17465176d39SEd Tanous nlohmann::json resourceCannotBeDeleted(); 175b5c07418SJames Feist 176f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 177f4c4dcf4SKowalski, Kamil 178f4c4dcf4SKowalski, Kamil /** 179f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 18066ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 181f4c4dcf4SKowalski, Kamil * 182f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 183f4c4dcf4SKowalski, Kamil * 184f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 1851668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1); 186b5c07418SJames Feist 1871668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1); 188f4c4dcf4SKowalski, Kamil 189f4c4dcf4SKowalski, Kamil /** 190f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 19166ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 192f4c4dcf4SKowalski, Kamil * seconds." 193f4c4dcf4SKowalski, Kamil * 194f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 195f4c4dcf4SKowalski, Kamil * 196f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 1971668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1); 198b5c07418SJames Feist 1991668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1); 200f4c4dcf4SKowalski, Kamil 201f4c4dcf4SKowalski, Kamil /** 202f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 20366ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 20466ac2b8cSJason M. Bills * with the value <arg3> already exists." 205f4c4dcf4SKowalski, Kamil * 206f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 207f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 208f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 209f4c4dcf4SKowalski, Kamil * 210f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 2111668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1, 2121668ce6dSEd Tanous std::string_view arg2, 2131668ce6dSEd Tanous std::string_view arg3); 214b5c07418SJames Feist 2151668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1, 2161668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 217f4c4dcf4SKowalski, Kamil 218f4c4dcf4SKowalski, Kamil /** 219f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 220f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 221f4c4dcf4SKowalski, Kamil * current session has been removed as well." 222f4c4dcf4SKowalski, Kamil * 223f4c4dcf4SKowalski, Kamil * 224f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 22565176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 226b5c07418SJames Feist 227f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 228f4c4dcf4SKowalski, Kamil 229f4c4dcf4SKowalski, Kamil /** 230f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 231f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 23266ac2b8cSJason M. Bills * <arg1> was missing from the request." 233f4c4dcf4SKowalski, Kamil * 234f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 235f4c4dcf4SKowalski, Kamil * 236f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 2371668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1); 238b5c07418SJames Feist 239f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 2401668ce6dSEd Tanous std::string_view arg1); 241f4c4dcf4SKowalski, Kamil 242f4c4dcf4SKowalski, Kamil /** 243f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 24466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 245f4c4dcf4SKowalski, Kamil * format than the property can accept." 246f4c4dcf4SKowalski, Kamil * 247f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 248f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 249f4c4dcf4SKowalski, Kamil * 250f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 2511668ce6dSEd Tanous nlohmann::json propertyValueFormatError(std::string_view arg1, 2521668ce6dSEd Tanous std::string_view arg2); 253b5c07418SJames Feist 2541668ce6dSEd Tanous void propertyValueFormatError(crow::Response& res, std::string_view arg1, 2551668ce6dSEd Tanous std::string_view arg2); 256f4c4dcf4SKowalski, Kamil 257f4c4dcf4SKowalski, Kamil /** 258f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 25966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 260f4c4dcf4SKowalski, Kamil * acceptable values." 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 PropertyValueNotInList formatted to JSON */ 2661668ce6dSEd Tanous nlohmann::json propertyValueNotInList(std::string_view arg1, 2671668ce6dSEd Tanous std::string_view arg2); 268b5c07418SJames Feist 2691668ce6dSEd Tanous void propertyValueNotInList(crow::Response& res, std::string_view arg1, 2701668ce6dSEd Tanous std::string_view arg2); 271f4c4dcf4SKowalski, Kamil 272f4c4dcf4SKowalski, Kamil /** 273227a2b0aSJiaqing Zhao * @brief Formats PropertyValueOutOfRange message into JSON 274227a2b0aSJiaqing Zhao * Message body: "The value '%1' for the property %2 is not in the supported 275227a2b0aSJiaqing Zhao * range of acceptable values." 276227a2b0aSJiaqing Zhao * 277227a2b0aSJiaqing Zhao * @param[in] arg1 Parameter of message that will replace %1 in its body. 278227a2b0aSJiaqing Zhao * @param[in] arg2 Parameter of message that will replace %2 in its body. 279227a2b0aSJiaqing Zhao * 280227a2b0aSJiaqing Zhao * @returns Message PropertyValueExternalConflict formatted to JSON */ 281227a2b0aSJiaqing Zhao nlohmann::json propertyValueOutOfRange(std::string_view arg1, 282227a2b0aSJiaqing Zhao std::string_view arg2); 283227a2b0aSJiaqing Zhao 284227a2b0aSJiaqing Zhao void propertyValueOutOfRange(crow::Response& res, std::string_view arg1, 285227a2b0aSJiaqing Zhao std::string_view arg2); 286227a2b0aSJiaqing Zhao 287227a2b0aSJiaqing Zhao /** 288f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 28966ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 290f4c4dcf4SKowalski, Kamil * service." 291f4c4dcf4SKowalski, Kamil * 292f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 293f4c4dcf4SKowalski, Kamil * 294f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 295d9f466b3SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(boost::urls::url_view arg1); 296b5c07418SJames Feist 297ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 298d9f466b3SEd Tanous boost::urls::url_view arg1); 299f4c4dcf4SKowalski, Kamil 300f4c4dcf4SKowalski, Kamil /** 30181856681SAsmitha Karunanithi * @brief Formats ServiceDisabled message into JSON 30281856681SAsmitha Karunanithi * Message body: "The operation failed because the service at <arg1> is disabled 30381856681SAsmitha Karunanithi * and " cannot accept requests." 30481856681SAsmitha Karunanithi * 30581856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 30681856681SAsmitha Karunanithi * 30781856681SAsmitha Karunanithi * @returns Message ServiceDisabled formatted to JSON */ 3081668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1); 30981856681SAsmitha Karunanithi 3101668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1); 31181856681SAsmitha Karunanithi 31281856681SAsmitha Karunanithi /** 313f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 314f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 315f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 316f4c4dcf4SKowalski, Kamil * 317f4c4dcf4SKowalski, Kamil * 318f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 31965176d39SEd Tanous nlohmann::json serviceInUnknownState(); 320b5c07418SJames Feist 321f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 322f4c4dcf4SKowalski, Kamil 323f4c4dcf4SKowalski, Kamil /** 324f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 325f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 326f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 327f4c4dcf4SKowalski, Kamil * 328f4c4dcf4SKowalski, Kamil * 329f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 33065176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 331b5c07418SJames Feist 332f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 333f4c4dcf4SKowalski, Kamil 334f4c4dcf4SKowalski, Kamil /** 335f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 33666ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 337f4c4dcf4SKowalski, Kamil * in the request body." 338f4c4dcf4SKowalski, Kamil * 339f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 340f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 341f4c4dcf4SKowalski, Kamil * 342f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 3431668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1, 3441668ce6dSEd Tanous std::string_view arg2); 345b5c07418SJames Feist 3461668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1, 3471668ce6dSEd Tanous std::string_view arg2); 348f4c4dcf4SKowalski, Kamil 349f4c4dcf4SKowalski, Kamil /** 350f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 35166ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 352f4c4dcf4SKowalski, Kamil * 353f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 354f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 355f4c4dcf4SKowalski, Kamil * 356f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 3571668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2); 358b5c07418SJames Feist 3591668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2); 360f4c4dcf4SKowalski, Kamil 361f4c4dcf4SKowalski, Kamil /** 362cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 363cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 364cc9139ecSJason M. Bills * 365cc9139ecSJason M. Bills * 366cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 36765176d39SEd Tanous nlohmann::json sessionTerminated(); 368b5c07418SJames Feist 369cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 370cc9139ecSJason M. Bills 371cc9139ecSJason M. Bills /** 372684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 373684bb4b8SJason M. Bills * Message body: "The event subscription has been terminated." 374684bb4b8SJason M. Bills * 375684bb4b8SJason M. Bills * 376684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 37765176d39SEd Tanous nlohmann::json subscriptionTerminated(); 378684bb4b8SJason M. Bills 379684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 380684bb4b8SJason M. Bills 381684bb4b8SJason M. Bills /** 382cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 383cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 384cc9139ecSJason M. Bills * with the @odata.type of the resource which is <arg2>." 385cc9139ecSJason M. Bills * 386cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 387cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 388cc9139ecSJason M. Bills * 389cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 3901668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1, 3911668ce6dSEd Tanous std::string_view arg2); 392b5c07418SJames Feist 3931668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1, 3941668ce6dSEd Tanous std::string_view arg2); 395cc9139ecSJason M. Bills 396cc9139ecSJason M. Bills /** 397684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 398684bb4b8SJason M. Bills * Message body: "In order to complete the operation, a component reset is 399684bb4b8SJason M. Bills * required with the Reset action URI '<arg1>' and ResetType '<arg2>'." 400684bb4b8SJason M. Bills * 401684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 402684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 403684bb4b8SJason M. Bills * 404684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 405d9f466b3SEd Tanous nlohmann::json resetRequired(boost::urls::url_view arg1, std::string_view arg2); 406684bb4b8SJason M. Bills 407d9f466b3SEd Tanous void resetRequired(crow::Response& res, boost::urls::url_view arg1, 4081668ce6dSEd Tanous std::string_view arg2); 409684bb4b8SJason M. Bills 410684bb4b8SJason M. Bills /** 411684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 412684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered on to 413684bb4b8SJason M. Bills * perform this request." 414684bb4b8SJason M. Bills * 415684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 416684bb4b8SJason M. Bills * 417684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 4181668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1); 419684bb4b8SJason M. Bills 4201668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1); 421684bb4b8SJason M. Bills 422684bb4b8SJason M. Bills /** 423684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 424684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered off to 425684bb4b8SJason M. Bills * perform this request." 426684bb4b8SJason M. Bills * 427684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 428684bb4b8SJason M. Bills * 429684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 4301668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1); 431684bb4b8SJason M. Bills 4321668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1); 433684bb4b8SJason M. Bills 434684bb4b8SJason M. Bills /** 435684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 436684bb4b8SJason M. Bills * Message body: "The property '<arg1>' could not be written because its value 437684bb4b8SJason M. Bills * would conflict with the value of the '<arg2>' property." 438684bb4b8SJason M. Bills * 439684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 440684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 441684bb4b8SJason M. Bills * 442684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 4431668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1, 4441668ce6dSEd Tanous std::string_view arg2); 445684bb4b8SJason M. Bills 4461668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1, 4471668ce6dSEd Tanous std::string_view arg2); 448684bb4b8SJason M. Bills 449684bb4b8SJason M. Bills /** 4502a6af81cSRamesh Iyyar * @brief Formats PropertyValueResourceConflict message into JSON 4512a6af81cSRamesh Iyyar * Message body: "The property '%1' with the requested value of '%2' could 4522a6af81cSRamesh Iyyar * not be written because the value conflicts with the state or configuration 4532a6af81cSRamesh Iyyar * of the resource at '%3'." 4542a6af81cSRamesh Iyyar * 4552a6af81cSRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 4562a6af81cSRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 4572a6af81cSRamesh Iyyar * @param[in] arg3 Parameter of message that will replace %3 in its body. 4582a6af81cSRamesh Iyyar * 4592a6af81cSRamesh Iyyar * @returns Message PropertyValueResourceConflict to JSON */ 4602a6af81cSRamesh Iyyar nlohmann::json propertyValueResourceConflict(std::string_view arg1, 4612a6af81cSRamesh Iyyar std::string_view arg2, 462d9f466b3SEd Tanous boost::urls::url_view arg3); 4632a6af81cSRamesh Iyyar 4642a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1, 4652a6af81cSRamesh Iyyar std::string_view arg2, 466d9f466b3SEd Tanous boost::urls::url_view arg3); 4672a6af81cSRamesh Iyyar 4682a6af81cSRamesh Iyyar /** 46924861a28SRamesh Iyyar * @brief Formats PropertyValueExternalConflict message into JSON 47024861a28SRamesh Iyyar * Message body: "The property '%1' with the requested value of '%2' could not 47124861a28SRamesh Iyyar * be written because the value is not available due to a configuration 47224861a28SRamesh Iyyar * conflict." 47324861a28SRamesh Iyyar * 47424861a28SRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 47524861a28SRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 47624861a28SRamesh Iyyar * 47724861a28SRamesh Iyyar * @returns Message PropertyValueExternalConflict formatted to JSON */ 47824861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1, 47924861a28SRamesh Iyyar std::string_view arg2); 48024861a28SRamesh Iyyar 48124861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, 48224861a28SRamesh Iyyar std::string_view arg2); 48324861a28SRamesh Iyyar 48424861a28SRamesh Iyyar /** 485684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 486684bb4b8SJason M. Bills * Message body: "The property '<arg1>' with the requested value of '<arg2>' 487684bb4b8SJason M. Bills * could not be written because the value does not meet the constraints of the 488684bb4b8SJason M. Bills * implementation." 489684bb4b8SJason M. Bills * 490684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 491684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 492684bb4b8SJason M. Bills * 493684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 4941668ce6dSEd Tanous nlohmann::json propertyValueIncorrect(std::string_view arg1, 4951668ce6dSEd Tanous std::string_view arg2); 496684bb4b8SJason M. Bills 4971668ce6dSEd Tanous void propertyValueIncorrect(crow::Response& res, std::string_view arg1, 4981668ce6dSEd Tanous std::string_view arg2); 499684bb4b8SJason M. Bills 500684bb4b8SJason M. Bills /** 501684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 502684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 503684bb4b8SJason M. Bills * at URI '<arg1>' that conflicts with the creation request." 504684bb4b8SJason M. Bills * 505684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 506684bb4b8SJason M. Bills * 507684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 508d9f466b3SEd Tanous nlohmann::json resourceCreationConflict(boost::urls::url_view arg1); 509684bb4b8SJason M. Bills 510d9f466b3SEd Tanous void resourceCreationConflict(crow::Response& res, boost::urls::url_view arg1); 511684bb4b8SJason M. Bills 512684bb4b8SJason M. Bills /** 513684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 514684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 515684bb4b8SJason M. Bills * 516684bb4b8SJason M. Bills * 517684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 51865176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 519684bb4b8SJason M. Bills 520684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 521684bb4b8SJason M. Bills 522684bb4b8SJason M. Bills /** 523684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 524684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 525684bb4b8SJason M. Bills * this resource." 526684bb4b8SJason M. Bills * 527684bb4b8SJason M. Bills * 528684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 52965176d39SEd Tanous nlohmann::json preconditionFailed(); 530684bb4b8SJason M. Bills 531684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 532684bb4b8SJason M. Bills 533684bb4b8SJason M. Bills /** 534684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 535684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 536684bb4b8SJason M. Bills * resource." 537684bb4b8SJason M. Bills * 538684bb4b8SJason M. Bills * 539684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 54065176d39SEd Tanous nlohmann::json preconditionRequired(); 541684bb4b8SJason M. Bills 542684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 543684bb4b8SJason M. Bills 544684bb4b8SJason M. Bills /** 545684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 546684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 547684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 548684bb4b8SJason M. Bills * 549684bb4b8SJason M. Bills * 550684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 55165176d39SEd Tanous nlohmann::json operationFailed(); 552684bb4b8SJason M. Bills 553684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 554684bb4b8SJason M. Bills 555684bb4b8SJason M. Bills /** 556684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 557684bb4b8SJason M. Bills * Message body: "A timeout internal to the service occured as part of the 558684bb4b8SJason M. Bills * request. Partial results may have been returned." 559684bb4b8SJason M. Bills * 560684bb4b8SJason M. Bills * 561684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 56265176d39SEd Tanous nlohmann::json operationTimeout(); 563684bb4b8SJason M. Bills 564684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 565684bb4b8SJason M. Bills 566684bb4b8SJason M. Bills /** 567f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 56866ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 569f4c4dcf4SKowalski, Kamil * type than the property can accept." 570f4c4dcf4SKowalski, Kamil * 571f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 572f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 573f4c4dcf4SKowalski, Kamil * 574f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 5751668ce6dSEd Tanous nlohmann::json propertyValueTypeError(std::string_view arg1, 5761668ce6dSEd Tanous std::string_view arg2); 577b5c07418SJames Feist 5781668ce6dSEd Tanous void propertyValueTypeError(crow::Response& res, std::string_view arg1, 5791668ce6dSEd Tanous std::string_view arg2); 580f4c4dcf4SKowalski, Kamil 581f4c4dcf4SKowalski, Kamil /** 582f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 58366ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 584f4c4dcf4SKowalski, Kamil * found." 585f4c4dcf4SKowalski, Kamil * 586f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 587f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 588f4c4dcf4SKowalski, Kamil * 589f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 5901668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2); 591b5c07418SJames Feist 5921668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1, 5931668ce6dSEd Tanous std::string_view arg2); 594f4c4dcf4SKowalski, Kamil 595f4c4dcf4SKowalski, Kamil /** 596f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 59755c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 59866ac2b8cSJason M. Bills * <arg1>." 599f4c4dcf4SKowalski, Kamil * 600f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 601f4c4dcf4SKowalski, Kamil * 602f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 603d9f466b3SEd Tanous nlohmann::json couldNotEstablishConnection(boost::urls::url_view arg1); 604b5c07418SJames Feist 605ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res, 606d9f466b3SEd Tanous boost::urls::url_view arg1); 607f4c4dcf4SKowalski, Kamil 608f4c4dcf4SKowalski, Kamil /** 609f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 61066ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 611f4c4dcf4SKowalski, Kamil * assigned a value." 612f4c4dcf4SKowalski, Kamil * 613f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 614f4c4dcf4SKowalski, Kamil * 615f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 6161668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1); 617b5c07418SJames Feist 6181668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1); 619f12894f8SJason M. Bills 620f12894f8SJason M. Bills /** 621f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 62266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 623f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 624f4c4dcf4SKowalski, Kamil * 625f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 626f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 627f4c4dcf4SKowalski, Kamil * 628f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 6291668ce6dSEd Tanous nlohmann::json queryParameterValueTypeError(std::string_view arg1, 6301668ce6dSEd Tanous std::string_view arg2); 631b5c07418SJames Feist 6321668ce6dSEd Tanous void queryParameterValueTypeError(crow::Response& res, std::string_view arg1, 6331668ce6dSEd Tanous std::string_view arg2); 634f4c4dcf4SKowalski, Kamil 635f4c4dcf4SKowalski, Kamil /** 636f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 637f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 638f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 639f4c4dcf4SKowalski, Kamil * 640f4c4dcf4SKowalski, Kamil * 641f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 64265176d39SEd Tanous nlohmann::json serviceShuttingDown(); 643b5c07418SJames Feist 644f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 645f4c4dcf4SKowalski, Kamil 646f4c4dcf4SKowalski, Kamil /** 647f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 64866ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 64966ac2b8cSJason M. Bills * the parameter <arg2>." 650f4c4dcf4SKowalski, Kamil * 651f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 652f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 653f4c4dcf4SKowalski, Kamil * 654f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 6551668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1, 6561668ce6dSEd Tanous std::string_view arg2); 657b5c07418SJames Feist 6581668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1, 6591668ce6dSEd Tanous std::string_view arg2); 660f4c4dcf4SKowalski, Kamil 661f4c4dcf4SKowalski, Kamil /** 662f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 66366ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 664f4c4dcf4SKowalski, Kamil * the target resource." 665f4c4dcf4SKowalski, Kamil * 666f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 667f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 668f4c4dcf4SKowalski, Kamil * 669f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 6701668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1, 6711668ce6dSEd Tanous std::string_view arg2); 672b5c07418SJames Feist 6731668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1, 6741668ce6dSEd Tanous std::string_view arg2); 675f4c4dcf4SKowalski, Kamil 676f4c4dcf4SKowalski, Kamil /** 677f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 67866ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 67966ac2b8cSJason M. Bills * specified protocol <arg2>." 680f4c4dcf4SKowalski, Kamil * 681f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 682f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 683f4c4dcf4SKowalski, Kamil * 684f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 685d9f466b3SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(boost::urls::url_view arg1, 6861668ce6dSEd Tanous std::string_view arg2); 687b5c07418SJames Feist 688ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 689d9f466b3SEd Tanous boost::urls::url_view arg1, 6901668ce6dSEd Tanous std::string_view arg2); 691f4c4dcf4SKowalski, Kamil 692f4c4dcf4SKowalski, Kamil /** 693b4ad4c05SShantappa Teekappanavar * @brief Formats StrictAccountTypes message into JSON 694b4ad4c05SShantappa Teekappanavar * Message body: Indicates the request failed because a set of `AccountTypes` or 695b4ad4c05SShantappa Teekappanavar * `OEMAccountTypes` was not accepted while `StrictAccountTypes` is set to `true 696b4ad4c05SShantappa Teekappanavar * @param[in] arg1 Parameter of message that will replace %1 in its body. 697b4ad4c05SShantappa Teekappanavar * 698b4ad4c05SShantappa Teekappanavar * @returns Message StrictAccountTypes formatted to JSON */ 699b4ad4c05SShantappa Teekappanavar nlohmann::json strictAccountTypes(std::string_view arg1); 700b4ad4c05SShantappa Teekappanavar 701b4ad4c05SShantappa Teekappanavar void strictAccountTypes(crow::Response& res, std::string_view arg1); 702b4ad4c05SShantappa Teekappanavar 703b4ad4c05SShantappa Teekappanavar /** 704f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 705f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 706f4c4dcf4SKowalski, Kamil * 707f4c4dcf4SKowalski, Kamil * 708f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 70965176d39SEd Tanous nlohmann::json accountRemoved(); 710b5c07418SJames Feist 711f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 712f4c4dcf4SKowalski, Kamil 713f4c4dcf4SKowalski, Kamil /** 714f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 71566ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 716f4c4dcf4SKowalski, Kamil * service denied access." 717f4c4dcf4SKowalski, Kamil * 718f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 719f4c4dcf4SKowalski, Kamil * 720f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 721d9f466b3SEd Tanous nlohmann::json accessDenied(boost::urls::url_view arg1); 722b5c07418SJames Feist 723d9f466b3SEd Tanous void accessDenied(crow::Response& res, boost::urls::url_view arg1); 724f4c4dcf4SKowalski, Kamil 725f4c4dcf4SKowalski, Kamil /** 726f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 727f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 728f4c4dcf4SKowalski, Kamil * 729f4c4dcf4SKowalski, Kamil * 730f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 73165176d39SEd Tanous nlohmann::json queryNotSupported(); 732b5c07418SJames Feist 733f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 734f4c4dcf4SKowalski, Kamil 735f4c4dcf4SKowalski, Kamil /** 736f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 737f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 738f4c4dcf4SKowalski, Kamil * the limit of possible resources." 739f4c4dcf4SKowalski, Kamil * 740f4c4dcf4SKowalski, Kamil * 741f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 74265176d39SEd Tanous nlohmann::json createLimitReachedForResource(); 743b5c07418SJames Feist 744f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 745f4c4dcf4SKowalski, Kamil 746f4c4dcf4SKowalski, Kamil /** 747f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 748f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 749f4c4dcf4SKowalski, Kamil * information." 750f4c4dcf4SKowalski, Kamil * 751f4c4dcf4SKowalski, Kamil * 752f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 75365176d39SEd Tanous nlohmann::json generalError(); 754b5c07418SJames Feist 755f12894f8SJason M. Bills void generalError(crow::Response& res); 756f4c4dcf4SKowalski, Kamil 757f4c4dcf4SKowalski, Kamil /** 758f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 759f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 760f4c4dcf4SKowalski, Kamil * 761f4c4dcf4SKowalski, Kamil * 762f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 76365176d39SEd Tanous nlohmann::json success(); 764b5c07418SJames Feist 765f12894f8SJason M. Bills void success(crow::Response& res); 766f12894f8SJason M. Bills 767f12894f8SJason M. Bills /** 768f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 769f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 770f4c4dcf4SKowalski, Kamil * 771f4c4dcf4SKowalski, Kamil * 772f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 77365176d39SEd Tanous nlohmann::json created(); 774b5c07418SJames Feist 775f12894f8SJason M. Bills void created(crow::Response& res); 776f4c4dcf4SKowalski, Kamil 777f4c4dcf4SKowalski, Kamil /** 778cc9139ecSJason M. Bills * @brief Formats NoOperation message into JSON 779cc9139ecSJason M. Bills * Message body: "The request body submitted contain no data to act upon and 780cc9139ecSJason M. Bills * no changes to the resource took place." 781cc9139ecSJason M. Bills * 782cc9139ecSJason M. Bills * 783cc9139ecSJason M. Bills * @returns Message NoOperation formatted to JSON */ 78465176d39SEd Tanous nlohmann::json noOperation(); 785b5c07418SJames Feist 786cc9139ecSJason M. Bills void noOperation(crow::Response& res); 787cc9139ecSJason M. Bills 788cc9139ecSJason M. Bills /** 789f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 79066ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 791f4c4dcf4SKowalski, Kamil * the resource." 792f4c4dcf4SKowalski, Kamil * 793f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 794f4c4dcf4SKowalski, Kamil * 795f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 7961668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1); 797b5c07418SJames Feist 7981668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1); 799f12894f8SJason M. Bills 800f12894f8SJason M. Bills /** 801f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 802f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 803f4c4dcf4SKowalski, Kamil * implementation." 804f4c4dcf4SKowalski, Kamil * 805f4c4dcf4SKowalski, Kamil * 806f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 80765176d39SEd Tanous nlohmann::json noValidSession(); 808b5c07418SJames Feist 809f12894f8SJason M. Bills void noValidSession(crow::Response& res); 810f4c4dcf4SKowalski, Kamil 811f4c4dcf4SKowalski, Kamil /** 812f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 81366ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 814f4c4dcf4SKowalski, Kamil * 815f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 816f4c4dcf4SKowalski, Kamil * 817f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 818d9f466b3SEd Tanous nlohmann::json invalidObject(boost::urls::url_view arg1); 819b5c07418SJames Feist 820d9f466b3SEd Tanous void invalidObject(crow::Response& res, boost::urls::url_view arg1); 821f4c4dcf4SKowalski, Kamil 822f4c4dcf4SKowalski, Kamil /** 823f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 824f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 825f4c4dcf4SKowalski, Kamil * standby." 826f4c4dcf4SKowalski, Kamil * 827f4c4dcf4SKowalski, Kamil * 828f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 82965176d39SEd Tanous nlohmann::json resourceInStandby(); 830b5c07418SJames Feist 831f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 832f4c4dcf4SKowalski, Kamil 833f4c4dcf4SKowalski, Kamil /** 834f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 83566ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 836f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 837f4c4dcf4SKowalski, Kamil * 838f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 839f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 840f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 841f4c4dcf4SKowalski, Kamil * 842f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 8431668ce6dSEd Tanous nlohmann::json actionParameterValueTypeError(std::string_view arg1, 8441668ce6dSEd Tanous std::string_view arg2, 8451668ce6dSEd Tanous std::string_view arg3); 846b5c07418SJames Feist 8471668ce6dSEd Tanous void actionParameterValueTypeError(crow::Response& res, std::string_view arg1, 8481668ce6dSEd Tanous std::string_view arg2, 8491668ce6dSEd Tanous std::string_view arg3); 850f4c4dcf4SKowalski, Kamil 851f4c4dcf4SKowalski, Kamil /** 852f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 853f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 854f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 855f4c4dcf4SKowalski, Kamil * 856f4c4dcf4SKowalski, Kamil * 857f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 85865176d39SEd Tanous nlohmann::json sessionLimitExceeded(); 859b5c07418SJames Feist 860f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 861f4c4dcf4SKowalski, Kamil 862f4c4dcf4SKowalski, Kamil /** 863f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 86466ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 865f4c4dcf4SKowalski, Kamil * 866f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 867f4c4dcf4SKowalski, Kamil * 868f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 8691668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1); 870b5c07418SJames Feist 8711668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1); 872f4c4dcf4SKowalski, Kamil 873f4c4dcf4SKowalski, Kamil /** 874f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 87566ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 876f4c4dcf4SKowalski, Kamil * 877f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 878f4c4dcf4SKowalski, Kamil * 879f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 8805187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1); 881b5c07418SJames Feist 8825187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1); 883f4c4dcf4SKowalski, Kamil 884f4c4dcf4SKowalski, Kamil /** 885f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 886f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 887f4c4dcf4SKowalski, Kamil * the service is unable to process it." 888f4c4dcf4SKowalski, Kamil * 889f4c4dcf4SKowalski, Kamil * 890f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 89165176d39SEd Tanous nlohmann::json emptyJSON(); 892b5c07418SJames Feist 893f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 894f4c4dcf4SKowalski, Kamil 895f4c4dcf4SKowalski, Kamil /** 896f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 897f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 898f4c4dcf4SKowalski, Kamil * 899f4c4dcf4SKowalski, Kamil * 900f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 90165176d39SEd Tanous nlohmann::json queryNotSupportedOnResource(); 902b5c07418SJames Feist 903f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 904f4c4dcf4SKowalski, Kamil 905f4c4dcf4SKowalski, Kamil /** 906684bb4b8SJason M. Bills * @brief Formats QueryNotSupportedOnOperation message into JSON 907684bb4b8SJason M. Bills * Message body: "Querying is not supported with the requested operation." 908684bb4b8SJason M. Bills * 909684bb4b8SJason M. Bills * 910684bb4b8SJason M. Bills * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 91165176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 912684bb4b8SJason M. Bills 913684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res); 914684bb4b8SJason M. Bills 915684bb4b8SJason M. Bills /** 916684bb4b8SJason M. Bills * @brief Formats QueryCombinationInvalid message into JSON 917684bb4b8SJason M. Bills * Message body: "Two or more query parameters in the request cannot be used 918684bb4b8SJason M. Bills * together." 919684bb4b8SJason M. Bills * 920684bb4b8SJason M. Bills * 921684bb4b8SJason M. Bills * @returns Message QueryCombinationInvalid formatted to JSON */ 92265176d39SEd Tanous nlohmann::json queryCombinationInvalid(); 923684bb4b8SJason M. Bills 924684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res); 925684bb4b8SJason M. Bills 926684bb4b8SJason M. Bills /** 927f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 928f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 929f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 930f4c4dcf4SKowalski, Kamil * operation." 931f4c4dcf4SKowalski, Kamil * 932f4c4dcf4SKowalski, Kamil * 933f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 93465176d39SEd Tanous nlohmann::json insufficientPrivilege(); 935b5c07418SJames Feist 936f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 937f4c4dcf4SKowalski, Kamil 938f4c4dcf4SKowalski, Kamil /** 939f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 94066ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 941f4c4dcf4SKowalski, Kamil * modification by the service." 942f4c4dcf4SKowalski, Kamil * 943f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 944f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 945f4c4dcf4SKowalski, Kamil * 946f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 9471668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1, 9481668ce6dSEd Tanous std::string_view arg2); 949b5c07418SJames Feist 9501668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1, 9511668ce6dSEd Tanous std::string_view arg2); 952f4c4dcf4SKowalski, Kamil 953f4c4dcf4SKowalski, Kamil /** 954f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 955f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 956f4c4dcf4SKowalski, Kamil * 957f4c4dcf4SKowalski, Kamil * 958f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 95965176d39SEd Tanous nlohmann::json accountNotModified(); 960b5c07418SJames Feist 961f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 962f4c4dcf4SKowalski, Kamil 963f4c4dcf4SKowalski, Kamil /** 964f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 96566ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 966f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 967f4c4dcf4SKowalski, Kamil * 968f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 969f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 970f4c4dcf4SKowalski, Kamil * 971f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 972b5c07418SJames Feist 9731668ce6dSEd Tanous nlohmann::json queryParameterValueFormatError(std::string_view arg1, 9741668ce6dSEd Tanous std::string_view arg2); 975b5c07418SJames Feist 9761668ce6dSEd Tanous void queryParameterValueFormatError(crow::Response& res, std::string_view arg1, 9771668ce6dSEd Tanous std::string_view arg2); 978f4c4dcf4SKowalski, Kamil 979f4c4dcf4SKowalski, Kamil /** 980f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 98166ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 982f4c4dcf4SKowalski, Kamil * included in the request." 983f4c4dcf4SKowalski, Kamil * 984f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 985f4c4dcf4SKowalski, Kamil * 986f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 9871668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1); 988b5c07418SJames Feist 9891668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1); 990f12894f8SJason M. Bills 991f12894f8SJason M. Bills /** 992f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 99366ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 994f4c4dcf4SKowalski, Kamil * unavailability of resources." 995f4c4dcf4SKowalski, Kamil * 996f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 997f4c4dcf4SKowalski, Kamil * 998f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 9991668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1); 1000b5c07418SJames Feist 10011668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1); 1002f4c4dcf4SKowalski, Kamil 1003f4c4dcf4SKowalski, Kamil /** 1004f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 1005f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 1006f4c4dcf4SKowalski, Kamil * 1007f4c4dcf4SKowalski, Kamil * 1008f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 100965176d39SEd Tanous nlohmann::json accountModified(); 1010b5c07418SJames Feist 1011a08b46ccSJason M. Bills void accountModified(crow::Response& res); 1012f4c4dcf4SKowalski, Kamil 1013f4c4dcf4SKowalski, Kamil /** 1014f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 101566ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 101666ac2b8cSJason M. Bills * range <arg3>." 1017f4c4dcf4SKowalski, Kamil * 1018f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 1019f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 1020f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 1021f4c4dcf4SKowalski, Kamil * 1022f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 10231668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1, 10241668ce6dSEd Tanous std::string_view arg2, 10251668ce6dSEd Tanous std::string_view arg3); 1026b5c07418SJames Feist 10271668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1, 10281668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 1029f4c4dcf4SKowalski, Kamil 10303bf4e632SJoseph Reynolds /** 10313bf4e632SJoseph Reynolds * @brief Formats PasswordChangeRequired message into JSON 10323bf4e632SJoseph Reynolds * Message body: The password provided for this account must be changed 10333bf4e632SJoseph Reynolds * before access is granted. PATCH the 'Password' property for this 10343bf4e632SJoseph Reynolds * account located at the target URI '%1' to complete this process. 10353bf4e632SJoseph Reynolds * 10363bf4e632SJoseph Reynolds * @param[in] arg1 Parameter of message that will replace %1 in its body. 10373bf4e632SJoseph Reynolds * 10383bf4e632SJoseph Reynolds * @returns Message PasswordChangeRequired formatted to JSON */ 1039ace85d60SEd Tanous 1040d9f466b3SEd Tanous nlohmann::json passwordChangeRequired(boost::urls::url_view arg1); 1041ace85d60SEd Tanous 1042d9f466b3SEd Tanous void passwordChangeRequired(crow::Response& res, boost::urls::url_view arg1); 10433bf4e632SJoseph Reynolds 10444cde5d90SJames Feist /** 10454cde5d90SJames Feist * @brief Formats InvalidUpload message into JSON 10464cde5d90SJames Feist * Message body: Invalid file uploaded to %1: %2.* 10474cde5d90SJames Feist * @param[in] arg1 Parameter of message that will replace %1 in its body. 10484cde5d90SJames Feist * @param[in] arg2 Parameter of message that will replace %2 in its body. 10494cde5d90SJames Feist * 10504cde5d90SJames Feist * @returns Message InvalidUpload formatted to JSON */ 10511668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2); 10524cde5d90SJames Feist 10531668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1, 10541668ce6dSEd Tanous std::string_view arg2); 10554cde5d90SJames Feist 1056ae688313SNan Zhou /** 1057ae688313SNan Zhou * @brief Formats InsufficientStorage message into JSON 1058ae688313SNan Zhou * Message body: "Insufficent storage or memory available to complete the 1059ae688313SNan Zhou * request." 1060ae688313SNan Zhou * @returns Message InsufficientStorage formatted to JSON */ 1061ae688313SNan Zhou nlohmann::json insufficientStorage(); 1062ae688313SNan Zhou 1063ae688313SNan Zhou void insufficientStorage(crow::Response& res); 1064ae688313SNan Zhou 106544c70412SEd Tanous /** 106644c70412SEd Tanous * @brief Formats OperationNotAllowed message into JSON 106744c70412SEd Tanous * Message body: "he HTTP method is not allowed on this resource." 106844c70412SEd Tanous * @returns Message OperationNotAllowed formatted to JSON */ 106944c70412SEd Tanous nlohmann::json operationNotAllowed(); 107044c70412SEd Tanous 107144c70412SEd Tanous void operationNotAllowed(crow::Response& res); 107244c70412SEd Tanous 1073*600af5f1SAppaRao Puli /** 1074*600af5f1SAppaRao Puli * @brief Formats ArraySizeTooLong message into JSON 1075*600af5f1SAppaRao Puli * Message body: "Indicates that a string value passed to the given resource 1076*600af5f1SAppaRao Puli * exceeded its length limit." 1077*600af5f1SAppaRao Puli * @returns Message ArraySizeTooLong formatted to JSON */ 1078*600af5f1SAppaRao Puli nlohmann::json arraySizeTooLong(std::string_view property, uint64_t length); 1079*600af5f1SAppaRao Puli 1080*600af5f1SAppaRao Puli void arraySizeTooLong(crow::Response& res, std::string_view property, 1081*600af5f1SAppaRao Puli uint64_t length); 1082*600af5f1SAppaRao Puli /** 1083*600af5f1SAppaRao Puli * @brief Formats StringValueTooLong message into JSON 1084*600af5f1SAppaRao Puli * Message body: "Indicates that a string value passed to the given resource 1085*600af5f1SAppaRao Puli * exceeded its length limit." 1086*600af5f1SAppaRao Puli * @returns Message StringValueTooLong formatted to JSON */ 1087*600af5f1SAppaRao Puli nlohmann::json stringValueTooLong(std::string_view property, uint64_t length); 1088*600af5f1SAppaRao Puli 1089*600af5f1SAppaRao Puli void stringValueTooLong(crow::Response& res, std::string_view property, 1090*600af5f1SAppaRao Puli uint64_t length); 1091*600af5f1SAppaRao Puli 1092f4c4dcf4SKowalski, Kamil } // namespace messages 1093f4c4dcf4SKowalski, Kamil 1094f4c4dcf4SKowalski, Kamil } // namespace redfish 1095