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" 19f12894f8SJason M. Bills 204a7fbefdSEd Tanous #include <boost/url/url_view_base.hpp> 211214b7e7SGunnar Mills #include <nlohmann/json.hpp> 221214b7e7SGunnar Mills 230442ef92SNan Zhou #include <cstdint> 24d85418e3SPatrick Williams #include <source_location> 259ea15c35SEd Tanous #include <string> 260442ef92SNan Zhou #include <string_view> 270442ef92SNan Zhou 280442ef92SNan Zhou // IWYU pragma: no_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 */ 744a7fbefdSEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view_base& arg1); 75b5c07418SJames Feist 764a7fbefdSEd Tanous void resourceMissingAtURI(crow::Response& res, 774a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 78f4c4dcf4SKowalski, Kamil 79f4c4dcf4SKowalski, Kamil /** 80f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueFormatError message into JSON 8166ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 82f4c4dcf4SKowalski, Kamil * is of a different format than the parameter can accept." 83f4c4dcf4SKowalski, Kamil * 84f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 85f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 86f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 87f4c4dcf4SKowalski, Kamil * 88f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueFormatError formatted to JSON */ 8995b3ad73SEd Tanous nlohmann::json actionParameterValueFormatError(const nlohmann::json& arg1, 901668ce6dSEd Tanous std::string_view arg2, 911668ce6dSEd Tanous std::string_view arg3); 92b5c07418SJames Feist 9395b3ad73SEd Tanous void actionParameterValueFormatError(crow::Response& res, 9495b3ad73SEd Tanous const nlohmann::json& arg1, 951668ce6dSEd Tanous std::string_view arg2, 961668ce6dSEd Tanous std::string_view arg3); 97f4c4dcf4SKowalski, Kamil 98f4c4dcf4SKowalski, Kamil /** 994ef82a15SAlex Schendel * @brief Formats ActionParameterValueNotInList message into JSON 1004ef82a15SAlex Schendel * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 1014ef82a15SAlex Schendel * is not in the list of acceptable values." 1024ef82a15SAlex Schendel * 1034ef82a15SAlex Schendel * @param[in] arg1 Parameter of message that will replace %1 in its body. 1044ef82a15SAlex Schendel * @param[in] arg2 Parameter of message that will replace %2 in its body. 1054ef82a15SAlex Schendel * @param[in] arg3 Parameter of message that will replace %3 in its body. 1064ef82a15SAlex Schendel * 1074ef82a15SAlex Schendel * @returns Message ActionParameterValueFormatError formatted to JSON */ 1084ef82a15SAlex Schendel nlohmann::json actionParameterValueNotInList(std::string_view arg1, 1094ef82a15SAlex Schendel std::string_view arg2, 1104ef82a15SAlex Schendel std::string_view arg3); 1114ef82a15SAlex Schendel 1124ef82a15SAlex Schendel void actionParameterValueNotInList(crow::Response& res, std::string_view arg1, 1134ef82a15SAlex Schendel std::string_view arg2, 1144ef82a15SAlex Schendel std::string_view arg3); 1154ef82a15SAlex Schendel 1164ef82a15SAlex Schendel /** 117f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 118f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 119f4c4dcf4SKowalski, Kamil * service is still operational." 120f4c4dcf4SKowalski, Kamil * 121f4c4dcf4SKowalski, Kamil * 122f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 12365176d39SEd Tanous nlohmann::json internalError(); 124b5c07418SJames Feist 125d85418e3SPatrick Williams void internalError(crow::Response& res, std::source_location location = 126d85418e3SPatrick Williams std::source_location::current()); 127f12894f8SJason M. Bills 128f12894f8SJason M. Bills /** 129f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 130f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 131f4c4dcf4SKowalski, Kamil * unable to interpret." 132f4c4dcf4SKowalski, Kamil * 133f4c4dcf4SKowalski, Kamil * 134f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 13565176d39SEd Tanous nlohmann::json unrecognizedRequestBody(); 136b5c07418SJames Feist 137f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 138f4c4dcf4SKowalski, Kamil 139f4c4dcf4SKowalski, Kamil /** 140f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 14166ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 14266ac2b8cSJason M. Bills * an authorization error <arg2>." 143f4c4dcf4SKowalski, Kamil * 144f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 145f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 146f4c4dcf4SKowalski, Kamil * 147f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 1484a7fbefdSEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view_base& arg1, 1491668ce6dSEd Tanous std::string_view arg2); 150b5c07418SJames Feist 1514a7fbefdSEd Tanous void resourceAtUriUnauthorized(crow::Response& res, 1524a7fbefdSEd Tanous const boost::urls::url_view_base& arg1, 1531668ce6dSEd Tanous std::string_view arg2); 154f4c4dcf4SKowalski, Kamil 155f4c4dcf4SKowalski, Kamil /** 156f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 15766ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 15866ac2b8cSJason M. Bills * <arg2>." 159f4c4dcf4SKowalski, Kamil * 160f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 161f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 162f4c4dcf4SKowalski, Kamil * 163f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 1641668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1, 1651668ce6dSEd Tanous std::string_view arg2); 166b5c07418SJames Feist 1671668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1, 1681668ce6dSEd Tanous std::string_view arg2); 169f4c4dcf4SKowalski, Kamil 170f4c4dcf4SKowalski, Kamil /** 171f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 172f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 173f4c4dcf4SKowalski, Kamil * cannot be deleted." 174f4c4dcf4SKowalski, Kamil * 175f4c4dcf4SKowalski, Kamil * 176f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 17765176d39SEd Tanous nlohmann::json resourceCannotBeDeleted(); 178b5c07418SJames Feist 179f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 180f4c4dcf4SKowalski, Kamil 181f4c4dcf4SKowalski, Kamil /** 182f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 18366ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 184f4c4dcf4SKowalski, Kamil * 185f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 186f4c4dcf4SKowalski, Kamil * 187f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 1881668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1); 189b5c07418SJames Feist 1901668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1); 191f4c4dcf4SKowalski, Kamil 192f4c4dcf4SKowalski, Kamil /** 193f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 19466ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 195f4c4dcf4SKowalski, Kamil * seconds." 196f4c4dcf4SKowalski, Kamil * 197f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 198f4c4dcf4SKowalski, Kamil * 199f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 2001668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1); 201b5c07418SJames Feist 2021668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1); 203f4c4dcf4SKowalski, Kamil 204f4c4dcf4SKowalski, Kamil /** 205f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 20666ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 20766ac2b8cSJason M. Bills * with the value <arg3> already exists." 208f4c4dcf4SKowalski, Kamil * 209f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 210f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 211f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 212f4c4dcf4SKowalski, Kamil * 213f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 2141668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1, 2151668ce6dSEd Tanous std::string_view arg2, 2161668ce6dSEd Tanous std::string_view arg3); 217b5c07418SJames Feist 2181668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1, 2191668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 220f4c4dcf4SKowalski, Kamil 221f4c4dcf4SKowalski, Kamil /** 222f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 223f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 224f4c4dcf4SKowalski, Kamil * current session has been removed as well." 225f4c4dcf4SKowalski, Kamil * 226f4c4dcf4SKowalski, Kamil * 227f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 22865176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 229b5c07418SJames Feist 230f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 231f4c4dcf4SKowalski, Kamil 232f4c4dcf4SKowalski, Kamil /** 233f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 234f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 23566ac2b8cSJason M. Bills * <arg1> was missing from the request." 236f4c4dcf4SKowalski, Kamil * 237f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 238f4c4dcf4SKowalski, Kamil * 239f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 2401668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1); 241b5c07418SJames Feist 242f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 2431668ce6dSEd Tanous std::string_view arg1); 244f4c4dcf4SKowalski, Kamil 245f4c4dcf4SKowalski, Kamil /** 246f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 24766ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 248f4c4dcf4SKowalski, Kamil * format than the property can accept." 249f4c4dcf4SKowalski, Kamil * 250f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 251f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 252f4c4dcf4SKowalski, Kamil * 253f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 254f818b04dSEd Tanous nlohmann::json propertyValueFormatError(const nlohmann::json& arg1, 2551668ce6dSEd Tanous std::string_view arg2); 256b5c07418SJames Feist 257f818b04dSEd Tanous void propertyValueFormatError(crow::Response& res, const nlohmann::json& arg1, 2581668ce6dSEd Tanous std::string_view arg2); 259f4c4dcf4SKowalski, Kamil 260f4c4dcf4SKowalski, Kamil /** 261f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 26266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 263f4c4dcf4SKowalski, Kamil * acceptable values." 264f4c4dcf4SKowalski, Kamil * 265f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 266f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 267f4c4dcf4SKowalski, Kamil * 268f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 269e2616cc5SEd Tanous nlohmann::json propertyValueNotInList(const nlohmann::json& arg1, 2701668ce6dSEd Tanous std::string_view arg2); 271b5c07418SJames Feist 272e2616cc5SEd Tanous void propertyValueNotInList(crow::Response& res, const nlohmann::json& arg1, 2731668ce6dSEd Tanous std::string_view arg2); 274f4c4dcf4SKowalski, Kamil /** 275227a2b0aSJiaqing Zhao * @brief Formats PropertyValueOutOfRange message into JSON 276227a2b0aSJiaqing Zhao * Message body: "The value '%1' for the property %2 is not in the supported 277227a2b0aSJiaqing Zhao * range of acceptable values." 278227a2b0aSJiaqing Zhao * 279227a2b0aSJiaqing Zhao * @param[in] arg1 Parameter of message that will replace %1 in its body. 280227a2b0aSJiaqing Zhao * @param[in] arg2 Parameter of message that will replace %2 in its body. 281227a2b0aSJiaqing Zhao * 282227a2b0aSJiaqing Zhao * @returns Message PropertyValueExternalConflict formatted to JSON */ 28395b3ad73SEd Tanous nlohmann::json propertyValueOutOfRange(const nlohmann::json& arg1, 284227a2b0aSJiaqing Zhao std::string_view arg2); 285227a2b0aSJiaqing Zhao 28695b3ad73SEd Tanous void propertyValueOutOfRange(crow::Response& res, const nlohmann::json& arg1, 287227a2b0aSJiaqing Zhao std::string_view arg2); 288227a2b0aSJiaqing Zhao 289227a2b0aSJiaqing Zhao /** 290f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 29166ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 292f4c4dcf4SKowalski, Kamil * service." 293f4c4dcf4SKowalski, Kamil * 294f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 295f4c4dcf4SKowalski, Kamil * 296f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 2974a7fbefdSEd Tanous nlohmann::json 2984a7fbefdSEd Tanous resourceAtUriInUnknownFormat(const boost::urls::url_view_base& arg1); 299b5c07418SJames Feist 300ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 3014a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 302f4c4dcf4SKowalski, Kamil 303f4c4dcf4SKowalski, Kamil /** 30481856681SAsmitha Karunanithi * @brief Formats ServiceDisabled message into JSON 30581856681SAsmitha Karunanithi * Message body: "The operation failed because the service at <arg1> is disabled 30681856681SAsmitha Karunanithi * and " cannot accept requests." 30781856681SAsmitha Karunanithi * 30881856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 30981856681SAsmitha Karunanithi * 31081856681SAsmitha Karunanithi * @returns Message ServiceDisabled formatted to JSON */ 3111668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1); 31281856681SAsmitha Karunanithi 3131668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1); 31481856681SAsmitha Karunanithi 31581856681SAsmitha Karunanithi /** 316f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 317f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 318f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 319f4c4dcf4SKowalski, Kamil * 320f4c4dcf4SKowalski, Kamil * 321f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 32265176d39SEd Tanous nlohmann::json serviceInUnknownState(); 323b5c07418SJames Feist 324f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 325f4c4dcf4SKowalski, Kamil 326f4c4dcf4SKowalski, Kamil /** 327f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 328f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 329f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 330f4c4dcf4SKowalski, Kamil * 331f4c4dcf4SKowalski, Kamil * 332f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 33365176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 334b5c07418SJames Feist 335f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 336f4c4dcf4SKowalski, Kamil 337f4c4dcf4SKowalski, Kamil /** 338f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 33966ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 340f4c4dcf4SKowalski, Kamil * in the request body." 341f4c4dcf4SKowalski, Kamil * 342f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 343f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 344f4c4dcf4SKowalski, Kamil * 345f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 3461668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1, 3471668ce6dSEd Tanous std::string_view arg2); 348b5c07418SJames Feist 3491668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1, 3501668ce6dSEd Tanous std::string_view arg2); 351f4c4dcf4SKowalski, Kamil 352f4c4dcf4SKowalski, Kamil /** 353f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 35466ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 355f4c4dcf4SKowalski, Kamil * 356f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 357f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 358f4c4dcf4SKowalski, Kamil * 359f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 3601668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2); 361b5c07418SJames Feist 3621668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2); 363f4c4dcf4SKowalski, Kamil 364f4c4dcf4SKowalski, Kamil /** 365cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 366cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 367cc9139ecSJason M. Bills * 368cc9139ecSJason M. Bills * 369cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 37065176d39SEd Tanous nlohmann::json sessionTerminated(); 371b5c07418SJames Feist 372cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 373cc9139ecSJason M. Bills 374cc9139ecSJason M. Bills /** 375684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 376684bb4b8SJason M. Bills * Message body: "The event subscription has been terminated." 377684bb4b8SJason M. Bills * 378684bb4b8SJason M. Bills * 379684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 38065176d39SEd Tanous nlohmann::json subscriptionTerminated(); 381684bb4b8SJason M. Bills 382684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 383684bb4b8SJason M. Bills 384684bb4b8SJason M. Bills /** 385cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 386cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 387cc9139ecSJason M. Bills * with the @odata.type of the resource which is <arg2>." 388cc9139ecSJason M. Bills * 389cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 390cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 391cc9139ecSJason M. Bills * 392cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 3931668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1, 3941668ce6dSEd Tanous std::string_view arg2); 395b5c07418SJames Feist 3961668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1, 3971668ce6dSEd Tanous std::string_view arg2); 398cc9139ecSJason M. Bills 399cc9139ecSJason M. Bills /** 400684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 401684bb4b8SJason M. Bills * Message body: "In order to complete the operation, a component reset is 402684bb4b8SJason M. Bills * required with the Reset action URI '<arg1>' and ResetType '<arg2>'." 403684bb4b8SJason M. Bills * 404684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 405684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 406684bb4b8SJason M. Bills * 407684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 4084a7fbefdSEd Tanous nlohmann::json resetRequired(const boost::urls::url_view_base& arg1, 4094a7fbefdSEd Tanous std::string_view arg2); 410684bb4b8SJason M. Bills 4114a7fbefdSEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view_base& arg1, 4121668ce6dSEd Tanous std::string_view arg2); 413684bb4b8SJason M. Bills 414684bb4b8SJason M. Bills /** 415684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 416684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered on to 417684bb4b8SJason M. Bills * perform this request." 418684bb4b8SJason M. Bills * 419684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 420684bb4b8SJason M. Bills * 421684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 4221668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1); 423684bb4b8SJason M. Bills 4241668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1); 425684bb4b8SJason M. Bills 426684bb4b8SJason M. Bills /** 427684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 428684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered off to 429684bb4b8SJason M. Bills * perform this request." 430684bb4b8SJason M. Bills * 431684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 432684bb4b8SJason M. Bills * 433684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 4341668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1); 435684bb4b8SJason M. Bills 4361668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1); 437684bb4b8SJason M. Bills 438684bb4b8SJason M. Bills /** 439684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 440684bb4b8SJason M. Bills * Message body: "The property '<arg1>' could not be written because its value 441684bb4b8SJason M. Bills * would conflict with the value of the '<arg2>' property." 442684bb4b8SJason M. Bills * 443684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 444684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 445684bb4b8SJason M. Bills * 446684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 4471668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1, 4481668ce6dSEd Tanous std::string_view arg2); 449684bb4b8SJason M. Bills 4501668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1, 4511668ce6dSEd Tanous std::string_view arg2); 452684bb4b8SJason M. Bills 453684bb4b8SJason M. Bills /** 4542a6af81cSRamesh Iyyar * @brief Formats PropertyValueResourceConflict message into JSON 4552a6af81cSRamesh Iyyar * Message body: "The property '%1' with the requested value of '%2' could 4562a6af81cSRamesh Iyyar * not be written because the value conflicts with the state or configuration 4572a6af81cSRamesh Iyyar * of the resource at '%3'." 4582a6af81cSRamesh Iyyar * 4592a6af81cSRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 4602a6af81cSRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 4612a6af81cSRamesh Iyyar * @param[in] arg3 Parameter of message that will replace %3 in its body. 4622a6af81cSRamesh Iyyar * 4632a6af81cSRamesh Iyyar * @returns Message PropertyValueResourceConflict to JSON */ 4644a7fbefdSEd Tanous nlohmann::json 4654a7fbefdSEd Tanous propertyValueResourceConflict(std::string_view arg1, 46695b3ad73SEd Tanous const nlohmann::json& arg2, 4674a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 4682a6af81cSRamesh Iyyar 4692a6af81cSRamesh Iyyar void propertyValueResourceConflict(crow::Response& res, std::string_view arg1, 47095b3ad73SEd Tanous const nlohmann::json& arg2, 4714a7fbefdSEd Tanous const boost::urls::url_view_base& arg3); 4722a6af81cSRamesh Iyyar 4732a6af81cSRamesh Iyyar /** 47424861a28SRamesh Iyyar * @brief Formats PropertyValueExternalConflict message into JSON 47524861a28SRamesh Iyyar * Message body: "The property '%1' with the requested value of '%2' could not 47624861a28SRamesh Iyyar * be written because the value is not available due to a configuration 47724861a28SRamesh Iyyar * conflict." 47824861a28SRamesh Iyyar * 47924861a28SRamesh Iyyar * @param[in] arg1 Parameter of message that will replace %1 in its body. 48024861a28SRamesh Iyyar * @param[in] arg2 Parameter of message that will replace %2 in its body. 48124861a28SRamesh Iyyar * 48224861a28SRamesh Iyyar * @returns Message PropertyValueExternalConflict formatted to JSON */ 48324861a28SRamesh Iyyar nlohmann::json propertyValueExternalConflict(std::string_view arg1, 48495b3ad73SEd Tanous const nlohmann::json& arg2); 48524861a28SRamesh Iyyar 48624861a28SRamesh Iyyar void propertyValueExternalConflict(crow::Response& res, std::string_view arg1, 48795b3ad73SEd Tanous const nlohmann::json& arg2); 48824861a28SRamesh Iyyar 48924861a28SRamesh Iyyar /** 490684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 491684bb4b8SJason M. Bills * Message body: "The property '<arg1>' with the requested value of '<arg2>' 492684bb4b8SJason M. Bills * could not be written because the value does not meet the constraints of the 493684bb4b8SJason M. Bills * implementation." 494684bb4b8SJason M. Bills * 495684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 496684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 497684bb4b8SJason M. Bills * 498684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 499367b3dceSGinu George nlohmann::json propertyValueIncorrect(std::string_view arg1, 500367b3dceSGinu George const nlohmann::json& arg2); 501684bb4b8SJason M. Bills 502367b3dceSGinu George void propertyValueIncorrect(crow::Response& res, std::string_view arg1, 503367b3dceSGinu George const nlohmann::json& arg2); 504684bb4b8SJason M. Bills 505684bb4b8SJason M. Bills /** 506684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 507684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 508684bb4b8SJason M. Bills * at URI '<arg1>' that conflicts with the creation request." 509684bb4b8SJason M. Bills * 510684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 511684bb4b8SJason M. Bills * 512684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 5134a7fbefdSEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view_base& arg1); 514684bb4b8SJason M. Bills 5154a7fbefdSEd Tanous void resourceCreationConflict(crow::Response& res, 5164a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 517684bb4b8SJason M. Bills 518684bb4b8SJason M. Bills /** 519684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 520684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 521684bb4b8SJason M. Bills * 522684bb4b8SJason M. Bills * 523684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 52465176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 525684bb4b8SJason M. Bills 526684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 527684bb4b8SJason M. Bills 528684bb4b8SJason M. Bills /** 529684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 530684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 531684bb4b8SJason M. Bills * this resource." 532684bb4b8SJason M. Bills * 533684bb4b8SJason M. Bills * 534684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 53565176d39SEd Tanous nlohmann::json preconditionFailed(); 536684bb4b8SJason M. Bills 537684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 538684bb4b8SJason M. Bills 539684bb4b8SJason M. Bills /** 540684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 541684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 542684bb4b8SJason M. Bills * resource." 543684bb4b8SJason M. Bills * 544684bb4b8SJason M. Bills * 545684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 54665176d39SEd Tanous nlohmann::json preconditionRequired(); 547684bb4b8SJason M. Bills 548684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 549684bb4b8SJason M. Bills 550684bb4b8SJason M. Bills /** 551684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 552684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 553684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 554684bb4b8SJason M. Bills * 555684bb4b8SJason M. Bills * 556684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 55765176d39SEd Tanous nlohmann::json operationFailed(); 558684bb4b8SJason M. Bills 559684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 560684bb4b8SJason M. Bills 561684bb4b8SJason M. Bills /** 562684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 5638ece0e45SEd Tanous * Message body: "A timeout internal to the service occurred as part of the 564684bb4b8SJason M. Bills * request. Partial results may have been returned." 565684bb4b8SJason M. Bills * 566684bb4b8SJason M. Bills * 567684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 56865176d39SEd Tanous nlohmann::json operationTimeout(); 569684bb4b8SJason M. Bills 570684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 571684bb4b8SJason M. Bills 572684bb4b8SJason M. Bills /** 573f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 57466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 575f4c4dcf4SKowalski, Kamil * type than the property can accept." 576f4c4dcf4SKowalski, Kamil * 577f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 578f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 579f4c4dcf4SKowalski, Kamil * 580f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 5812e8c4bdaSEd Tanous nlohmann::json propertyValueTypeError(const nlohmann::json& arg1, 5821668ce6dSEd Tanous std::string_view arg2); 583b5c07418SJames Feist 5842e8c4bdaSEd Tanous void propertyValueTypeError(crow::Response& res, const nlohmann::json& arg1, 5851668ce6dSEd Tanous std::string_view arg2); 586f4c4dcf4SKowalski, Kamil 587f4c4dcf4SKowalski, Kamil /** 588f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 58966ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 590f4c4dcf4SKowalski, Kamil * found." 591f4c4dcf4SKowalski, Kamil * 592f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 593f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 594f4c4dcf4SKowalski, Kamil * 595f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 5961668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2); 597b5c07418SJames Feist 5981668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1, 5991668ce6dSEd Tanous std::string_view arg2); 600f4c4dcf4SKowalski, Kamil 601f4c4dcf4SKowalski, Kamil /** 602f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 60355c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 60466ac2b8cSJason M. Bills * <arg1>." 605f4c4dcf4SKowalski, Kamil * 606f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 607f4c4dcf4SKowalski, Kamil * 608f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 6094a7fbefdSEd Tanous nlohmann::json 6104a7fbefdSEd Tanous couldNotEstablishConnection(const boost::urls::url_view_base& arg1); 611b5c07418SJames Feist 612ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res, 6134a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 614f4c4dcf4SKowalski, Kamil 615f4c4dcf4SKowalski, Kamil /** 616f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 61766ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 618f4c4dcf4SKowalski, Kamil * assigned a value." 619f4c4dcf4SKowalski, Kamil * 620f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 621f4c4dcf4SKowalski, Kamil * 622f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 6231668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1); 624b5c07418SJames Feist 6251668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1); 626f12894f8SJason M. Bills 627f12894f8SJason M. Bills /** 628f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 62966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 630f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 631f4c4dcf4SKowalski, Kamil * 632f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 633f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 634f4c4dcf4SKowalski, Kamil * 635f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 63695b3ad73SEd Tanous nlohmann::json queryParameterValueTypeError(const nlohmann::json& arg1, 6371668ce6dSEd Tanous std::string_view arg2); 638b5c07418SJames Feist 63995b3ad73SEd Tanous void queryParameterValueTypeError(crow::Response& res, 64095b3ad73SEd Tanous const nlohmann::json& arg1, 6411668ce6dSEd Tanous std::string_view arg2); 642f4c4dcf4SKowalski, Kamil 643f4c4dcf4SKowalski, Kamil /** 644f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 645f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 646f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 647f4c4dcf4SKowalski, Kamil * 648f4c4dcf4SKowalski, Kamil * 649f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 65065176d39SEd Tanous nlohmann::json serviceShuttingDown(); 651b5c07418SJames Feist 652f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 653f4c4dcf4SKowalski, Kamil 654f4c4dcf4SKowalski, Kamil /** 655f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 65666ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 65766ac2b8cSJason M. Bills * the parameter <arg2>." 658f4c4dcf4SKowalski, Kamil * 659f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 660f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 661f4c4dcf4SKowalski, Kamil * 662f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 6631668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1, 6641668ce6dSEd Tanous std::string_view arg2); 665b5c07418SJames Feist 6661668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1, 6671668ce6dSEd Tanous std::string_view arg2); 668f4c4dcf4SKowalski, Kamil 669f4c4dcf4SKowalski, Kamil /** 670f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 67166ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 672f4c4dcf4SKowalski, Kamil * the target resource." 673f4c4dcf4SKowalski, Kamil * 674f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 675f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 676f4c4dcf4SKowalski, Kamil * 677f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 6781668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1, 6791668ce6dSEd Tanous std::string_view arg2); 680b5c07418SJames Feist 6811668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1, 6821668ce6dSEd Tanous std::string_view arg2); 683f4c4dcf4SKowalski, Kamil 684f4c4dcf4SKowalski, Kamil /** 685f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 68666ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 68766ac2b8cSJason M. Bills * specified protocol <arg2>." 688f4c4dcf4SKowalski, Kamil * 689f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 690f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 691f4c4dcf4SKowalski, Kamil * 692f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 6934a7fbefdSEd Tanous nlohmann::json 6944a7fbefdSEd Tanous sourceDoesNotSupportProtocol(const boost::urls::url_view_base& arg1, 6951668ce6dSEd Tanous std::string_view arg2); 696b5c07418SJames Feist 697ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 6984a7fbefdSEd Tanous const boost::urls::url_view_base& arg1, 6991668ce6dSEd Tanous std::string_view arg2); 700f4c4dcf4SKowalski, Kamil 701f4c4dcf4SKowalski, Kamil /** 702b4ad4c05SShantappa Teekappanavar * @brief Formats StrictAccountTypes message into JSON 703b4ad4c05SShantappa Teekappanavar * Message body: Indicates the request failed because a set of `AccountTypes` or 704b4ad4c05SShantappa Teekappanavar * `OEMAccountTypes` was not accepted while `StrictAccountTypes` is set to `true 705b4ad4c05SShantappa Teekappanavar * @param[in] arg1 Parameter of message that will replace %1 in its body. 706b4ad4c05SShantappa Teekappanavar * 707b4ad4c05SShantappa Teekappanavar * @returns Message StrictAccountTypes formatted to JSON */ 708b4ad4c05SShantappa Teekappanavar nlohmann::json strictAccountTypes(std::string_view arg1); 709b4ad4c05SShantappa Teekappanavar 710b4ad4c05SShantappa Teekappanavar void strictAccountTypes(crow::Response& res, std::string_view arg1); 711b4ad4c05SShantappa Teekappanavar 712b4ad4c05SShantappa Teekappanavar /** 713f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 714f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 715f4c4dcf4SKowalski, Kamil * 716f4c4dcf4SKowalski, Kamil * 717f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 71865176d39SEd Tanous nlohmann::json accountRemoved(); 719b5c07418SJames Feist 720f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 721f4c4dcf4SKowalski, Kamil 722f4c4dcf4SKowalski, Kamil /** 723f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 72466ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 725f4c4dcf4SKowalski, Kamil * service denied access." 726f4c4dcf4SKowalski, Kamil * 727f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 728f4c4dcf4SKowalski, Kamil * 729f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 7304a7fbefdSEd Tanous nlohmann::json accessDenied(const boost::urls::url_view_base& arg1); 731b5c07418SJames Feist 7324a7fbefdSEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view_base& arg1); 733f4c4dcf4SKowalski, Kamil 734f4c4dcf4SKowalski, Kamil /** 735f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 736f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 737f4c4dcf4SKowalski, Kamil * 738f4c4dcf4SKowalski, Kamil * 739f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 74065176d39SEd Tanous nlohmann::json queryNotSupported(); 741b5c07418SJames Feist 742f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 743f4c4dcf4SKowalski, Kamil 744f4c4dcf4SKowalski, Kamil /** 745f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 746f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 747f4c4dcf4SKowalski, Kamil * the limit of possible resources." 748f4c4dcf4SKowalski, Kamil * 749f4c4dcf4SKowalski, Kamil * 750f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 75165176d39SEd Tanous nlohmann::json createLimitReachedForResource(); 752b5c07418SJames Feist 753f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 754f4c4dcf4SKowalski, Kamil 755f4c4dcf4SKowalski, Kamil /** 756f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 757f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 758f4c4dcf4SKowalski, Kamil * information." 759f4c4dcf4SKowalski, Kamil * 760f4c4dcf4SKowalski, Kamil * 761f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 76265176d39SEd Tanous nlohmann::json generalError(); 763b5c07418SJames Feist 764f12894f8SJason M. Bills void generalError(crow::Response& res); 765f4c4dcf4SKowalski, Kamil 766f4c4dcf4SKowalski, Kamil /** 767f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 768f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 769f4c4dcf4SKowalski, Kamil * 770f4c4dcf4SKowalski, Kamil * 771f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 77265176d39SEd Tanous nlohmann::json success(); 773b5c07418SJames Feist 774f12894f8SJason M. Bills void success(crow::Response& res); 775f12894f8SJason M. Bills 776f12894f8SJason M. Bills /** 777f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 778f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 779f4c4dcf4SKowalski, Kamil * 780f4c4dcf4SKowalski, Kamil * 781f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 78265176d39SEd Tanous nlohmann::json created(); 783b5c07418SJames Feist 784f12894f8SJason M. Bills void created(crow::Response& res); 785f4c4dcf4SKowalski, Kamil 786f4c4dcf4SKowalski, Kamil /** 787cc9139ecSJason M. Bills * @brief Formats NoOperation message into JSON 788cc9139ecSJason M. Bills * Message body: "The request body submitted contain no data to act upon and 789cc9139ecSJason M. Bills * no changes to the resource took place." 790cc9139ecSJason M. Bills * 791cc9139ecSJason M. Bills * 792cc9139ecSJason M. Bills * @returns Message NoOperation formatted to JSON */ 79365176d39SEd Tanous nlohmann::json noOperation(); 794b5c07418SJames Feist 795cc9139ecSJason M. Bills void noOperation(crow::Response& res); 796cc9139ecSJason M. Bills 797cc9139ecSJason M. Bills /** 798f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 79966ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 800f4c4dcf4SKowalski, Kamil * the resource." 801f4c4dcf4SKowalski, Kamil * 802f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 803f4c4dcf4SKowalski, Kamil * 804f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 8051668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1); 806b5c07418SJames Feist 8071668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1); 808f12894f8SJason M. Bills 809f12894f8SJason M. Bills /** 810f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 811f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 812f4c4dcf4SKowalski, Kamil * implementation." 813f4c4dcf4SKowalski, Kamil * 814f4c4dcf4SKowalski, Kamil * 815f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 81665176d39SEd Tanous nlohmann::json noValidSession(); 817b5c07418SJames Feist 818f12894f8SJason M. Bills void noValidSession(crow::Response& res); 819f4c4dcf4SKowalski, Kamil 820f4c4dcf4SKowalski, Kamil /** 821f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 82266ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 823f4c4dcf4SKowalski, Kamil * 824f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 825f4c4dcf4SKowalski, Kamil * 826f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 8274a7fbefdSEd Tanous nlohmann::json invalidObject(const boost::urls::url_view_base& arg1); 828b5c07418SJames Feist 8294a7fbefdSEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view_base& arg1); 830f4c4dcf4SKowalski, Kamil 831f4c4dcf4SKowalski, Kamil /** 832f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 833f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 834f4c4dcf4SKowalski, Kamil * standby." 835f4c4dcf4SKowalski, Kamil * 836f4c4dcf4SKowalski, Kamil * 837f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 83865176d39SEd Tanous nlohmann::json resourceInStandby(); 839b5c07418SJames Feist 840f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 841f4c4dcf4SKowalski, Kamil 842f4c4dcf4SKowalski, Kamil /** 843f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 84466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 845f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 846f4c4dcf4SKowalski, Kamil * 847f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 848f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 849f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 850f4c4dcf4SKowalski, Kamil * 851f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 85295b3ad73SEd Tanous nlohmann::json actionParameterValueTypeError(const nlohmann::json& arg1, 8531668ce6dSEd Tanous std::string_view arg2, 8541668ce6dSEd Tanous std::string_view arg3); 855b5c07418SJames Feist 85695b3ad73SEd Tanous void actionParameterValueTypeError(crow::Response& res, 85795b3ad73SEd Tanous const nlohmann::json& arg1, 8581668ce6dSEd Tanous std::string_view arg2, 8591668ce6dSEd Tanous std::string_view arg3); 860f4c4dcf4SKowalski, Kamil 861f4c4dcf4SKowalski, Kamil /** 8621827b4f1SAsmitha Karunanithi * @brief Formats ActionParameterValueError message into JSON 8631827b4f1SAsmitha Karunanithi * Message body: "Indicates that a parameter was given an invalid value." 8641827b4f1SAsmitha Karunanithi * The value for the parameter %1 in the action %2 is invalid. 8651827b4f1SAsmitha Karunanithi * 8661827b4f1SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 8671827b4f1SAsmitha Karunanithi * @param[in] arg2 Parameter of message that will replace %2 in its body. 8681827b4f1SAsmitha Karunanithi * 8691827b4f1SAsmitha Karunanithi * @returns Message ActionParameterValueError formatted to JSON */ 8701827b4f1SAsmitha Karunanithi nlohmann::json actionParameterValueError(const nlohmann::json& arg1, 8711827b4f1SAsmitha Karunanithi std::string_view arg2); 8721827b4f1SAsmitha Karunanithi 8731827b4f1SAsmitha Karunanithi void actionParameterValueError(crow::Response& res, const nlohmann::json& arg1, 8741827b4f1SAsmitha Karunanithi std::string_view arg2); 8751827b4f1SAsmitha Karunanithi 8761827b4f1SAsmitha Karunanithi /** 877f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 878f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 879f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 880f4c4dcf4SKowalski, Kamil * 881f4c4dcf4SKowalski, Kamil * 882f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 88365176d39SEd Tanous nlohmann::json sessionLimitExceeded(); 884b5c07418SJames Feist 885f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 886f4c4dcf4SKowalski, Kamil 887f4c4dcf4SKowalski, Kamil /** 888f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 88966ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 890f4c4dcf4SKowalski, Kamil * 891f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 892f4c4dcf4SKowalski, Kamil * 893f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 8941668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1); 895b5c07418SJames Feist 8961668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1); 897f4c4dcf4SKowalski, Kamil 898f4c4dcf4SKowalski, Kamil /** 899f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 90066ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 901f4c4dcf4SKowalski, Kamil * 902f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 903f4c4dcf4SKowalski, Kamil * 904f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 9055187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1); 906b5c07418SJames Feist 9075187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1); 908f4c4dcf4SKowalski, Kamil 909f4c4dcf4SKowalski, Kamil /** 910f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 911f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 912f4c4dcf4SKowalski, Kamil * the service is unable to process it." 913f4c4dcf4SKowalski, Kamil * 914f4c4dcf4SKowalski, Kamil * 915f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 91665176d39SEd Tanous nlohmann::json emptyJSON(); 917b5c07418SJames Feist 918f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 919f4c4dcf4SKowalski, Kamil 920f4c4dcf4SKowalski, Kamil /** 921f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 922f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 923f4c4dcf4SKowalski, Kamil * 924f4c4dcf4SKowalski, Kamil * 925f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 92665176d39SEd Tanous nlohmann::json queryNotSupportedOnResource(); 927b5c07418SJames Feist 928f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 929f4c4dcf4SKowalski, Kamil 930f4c4dcf4SKowalski, Kamil /** 931684bb4b8SJason M. Bills * @brief Formats QueryNotSupportedOnOperation message into JSON 932684bb4b8SJason M. Bills * Message body: "Querying is not supported with the requested operation." 933684bb4b8SJason M. Bills * 934684bb4b8SJason M. Bills * 935684bb4b8SJason M. Bills * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 93665176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 937684bb4b8SJason M. Bills 938684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res); 939684bb4b8SJason M. Bills 940684bb4b8SJason M. Bills /** 941684bb4b8SJason M. Bills * @brief Formats QueryCombinationInvalid message into JSON 942684bb4b8SJason M. Bills * Message body: "Two or more query parameters in the request cannot be used 943684bb4b8SJason M. Bills * together." 944684bb4b8SJason M. Bills * 945684bb4b8SJason M. Bills * 946684bb4b8SJason M. Bills * @returns Message QueryCombinationInvalid formatted to JSON */ 94765176d39SEd Tanous nlohmann::json queryCombinationInvalid(); 948684bb4b8SJason M. Bills 949684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res); 950684bb4b8SJason M. Bills 951684bb4b8SJason M. Bills /** 952*fa345c78SEd Tanous * @brief Formats EventBufferExceeded message into JSON 953*fa345c78SEd Tanous * Message body: "Indicates undelivered events may have been lost due to a lack 954*fa345c78SEd Tanous * of buffer space in the service." 955*fa345c78SEd Tanous * 956*fa345c78SEd Tanous * 957*fa345c78SEd Tanous * @returns Message QueryCombinationInvalid formatted to JSON */ 958*fa345c78SEd Tanous nlohmann::json eventBufferExceeded(); 959*fa345c78SEd Tanous 960*fa345c78SEd Tanous void eventBufferExceeded(crow::Response& res); 961*fa345c78SEd Tanous 962*fa345c78SEd Tanous /** 963f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 964f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 965f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 966f4c4dcf4SKowalski, Kamil * operation." 967f4c4dcf4SKowalski, Kamil * 968f4c4dcf4SKowalski, Kamil * 969f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 97065176d39SEd Tanous nlohmann::json insufficientPrivilege(); 971b5c07418SJames Feist 972f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 973f4c4dcf4SKowalski, Kamil 974f4c4dcf4SKowalski, Kamil /** 975f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 97666ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 977f4c4dcf4SKowalski, Kamil * modification by the service." 978f4c4dcf4SKowalski, Kamil * 979f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 980f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 981f4c4dcf4SKowalski, Kamil * 982f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 9831668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1, 98495b3ad73SEd Tanous const nlohmann::json& arg2); 985b5c07418SJames Feist 9861668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1, 98795b3ad73SEd Tanous const nlohmann::json& arg2); 988f4c4dcf4SKowalski, Kamil 989f4c4dcf4SKowalski, Kamil /** 990f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 991f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 992f4c4dcf4SKowalski, Kamil * 993f4c4dcf4SKowalski, Kamil * 994f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 99565176d39SEd Tanous nlohmann::json accountNotModified(); 996b5c07418SJames Feist 997f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 998f4c4dcf4SKowalski, Kamil 999f4c4dcf4SKowalski, Kamil /** 1000f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 100166ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 1002f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 1003f4c4dcf4SKowalski, Kamil * 1004f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 1005f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 1006f4c4dcf4SKowalski, Kamil * 1007f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 1008b5c07418SJames Feist 100995b3ad73SEd Tanous nlohmann::json queryParameterValueFormatError(const nlohmann::json& arg1, 10101668ce6dSEd Tanous std::string_view arg2); 1011b5c07418SJames Feist 101295b3ad73SEd Tanous void queryParameterValueFormatError(crow::Response& res, 101395b3ad73SEd Tanous const nlohmann::json& arg1, 10141668ce6dSEd Tanous std::string_view arg2); 1015f4c4dcf4SKowalski, Kamil 1016f4c4dcf4SKowalski, Kamil /** 1017f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 101866ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 1019f4c4dcf4SKowalski, Kamil * included in the request." 1020f4c4dcf4SKowalski, Kamil * 1021f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 1022f4c4dcf4SKowalski, Kamil * 1023f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 10241668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1); 1025b5c07418SJames Feist 10261668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1); 1027f12894f8SJason M. Bills 1028f12894f8SJason M. Bills /** 1029f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 103066ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 1031f4c4dcf4SKowalski, Kamil * unavailability of resources." 1032f4c4dcf4SKowalski, Kamil * 1033f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 1034f4c4dcf4SKowalski, Kamil * 1035f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 10361668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1); 1037b5c07418SJames Feist 10381668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1); 1039f4c4dcf4SKowalski, Kamil 1040f4c4dcf4SKowalski, Kamil /** 1041f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 1042f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 1043f4c4dcf4SKowalski, Kamil * 1044f4c4dcf4SKowalski, Kamil * 1045f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 104665176d39SEd Tanous nlohmann::json accountModified(); 1047b5c07418SJames Feist 1048a08b46ccSJason M. Bills void accountModified(crow::Response& res); 1049f4c4dcf4SKowalski, Kamil 1050f4c4dcf4SKowalski, Kamil /** 1051f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 105266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 105366ac2b8cSJason M. Bills * range <arg3>." 1054f4c4dcf4SKowalski, Kamil * 1055f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 1056f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 1057f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 1058f4c4dcf4SKowalski, Kamil * 1059f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 10601668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1, 10611668ce6dSEd Tanous std::string_view arg2, 10621668ce6dSEd Tanous std::string_view arg3); 1063b5c07418SJames Feist 10641668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1, 10651668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 1066f4c4dcf4SKowalski, Kamil 10673bf4e632SJoseph Reynolds /** 10683bf4e632SJoseph Reynolds * @brief Formats PasswordChangeRequired message into JSON 10693bf4e632SJoseph Reynolds * Message body: The password provided for this account must be changed 10703bf4e632SJoseph Reynolds * before access is granted. PATCH the 'Password' property for this 10713bf4e632SJoseph Reynolds * account located at the target URI '%1' to complete this process. 10723bf4e632SJoseph Reynolds * 10733bf4e632SJoseph Reynolds * @param[in] arg1 Parameter of message that will replace %1 in its body. 10743bf4e632SJoseph Reynolds * 10753bf4e632SJoseph Reynolds * @returns Message PasswordChangeRequired formatted to JSON */ 1076ace85d60SEd Tanous 10774a7fbefdSEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view_base& arg1); 1078ace85d60SEd Tanous 10794a7fbefdSEd Tanous void passwordChangeRequired(crow::Response& res, 10804a7fbefdSEd Tanous const boost::urls::url_view_base& arg1); 10813bf4e632SJoseph Reynolds 10824cde5d90SJames Feist /** 10834cde5d90SJames Feist * @brief Formats InvalidUpload message into JSON 10844cde5d90SJames Feist * Message body: Invalid file uploaded to %1: %2.* 10854cde5d90SJames Feist * @param[in] arg1 Parameter of message that will replace %1 in its body. 10864cde5d90SJames Feist * @param[in] arg2 Parameter of message that will replace %2 in its body. 10874cde5d90SJames Feist * 10884cde5d90SJames Feist * @returns Message InvalidUpload formatted to JSON */ 10891668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2); 10904cde5d90SJames Feist 10911668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1, 10921668ce6dSEd Tanous std::string_view arg2); 10934cde5d90SJames Feist 1094ae688313SNan Zhou /** 1095ae688313SNan Zhou * @brief Formats InsufficientStorage message into JSON 10968ece0e45SEd Tanous * Message body: "Insufficient storage or memory available to complete the 1097ae688313SNan Zhou * request." 1098ae688313SNan Zhou * @returns Message InsufficientStorage formatted to JSON */ 1099ae688313SNan Zhou nlohmann::json insufficientStorage(); 1100ae688313SNan Zhou 1101ae688313SNan Zhou void insufficientStorage(crow::Response& res); 1102ae688313SNan Zhou 110344c70412SEd Tanous /** 110444c70412SEd Tanous * @brief Formats OperationNotAllowed message into JSON 110544c70412SEd Tanous * Message body: "he HTTP method is not allowed on this resource." 110644c70412SEd Tanous * @returns Message OperationNotAllowed formatted to JSON */ 110744c70412SEd Tanous nlohmann::json operationNotAllowed(); 110844c70412SEd Tanous 110944c70412SEd Tanous void operationNotAllowed(crow::Response& res); 111044c70412SEd Tanous 1111600af5f1SAppaRao Puli /** 1112600af5f1SAppaRao Puli * @brief Formats ArraySizeTooLong message into JSON 1113600af5f1SAppaRao Puli * Message body: "Indicates that a string value passed to the given resource 1114600af5f1SAppaRao Puli * exceeded its length limit." 1115600af5f1SAppaRao Puli * @returns Message ArraySizeTooLong formatted to JSON */ 1116600af5f1SAppaRao Puli nlohmann::json arraySizeTooLong(std::string_view property, uint64_t length); 1117600af5f1SAppaRao Puli 1118600af5f1SAppaRao Puli void arraySizeTooLong(crow::Response& res, std::string_view property, 1119600af5f1SAppaRao Puli uint64_t length); 1120600af5f1SAppaRao Puli 1121f4c4dcf4SKowalski, Kamil } // namespace messages 1122f4c4dcf4SKowalski, Kamil 1123f4c4dcf4SKowalski, Kamil } // namespace redfish 1124