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 1704e438cbSEd Tanous #include "http_response.hpp" 18f12894f8SJason M. Bills 19ace85d60SEd Tanous #include <boost/url/urls.hpp> 201214b7e7SGunnar Mills #include <nlohmann/json.hpp> 21df5415fcSEd Tanous #include <source_location.hpp> 221214b7e7SGunnar Mills 239ea15c35SEd Tanous #include <string> 249ea15c35SEd Tanous 251abe55efSEd Tanous namespace redfish 261abe55efSEd Tanous { 27f4c4dcf4SKowalski, Kamil 281abe55efSEd Tanous namespace messages 291abe55efSEd Tanous { 30f4c4dcf4SKowalski, Kamil 3181856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0."; 3255c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo"; 33f4c4dcf4SKowalski, Kamil 34f4c4dcf4SKowalski, Kamil /** 35f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInUse message into JSON 36f4c4dcf4SKowalski, Kamil * Message body: "The change to the requested resource failed because the 37f4c4dcf4SKowalski, Kamil * resource is in use or in transition." 38f4c4dcf4SKowalski, Kamil * 39f4c4dcf4SKowalski, Kamil * 40f4c4dcf4SKowalski, Kamil * @returns Message ResourceInUse formatted to JSON */ 4165176d39SEd Tanous nlohmann::json resourceInUse(); 42b5c07418SJames Feist 43f12894f8SJason M. Bills void resourceInUse(crow::Response& res); 44f4c4dcf4SKowalski, Kamil 45f4c4dcf4SKowalski, Kamil /** 46f4c4dcf4SKowalski, Kamil * @brief Formats MalformedJSON message into JSON 47f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted was malformed JSON and could not be 48f4c4dcf4SKowalski, Kamil * parsed by the receiving service." 49f4c4dcf4SKowalski, Kamil * 50f4c4dcf4SKowalski, Kamil * 51f4c4dcf4SKowalski, Kamil * @returns Message MalformedJSON formatted to JSON */ 5265176d39SEd Tanous nlohmann::json malformedJSON(); 53b5c07418SJames Feist 54f12894f8SJason M. Bills void malformedJSON(crow::Response& res); 55f4c4dcf4SKowalski, Kamil 56f4c4dcf4SKowalski, Kamil /** 57f4c4dcf4SKowalski, Kamil * @brief Formats ResourceMissingAtURI message into JSON 5866ac2b8cSJason M. Bills * Message body: "The resource at the URI <arg1> was not found." 59f4c4dcf4SKowalski, Kamil * 60f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 61f4c4dcf4SKowalski, Kamil * 62f4c4dcf4SKowalski, Kamil * @returns Message ResourceMissingAtURI formatted to JSON */ 63ace85d60SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view& arg1); 64b5c07418SJames Feist 65ace85d60SEd Tanous void resourceMissingAtURI(crow::Response& res, 66ace85d60SEd Tanous const boost::urls::url_view& arg1); 67f4c4dcf4SKowalski, Kamil 68f4c4dcf4SKowalski, Kamil /** 69f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueFormatError message into JSON 7066ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 71f4c4dcf4SKowalski, Kamil * is of a different format than the parameter can accept." 72f4c4dcf4SKowalski, Kamil * 73f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 74f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 75f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 76f4c4dcf4SKowalski, Kamil * 77f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueFormatError formatted to JSON */ 781668ce6dSEd Tanous nlohmann::json actionParameterValueFormatError(std::string_view arg1, 791668ce6dSEd Tanous std::string_view arg2, 801668ce6dSEd Tanous std::string_view arg3); 81b5c07418SJames Feist 821668ce6dSEd Tanous void actionParameterValueFormatError(crow::Response& res, std::string_view arg1, 831668ce6dSEd Tanous std::string_view arg2, 841668ce6dSEd Tanous std::string_view arg3); 85f4c4dcf4SKowalski, Kamil 86f4c4dcf4SKowalski, Kamil /** 87f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 88f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 89f4c4dcf4SKowalski, Kamil * service is still operational." 90f4c4dcf4SKowalski, Kamil * 91f4c4dcf4SKowalski, Kamil * 92f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 9365176d39SEd Tanous nlohmann::json internalError(); 94b5c07418SJames Feist 959eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location = 96df5415fcSEd Tanous bmcweb::source_location::current()); 97f12894f8SJason M. Bills 98f12894f8SJason M. Bills /** 99f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 100f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 101f4c4dcf4SKowalski, Kamil * unable to interpret." 102f4c4dcf4SKowalski, Kamil * 103f4c4dcf4SKowalski, Kamil * 104f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 10565176d39SEd Tanous nlohmann::json unrecognizedRequestBody(); 106b5c07418SJames Feist 107f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 108f4c4dcf4SKowalski, Kamil 109f4c4dcf4SKowalski, Kamil /** 110f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 11166ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 11266ac2b8cSJason M. Bills * an authorization error <arg2>." 113f4c4dcf4SKowalski, Kamil * 114f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 115f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 116f4c4dcf4SKowalski, Kamil * 117f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 118ace85d60SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view& arg1, 1191668ce6dSEd Tanous std::string_view arg2); 120b5c07418SJames Feist 121ace85d60SEd Tanous void resourceAtUriUnauthorized(crow::Response& res, 122ace85d60SEd Tanous const boost::urls::url_view& arg1, 1231668ce6dSEd Tanous std::string_view arg2); 124f4c4dcf4SKowalski, Kamil 125f4c4dcf4SKowalski, Kamil /** 126f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 12766ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 12866ac2b8cSJason M. Bills * <arg2>." 129f4c4dcf4SKowalski, Kamil * 130f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 131f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 132f4c4dcf4SKowalski, Kamil * 133f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 1341668ce6dSEd Tanous nlohmann::json actionParameterUnknown(std::string_view arg1, 1351668ce6dSEd Tanous std::string_view arg2); 136b5c07418SJames Feist 1371668ce6dSEd Tanous void actionParameterUnknown(crow::Response& res, std::string_view arg1, 1381668ce6dSEd Tanous std::string_view arg2); 139f4c4dcf4SKowalski, Kamil 140f4c4dcf4SKowalski, Kamil /** 141f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 142f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 143f4c4dcf4SKowalski, Kamil * cannot be deleted." 144f4c4dcf4SKowalski, Kamil * 145f4c4dcf4SKowalski, Kamil * 146f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 14765176d39SEd Tanous nlohmann::json resourceCannotBeDeleted(); 148b5c07418SJames Feist 149f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 150f4c4dcf4SKowalski, Kamil 151f4c4dcf4SKowalski, Kamil /** 152f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 15366ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 154f4c4dcf4SKowalski, Kamil * 155f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 156f4c4dcf4SKowalski, Kamil * 157f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 1581668ce6dSEd Tanous nlohmann::json propertyDuplicate(std::string_view arg1); 159b5c07418SJames Feist 1601668ce6dSEd Tanous void propertyDuplicate(crow::Response& res, std::string_view arg1); 161f4c4dcf4SKowalski, Kamil 162f4c4dcf4SKowalski, Kamil /** 163f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 16466ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 165f4c4dcf4SKowalski, Kamil * seconds." 166f4c4dcf4SKowalski, Kamil * 167f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 168f4c4dcf4SKowalski, Kamil * 169f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 1701668ce6dSEd Tanous nlohmann::json serviceTemporarilyUnavailable(std::string_view arg1); 171b5c07418SJames Feist 1721668ce6dSEd Tanous void serviceTemporarilyUnavailable(crow::Response& res, std::string_view arg1); 173f4c4dcf4SKowalski, Kamil 174f4c4dcf4SKowalski, Kamil /** 175f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 17666ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 17766ac2b8cSJason M. Bills * with the value <arg3> already exists." 178f4c4dcf4SKowalski, Kamil * 179f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 180f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 181f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 182f4c4dcf4SKowalski, Kamil * 183f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 1841668ce6dSEd Tanous nlohmann::json resourceAlreadyExists(std::string_view arg1, 1851668ce6dSEd Tanous std::string_view arg2, 1861668ce6dSEd Tanous std::string_view arg3); 187b5c07418SJames Feist 1881668ce6dSEd Tanous void resourceAlreadyExists(crow::Response& res, std::string_view arg1, 1891668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 190f4c4dcf4SKowalski, Kamil 191f4c4dcf4SKowalski, Kamil /** 192f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 193f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 194f4c4dcf4SKowalski, Kamil * current session has been removed as well." 195f4c4dcf4SKowalski, Kamil * 196f4c4dcf4SKowalski, Kamil * 197f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 19865176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 199b5c07418SJames Feist 200f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 201f4c4dcf4SKowalski, Kamil 202f4c4dcf4SKowalski, Kamil /** 203f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 204f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 20566ac2b8cSJason M. Bills * <arg1> was missing from the request." 206f4c4dcf4SKowalski, Kamil * 207f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 208f4c4dcf4SKowalski, Kamil * 209f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 2101668ce6dSEd Tanous nlohmann::json createFailedMissingReqProperties(std::string_view arg1); 211b5c07418SJames Feist 212f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 2131668ce6dSEd Tanous std::string_view arg1); 214f4c4dcf4SKowalski, Kamil 215f4c4dcf4SKowalski, Kamil /** 216f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 21766ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 218f4c4dcf4SKowalski, Kamil * format than the property can accept." 219f4c4dcf4SKowalski, Kamil * 220f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 221f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 222f4c4dcf4SKowalski, Kamil * 223f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 2241668ce6dSEd Tanous nlohmann::json propertyValueFormatError(std::string_view arg1, 2251668ce6dSEd Tanous std::string_view arg2); 226b5c07418SJames Feist 2271668ce6dSEd Tanous void propertyValueFormatError(crow::Response& res, std::string_view arg1, 2281668ce6dSEd Tanous std::string_view arg2); 229f4c4dcf4SKowalski, Kamil 230f4c4dcf4SKowalski, Kamil /** 231f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 23266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 233f4c4dcf4SKowalski, Kamil * acceptable values." 234f4c4dcf4SKowalski, Kamil * 235f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 236f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 237f4c4dcf4SKowalski, Kamil * 238f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 2391668ce6dSEd Tanous nlohmann::json propertyValueNotInList(std::string_view arg1, 2401668ce6dSEd Tanous std::string_view arg2); 241b5c07418SJames Feist 2421668ce6dSEd Tanous void propertyValueNotInList(crow::Response& res, std::string_view arg1, 2431668ce6dSEd Tanous std::string_view arg2); 244f4c4dcf4SKowalski, Kamil 245f4c4dcf4SKowalski, Kamil /** 246f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 24766ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 248f4c4dcf4SKowalski, Kamil * service." 249f4c4dcf4SKowalski, Kamil * 250f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 251f4c4dcf4SKowalski, Kamil * 252f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 253ace85d60SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(const boost::urls::url_view& arg1); 254b5c07418SJames Feist 255ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 256ace85d60SEd Tanous const boost::urls::url_view& arg1); 257f4c4dcf4SKowalski, Kamil 258f4c4dcf4SKowalski, Kamil /** 25981856681SAsmitha Karunanithi * @brief Formats ServiceDisabled message into JSON 26081856681SAsmitha Karunanithi * Message body: "The operation failed because the service at <arg1> is disabled 26181856681SAsmitha Karunanithi * and " cannot accept requests." 26281856681SAsmitha Karunanithi * 26381856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 26481856681SAsmitha Karunanithi * 26581856681SAsmitha Karunanithi * @returns Message ServiceDisabled formatted to JSON */ 2661668ce6dSEd Tanous nlohmann::json serviceDisabled(std::string_view arg1); 26781856681SAsmitha Karunanithi 2681668ce6dSEd Tanous void serviceDisabled(crow::Response& res, std::string_view arg1); 26981856681SAsmitha Karunanithi 27081856681SAsmitha Karunanithi /** 271f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 272f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 273f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 274f4c4dcf4SKowalski, Kamil * 275f4c4dcf4SKowalski, Kamil * 276f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 27765176d39SEd Tanous nlohmann::json serviceInUnknownState(); 278b5c07418SJames Feist 279f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 280f4c4dcf4SKowalski, Kamil 281f4c4dcf4SKowalski, Kamil /** 282f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 283f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 284f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 285f4c4dcf4SKowalski, Kamil * 286f4c4dcf4SKowalski, Kamil * 287f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 28865176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 289b5c07418SJames Feist 290f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 291f4c4dcf4SKowalski, Kamil 292f4c4dcf4SKowalski, Kamil /** 293f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 29466ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 295f4c4dcf4SKowalski, Kamil * in the request body." 296f4c4dcf4SKowalski, Kamil * 297f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 298f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 299f4c4dcf4SKowalski, Kamil * 300f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 3011668ce6dSEd Tanous nlohmann::json actionParameterMissing(std::string_view arg1, 3021668ce6dSEd Tanous std::string_view arg2); 303b5c07418SJames Feist 3041668ce6dSEd Tanous void actionParameterMissing(crow::Response& res, std::string_view arg1, 3051668ce6dSEd Tanous std::string_view arg2); 306f4c4dcf4SKowalski, Kamil 307f4c4dcf4SKowalski, Kamil /** 308f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 30966ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 310f4c4dcf4SKowalski, Kamil * 311f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 312f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 313f4c4dcf4SKowalski, Kamil * 314f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 3151668ce6dSEd Tanous nlohmann::json stringValueTooLong(std::string_view arg1, int arg2); 316b5c07418SJames Feist 3171668ce6dSEd Tanous void stringValueTooLong(crow::Response& res, std::string_view arg1, int arg2); 318f4c4dcf4SKowalski, Kamil 319f4c4dcf4SKowalski, Kamil /** 320cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 321cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 322cc9139ecSJason M. Bills * 323cc9139ecSJason M. Bills * 324cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 32565176d39SEd Tanous nlohmann::json sessionTerminated(); 326b5c07418SJames Feist 327cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 328cc9139ecSJason M. Bills 329cc9139ecSJason M. Bills /** 330684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 331684bb4b8SJason M. Bills * Message body: "The event subscription has been terminated." 332684bb4b8SJason M. Bills * 333684bb4b8SJason M. Bills * 334684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 33565176d39SEd Tanous nlohmann::json subscriptionTerminated(); 336684bb4b8SJason M. Bills 337684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 338684bb4b8SJason M. Bills 339684bb4b8SJason M. Bills /** 340cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 341cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 342cc9139ecSJason M. Bills * with the @odata.type of the resource which is <arg2>." 343cc9139ecSJason M. Bills * 344cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 345cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 346cc9139ecSJason M. Bills * 347cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 3481668ce6dSEd Tanous nlohmann::json resourceTypeIncompatible(std::string_view arg1, 3491668ce6dSEd Tanous std::string_view arg2); 350b5c07418SJames Feist 3511668ce6dSEd Tanous void resourceTypeIncompatible(crow::Response& res, std::string_view arg1, 3521668ce6dSEd Tanous std::string_view arg2); 353cc9139ecSJason M. Bills 354cc9139ecSJason M. Bills /** 355684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 356684bb4b8SJason M. Bills * Message body: "In order to complete the operation, a component reset is 357684bb4b8SJason M. Bills * required with the Reset action URI '<arg1>' and ResetType '<arg2>'." 358684bb4b8SJason M. Bills * 359684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 360684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 361684bb4b8SJason M. Bills * 362684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 363ace85d60SEd Tanous nlohmann::json resetRequired(const boost::urls::url_view& arg1, 3641668ce6dSEd Tanous std::string_view arg2); 365684bb4b8SJason M. Bills 366ace85d60SEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view& arg1, 3671668ce6dSEd Tanous std::string_view arg2); 368684bb4b8SJason M. Bills 369684bb4b8SJason M. Bills /** 370684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 371684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered on to 372684bb4b8SJason M. Bills * perform this request." 373684bb4b8SJason M. Bills * 374684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 375684bb4b8SJason M. Bills * 376684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 3771668ce6dSEd Tanous nlohmann::json chassisPowerStateOnRequired(std::string_view arg1); 378684bb4b8SJason M. Bills 3791668ce6dSEd Tanous void chassisPowerStateOnRequired(crow::Response& res, std::string_view arg1); 380684bb4b8SJason M. Bills 381684bb4b8SJason M. Bills /** 382684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 383684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered off to 384684bb4b8SJason M. Bills * perform this request." 385684bb4b8SJason M. Bills * 386684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 387684bb4b8SJason M. Bills * 388684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 3891668ce6dSEd Tanous nlohmann::json chassisPowerStateOffRequired(std::string_view arg1); 390684bb4b8SJason M. Bills 3911668ce6dSEd Tanous void chassisPowerStateOffRequired(crow::Response& res, std::string_view arg1); 392684bb4b8SJason M. Bills 393684bb4b8SJason M. Bills /** 394684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 395684bb4b8SJason M. Bills * Message body: "The property '<arg1>' could not be written because its value 396684bb4b8SJason M. Bills * would conflict with the value of the '<arg2>' property." 397684bb4b8SJason M. Bills * 398684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 399684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 400684bb4b8SJason M. Bills * 401684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 4021668ce6dSEd Tanous nlohmann::json propertyValueConflict(std::string_view arg1, 4031668ce6dSEd Tanous std::string_view arg2); 404684bb4b8SJason M. Bills 4051668ce6dSEd Tanous void propertyValueConflict(crow::Response& res, std::string_view arg1, 4061668ce6dSEd Tanous std::string_view arg2); 407684bb4b8SJason M. Bills 408684bb4b8SJason M. Bills /** 409684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 410684bb4b8SJason M. Bills * Message body: "The property '<arg1>' with the requested value of '<arg2>' 411684bb4b8SJason M. Bills * could not be written because the value does not meet the constraints of the 412684bb4b8SJason M. Bills * implementation." 413684bb4b8SJason M. Bills * 414684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 415684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 416684bb4b8SJason M. Bills * 417684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 4181668ce6dSEd Tanous nlohmann::json propertyValueIncorrect(std::string_view arg1, 4191668ce6dSEd Tanous std::string_view arg2); 420684bb4b8SJason M. Bills 4211668ce6dSEd Tanous void propertyValueIncorrect(crow::Response& res, std::string_view arg1, 4221668ce6dSEd Tanous std::string_view arg2); 423684bb4b8SJason M. Bills 424684bb4b8SJason M. Bills /** 425684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 426684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 427684bb4b8SJason M. Bills * at URI '<arg1>' that conflicts with the creation request." 428684bb4b8SJason M. Bills * 429684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 430684bb4b8SJason M. Bills * 431684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 432*f7725d79SEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view& arg1); 433684bb4b8SJason M. Bills 434*f7725d79SEd Tanous void resourceCreationConflict(crow::Response& res, 435*f7725d79SEd Tanous const boost::urls::url_view& arg1); 436684bb4b8SJason M. Bills 437684bb4b8SJason M. Bills /** 438684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 439684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 440684bb4b8SJason M. Bills * 441684bb4b8SJason M. Bills * 442684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 44365176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 444684bb4b8SJason M. Bills 445684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 446684bb4b8SJason M. Bills 447684bb4b8SJason M. Bills /** 448684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 449684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 450684bb4b8SJason M. Bills * this resource." 451684bb4b8SJason M. Bills * 452684bb4b8SJason M. Bills * 453684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 45465176d39SEd Tanous nlohmann::json preconditionFailed(); 455684bb4b8SJason M. Bills 456684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 457684bb4b8SJason M. Bills 458684bb4b8SJason M. Bills /** 459684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 460684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 461684bb4b8SJason M. Bills * resource." 462684bb4b8SJason M. Bills * 463684bb4b8SJason M. Bills * 464684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 46565176d39SEd Tanous nlohmann::json preconditionRequired(); 466684bb4b8SJason M. Bills 467684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 468684bb4b8SJason M. Bills 469684bb4b8SJason M. Bills /** 470684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 471684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 472684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 473684bb4b8SJason M. Bills * 474684bb4b8SJason M. Bills * 475684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 47665176d39SEd Tanous nlohmann::json operationFailed(); 477684bb4b8SJason M. Bills 478684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 479684bb4b8SJason M. Bills 480684bb4b8SJason M. Bills /** 481684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 482684bb4b8SJason M. Bills * Message body: "A timeout internal to the service occured as part of the 483684bb4b8SJason M. Bills * request. Partial results may have been returned." 484684bb4b8SJason M. Bills * 485684bb4b8SJason M. Bills * 486684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 48765176d39SEd Tanous nlohmann::json operationTimeout(); 488684bb4b8SJason M. Bills 489684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 490684bb4b8SJason M. Bills 491684bb4b8SJason M. Bills /** 492f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 49366ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 494f4c4dcf4SKowalski, Kamil * type than the property can accept." 495f4c4dcf4SKowalski, Kamil * 496f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 497f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 498f4c4dcf4SKowalski, Kamil * 499f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 5001668ce6dSEd Tanous nlohmann::json propertyValueTypeError(std::string_view arg1, 5011668ce6dSEd Tanous std::string_view arg2); 502b5c07418SJames Feist 5031668ce6dSEd Tanous void propertyValueTypeError(crow::Response& res, std::string_view arg1, 5041668ce6dSEd Tanous std::string_view arg2); 505f4c4dcf4SKowalski, Kamil 506f4c4dcf4SKowalski, Kamil /** 507f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 50866ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 509f4c4dcf4SKowalski, Kamil * found." 510f4c4dcf4SKowalski, Kamil * 511f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 512f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 513f4c4dcf4SKowalski, Kamil * 514f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 5151668ce6dSEd Tanous nlohmann::json resourceNotFound(std::string_view arg1, std::string_view arg2); 516b5c07418SJames Feist 5171668ce6dSEd Tanous void resourceNotFound(crow::Response& res, std::string_view arg1, 5181668ce6dSEd Tanous std::string_view arg2); 519f4c4dcf4SKowalski, Kamil 520f4c4dcf4SKowalski, Kamil /** 521f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 52255c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 52366ac2b8cSJason M. Bills * <arg1>." 524f4c4dcf4SKowalski, Kamil * 525f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 526f4c4dcf4SKowalski, Kamil * 527f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 528ace85d60SEd Tanous nlohmann::json couldNotEstablishConnection(const boost::urls::url_view& arg1); 529b5c07418SJames Feist 530ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res, 531ace85d60SEd Tanous const boost::urls::url_view& arg1); 532f4c4dcf4SKowalski, Kamil 533f4c4dcf4SKowalski, Kamil /** 534f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 53566ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 536f4c4dcf4SKowalski, Kamil * assigned a value." 537f4c4dcf4SKowalski, Kamil * 538f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 539f4c4dcf4SKowalski, Kamil * 540f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 5411668ce6dSEd Tanous nlohmann::json propertyNotWritable(std::string_view arg1); 542b5c07418SJames Feist 5431668ce6dSEd Tanous void propertyNotWritable(crow::Response& res, std::string_view arg1); 544f12894f8SJason M. Bills 545f12894f8SJason M. Bills /** 546f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 54766ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 548f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 549f4c4dcf4SKowalski, Kamil * 550f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 551f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 552f4c4dcf4SKowalski, Kamil * 553f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 5541668ce6dSEd Tanous nlohmann::json queryParameterValueTypeError(std::string_view arg1, 5551668ce6dSEd Tanous std::string_view arg2); 556b5c07418SJames Feist 5571668ce6dSEd Tanous void queryParameterValueTypeError(crow::Response& res, std::string_view arg1, 5581668ce6dSEd Tanous std::string_view arg2); 559f4c4dcf4SKowalski, Kamil 560f4c4dcf4SKowalski, Kamil /** 561f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 562f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 563f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 564f4c4dcf4SKowalski, Kamil * 565f4c4dcf4SKowalski, Kamil * 566f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 56765176d39SEd Tanous nlohmann::json serviceShuttingDown(); 568b5c07418SJames Feist 569f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 570f4c4dcf4SKowalski, Kamil 571f4c4dcf4SKowalski, Kamil /** 572f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 57366ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 57466ac2b8cSJason M. Bills * the parameter <arg2>." 575f4c4dcf4SKowalski, Kamil * 576f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 577f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 578f4c4dcf4SKowalski, Kamil * 579f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 5801668ce6dSEd Tanous nlohmann::json actionParameterDuplicate(std::string_view arg1, 5811668ce6dSEd Tanous std::string_view arg2); 582b5c07418SJames Feist 5831668ce6dSEd Tanous void actionParameterDuplicate(crow::Response& res, std::string_view arg1, 5841668ce6dSEd Tanous std::string_view arg2); 585f4c4dcf4SKowalski, Kamil 586f4c4dcf4SKowalski, Kamil /** 587f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 58866ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 589f4c4dcf4SKowalski, Kamil * the target resource." 590f4c4dcf4SKowalski, Kamil * 591f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 592f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 593f4c4dcf4SKowalski, Kamil * 594f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 5951668ce6dSEd Tanous nlohmann::json actionParameterNotSupported(std::string_view arg1, 5961668ce6dSEd Tanous std::string_view arg2); 597b5c07418SJames Feist 5981668ce6dSEd Tanous void actionParameterNotSupported(crow::Response& res, std::string_view arg1, 5991668ce6dSEd Tanous std::string_view arg2); 600f4c4dcf4SKowalski, Kamil 601f4c4dcf4SKowalski, Kamil /** 602f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 60366ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 60466ac2b8cSJason M. Bills * specified protocol <arg2>." 605f4c4dcf4SKowalski, Kamil * 606f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 607f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 608f4c4dcf4SKowalski, Kamil * 609f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 610ace85d60SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(const boost::urls::url_view& arg1, 6111668ce6dSEd Tanous std::string_view arg2); 612b5c07418SJames Feist 613ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 614ace85d60SEd Tanous const boost::urls::url_view& arg1, 6151668ce6dSEd Tanous std::string_view arg2); 616f4c4dcf4SKowalski, Kamil 617f4c4dcf4SKowalski, Kamil /** 618f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 619f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 620f4c4dcf4SKowalski, Kamil * 621f4c4dcf4SKowalski, Kamil * 622f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 62365176d39SEd Tanous nlohmann::json accountRemoved(); 624b5c07418SJames Feist 625f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 626f4c4dcf4SKowalski, Kamil 627f4c4dcf4SKowalski, Kamil /** 628f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 62966ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 630f4c4dcf4SKowalski, Kamil * service denied access." 631f4c4dcf4SKowalski, Kamil * 632f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 633f4c4dcf4SKowalski, Kamil * 634f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 635*f7725d79SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view& arg1); 636b5c07418SJames Feist 637*f7725d79SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view& arg1); 638f4c4dcf4SKowalski, Kamil 639f4c4dcf4SKowalski, Kamil /** 640f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 641f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 642f4c4dcf4SKowalski, Kamil * 643f4c4dcf4SKowalski, Kamil * 644f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 64565176d39SEd Tanous nlohmann::json queryNotSupported(); 646b5c07418SJames Feist 647f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 648f4c4dcf4SKowalski, Kamil 649f4c4dcf4SKowalski, Kamil /** 650f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 651f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 652f4c4dcf4SKowalski, Kamil * the limit of possible resources." 653f4c4dcf4SKowalski, Kamil * 654f4c4dcf4SKowalski, Kamil * 655f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 65665176d39SEd Tanous nlohmann::json createLimitReachedForResource(); 657b5c07418SJames Feist 658f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 659f4c4dcf4SKowalski, Kamil 660f4c4dcf4SKowalski, Kamil /** 661f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 662f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 663f4c4dcf4SKowalski, Kamil * information." 664f4c4dcf4SKowalski, Kamil * 665f4c4dcf4SKowalski, Kamil * 666f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 66765176d39SEd Tanous nlohmann::json generalError(); 668b5c07418SJames Feist 669f12894f8SJason M. Bills void generalError(crow::Response& res); 670f4c4dcf4SKowalski, Kamil 671f4c4dcf4SKowalski, Kamil /** 672f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 673f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 674f4c4dcf4SKowalski, Kamil * 675f4c4dcf4SKowalski, Kamil * 676f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 67765176d39SEd Tanous nlohmann::json success(); 678b5c07418SJames Feist 679f12894f8SJason M. Bills void success(crow::Response& res); 680f12894f8SJason M. Bills 681f12894f8SJason M. Bills /** 682f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 683f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 684f4c4dcf4SKowalski, Kamil * 685f4c4dcf4SKowalski, Kamil * 686f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 68765176d39SEd Tanous nlohmann::json created(); 688b5c07418SJames Feist 689f12894f8SJason M. Bills void created(crow::Response& res); 690f4c4dcf4SKowalski, Kamil 691f4c4dcf4SKowalski, Kamil /** 692cc9139ecSJason M. Bills * @brief Formats NoOperation message into JSON 693cc9139ecSJason M. Bills * Message body: "The request body submitted contain no data to act upon and 694cc9139ecSJason M. Bills * no changes to the resource took place." 695cc9139ecSJason M. Bills * 696cc9139ecSJason M. Bills * 697cc9139ecSJason M. Bills * @returns Message NoOperation formatted to JSON */ 69865176d39SEd Tanous nlohmann::json noOperation(); 699b5c07418SJames Feist 700cc9139ecSJason M. Bills void noOperation(crow::Response& res); 701cc9139ecSJason M. Bills 702cc9139ecSJason M. Bills /** 703f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 70466ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 705f4c4dcf4SKowalski, Kamil * the resource." 706f4c4dcf4SKowalski, Kamil * 707f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 708f4c4dcf4SKowalski, Kamil * 709f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 7101668ce6dSEd Tanous nlohmann::json propertyUnknown(std::string_view arg1); 711b5c07418SJames Feist 7121668ce6dSEd Tanous void propertyUnknown(crow::Response& res, std::string_view arg1); 713f12894f8SJason M. Bills 714f12894f8SJason M. Bills /** 715f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 716f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 717f4c4dcf4SKowalski, Kamil * implementation." 718f4c4dcf4SKowalski, Kamil * 719f4c4dcf4SKowalski, Kamil * 720f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 72165176d39SEd Tanous nlohmann::json noValidSession(); 722b5c07418SJames Feist 723f12894f8SJason M. Bills void noValidSession(crow::Response& res); 724f4c4dcf4SKowalski, Kamil 725f4c4dcf4SKowalski, Kamil /** 726f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 72766ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 728f4c4dcf4SKowalski, Kamil * 729f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 730f4c4dcf4SKowalski, Kamil * 731f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 732ace85d60SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view& arg1); 733b5c07418SJames Feist 734ace85d60SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view& arg1); 735f4c4dcf4SKowalski, Kamil 736f4c4dcf4SKowalski, Kamil /** 737f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 738f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 739f4c4dcf4SKowalski, Kamil * standby." 740f4c4dcf4SKowalski, Kamil * 741f4c4dcf4SKowalski, Kamil * 742f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 74365176d39SEd Tanous nlohmann::json resourceInStandby(); 744b5c07418SJames Feist 745f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 746f4c4dcf4SKowalski, Kamil 747f4c4dcf4SKowalski, Kamil /** 748f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 74966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 750f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 751f4c4dcf4SKowalski, Kamil * 752f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 753f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 754f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 755f4c4dcf4SKowalski, Kamil * 756f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 7571668ce6dSEd Tanous nlohmann::json actionParameterValueTypeError(std::string_view arg1, 7581668ce6dSEd Tanous std::string_view arg2, 7591668ce6dSEd Tanous std::string_view arg3); 760b5c07418SJames Feist 7611668ce6dSEd Tanous void actionParameterValueTypeError(crow::Response& res, std::string_view arg1, 7621668ce6dSEd Tanous std::string_view arg2, 7631668ce6dSEd Tanous std::string_view arg3); 764f4c4dcf4SKowalski, Kamil 765f4c4dcf4SKowalski, Kamil /** 766f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 767f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 768f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 769f4c4dcf4SKowalski, Kamil * 770f4c4dcf4SKowalski, Kamil * 771f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 77265176d39SEd Tanous nlohmann::json sessionLimitExceeded(); 773b5c07418SJames Feist 774f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 775f4c4dcf4SKowalski, Kamil 776f4c4dcf4SKowalski, Kamil /** 777f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 77866ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 779f4c4dcf4SKowalski, Kamil * 780f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 781f4c4dcf4SKowalski, Kamil * 782f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 7831668ce6dSEd Tanous nlohmann::json actionNotSupported(std::string_view arg1); 784b5c07418SJames Feist 7851668ce6dSEd Tanous void actionNotSupported(crow::Response& res, std::string_view arg1); 786f4c4dcf4SKowalski, Kamil 787f4c4dcf4SKowalski, Kamil /** 788f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 78966ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 790f4c4dcf4SKowalski, Kamil * 791f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 792f4c4dcf4SKowalski, Kamil * 793f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 7945187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1); 795b5c07418SJames Feist 7965187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1); 797f4c4dcf4SKowalski, Kamil 798f4c4dcf4SKowalski, Kamil /** 799f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 800f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 801f4c4dcf4SKowalski, Kamil * the service is unable to process it." 802f4c4dcf4SKowalski, Kamil * 803f4c4dcf4SKowalski, Kamil * 804f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 80565176d39SEd Tanous nlohmann::json emptyJSON(); 806b5c07418SJames Feist 807f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 808f4c4dcf4SKowalski, Kamil 809f4c4dcf4SKowalski, Kamil /** 810f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 811f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 812f4c4dcf4SKowalski, Kamil * 813f4c4dcf4SKowalski, Kamil * 814f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 81565176d39SEd Tanous nlohmann::json queryNotSupportedOnResource(); 816b5c07418SJames Feist 817f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 818f4c4dcf4SKowalski, Kamil 819f4c4dcf4SKowalski, Kamil /** 820684bb4b8SJason M. Bills * @brief Formats QueryNotSupportedOnOperation message into JSON 821684bb4b8SJason M. Bills * Message body: "Querying is not supported with the requested operation." 822684bb4b8SJason M. Bills * 823684bb4b8SJason M. Bills * 824684bb4b8SJason M. Bills * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 82565176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 826684bb4b8SJason M. Bills 827684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res); 828684bb4b8SJason M. Bills 829684bb4b8SJason M. Bills /** 830684bb4b8SJason M. Bills * @brief Formats QueryCombinationInvalid message into JSON 831684bb4b8SJason M. Bills * Message body: "Two or more query parameters in the request cannot be used 832684bb4b8SJason M. Bills * together." 833684bb4b8SJason M. Bills * 834684bb4b8SJason M. Bills * 835684bb4b8SJason M. Bills * @returns Message QueryCombinationInvalid formatted to JSON */ 83665176d39SEd Tanous nlohmann::json queryCombinationInvalid(); 837684bb4b8SJason M. Bills 838684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res); 839684bb4b8SJason M. Bills 840684bb4b8SJason M. Bills /** 841f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 842f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 843f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 844f4c4dcf4SKowalski, Kamil * operation." 845f4c4dcf4SKowalski, Kamil * 846f4c4dcf4SKowalski, Kamil * 847f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 84865176d39SEd Tanous nlohmann::json insufficientPrivilege(); 849b5c07418SJames Feist 850f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 851f4c4dcf4SKowalski, Kamil 852f4c4dcf4SKowalski, Kamil /** 853f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 85466ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 855f4c4dcf4SKowalski, Kamil * modification by the service." 856f4c4dcf4SKowalski, Kamil * 857f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 858f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 859f4c4dcf4SKowalski, Kamil * 860f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 8611668ce6dSEd Tanous nlohmann::json propertyValueModified(std::string_view arg1, 8621668ce6dSEd Tanous std::string_view arg2); 863b5c07418SJames Feist 8641668ce6dSEd Tanous void propertyValueModified(crow::Response& res, std::string_view arg1, 8651668ce6dSEd Tanous std::string_view arg2); 866f4c4dcf4SKowalski, Kamil 867f4c4dcf4SKowalski, Kamil /** 868f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 869f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 870f4c4dcf4SKowalski, Kamil * 871f4c4dcf4SKowalski, Kamil * 872f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 87365176d39SEd Tanous nlohmann::json accountNotModified(); 874b5c07418SJames Feist 875f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 876f4c4dcf4SKowalski, Kamil 877f4c4dcf4SKowalski, Kamil /** 878f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 87966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 880f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 881f4c4dcf4SKowalski, Kamil * 882f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 883f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 884f4c4dcf4SKowalski, Kamil * 885f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 886b5c07418SJames Feist 8871668ce6dSEd Tanous nlohmann::json queryParameterValueFormatError(std::string_view arg1, 8881668ce6dSEd Tanous std::string_view arg2); 889b5c07418SJames Feist 8901668ce6dSEd Tanous void queryParameterValueFormatError(crow::Response& res, std::string_view arg1, 8911668ce6dSEd Tanous std::string_view arg2); 892f4c4dcf4SKowalski, Kamil 893f4c4dcf4SKowalski, Kamil /** 894f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 89566ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 896f4c4dcf4SKowalski, Kamil * included in the request." 897f4c4dcf4SKowalski, Kamil * 898f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 899f4c4dcf4SKowalski, Kamil * 900f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 9011668ce6dSEd Tanous nlohmann::json propertyMissing(std::string_view arg1); 902b5c07418SJames Feist 9031668ce6dSEd Tanous void propertyMissing(crow::Response& res, std::string_view arg1); 904f12894f8SJason M. Bills 905f12894f8SJason M. Bills /** 906f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 90766ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 908f4c4dcf4SKowalski, Kamil * unavailability of resources." 909f4c4dcf4SKowalski, Kamil * 910f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 911f4c4dcf4SKowalski, Kamil * 912f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 9131668ce6dSEd Tanous nlohmann::json resourceExhaustion(std::string_view arg1); 914b5c07418SJames Feist 9151668ce6dSEd Tanous void resourceExhaustion(crow::Response& res, std::string_view arg1); 916f4c4dcf4SKowalski, Kamil 917f4c4dcf4SKowalski, Kamil /** 918f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 919f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 920f4c4dcf4SKowalski, Kamil * 921f4c4dcf4SKowalski, Kamil * 922f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 92365176d39SEd Tanous nlohmann::json accountModified(); 924b5c07418SJames Feist 925a08b46ccSJason M. Bills void accountModified(crow::Response& res); 926f4c4dcf4SKowalski, Kamil 927f4c4dcf4SKowalski, Kamil /** 928f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 92966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 93066ac2b8cSJason M. Bills * range <arg3>." 931f4c4dcf4SKowalski, Kamil * 932f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 933f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 934f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 935f4c4dcf4SKowalski, Kamil * 936f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 9371668ce6dSEd Tanous nlohmann::json queryParameterOutOfRange(std::string_view arg1, 9381668ce6dSEd Tanous std::string_view arg2, 9391668ce6dSEd Tanous std::string_view arg3); 940b5c07418SJames Feist 9411668ce6dSEd Tanous void queryParameterOutOfRange(crow::Response& res, std::string_view arg1, 9421668ce6dSEd Tanous std::string_view arg2, std::string_view arg3); 943f4c4dcf4SKowalski, Kamil 9443bf4e632SJoseph Reynolds /** 9453bf4e632SJoseph Reynolds * @brief Formats PasswordChangeRequired message into JSON 9463bf4e632SJoseph Reynolds * Message body: The password provided for this account must be changed 9473bf4e632SJoseph Reynolds * before access is granted. PATCH the 'Password' property for this 9483bf4e632SJoseph Reynolds * account located at the target URI '%1' to complete this process. 9493bf4e632SJoseph Reynolds * 9503bf4e632SJoseph Reynolds * @param[in] arg1 Parameter of message that will replace %1 in its body. 9513bf4e632SJoseph Reynolds * 9523bf4e632SJoseph Reynolds * @returns Message PasswordChangeRequired formatted to JSON */ 953ace85d60SEd Tanous 954ace85d60SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view& arg1); 955ace85d60SEd Tanous 956ace85d60SEd Tanous void passwordChangeRequired(crow::Response& res, 957ace85d60SEd Tanous const boost::urls::url_view& arg1); 9583bf4e632SJoseph Reynolds 9594cde5d90SJames Feist /** 9604cde5d90SJames Feist * @brief Formats InvalidUpload message into JSON 9614cde5d90SJames Feist * Message body: Invalid file uploaded to %1: %2.* 9624cde5d90SJames Feist * @param[in] arg1 Parameter of message that will replace %1 in its body. 9634cde5d90SJames Feist * @param[in] arg2 Parameter of message that will replace %2 in its body. 9644cde5d90SJames Feist * 9654cde5d90SJames Feist * @returns Message InvalidUpload formatted to JSON */ 9661668ce6dSEd Tanous nlohmann::json invalidUpload(std::string_view arg1, std::string_view arg2); 9674cde5d90SJames Feist 9681668ce6dSEd Tanous void invalidUpload(crow::Response& res, std::string_view arg1, 9691668ce6dSEd Tanous std::string_view arg2); 9704cde5d90SJames Feist 971f4c4dcf4SKowalski, Kamil } // namespace messages 972f4c4dcf4SKowalski, Kamil 973f4c4dcf4SKowalski, Kamil } // namespace redfish 974