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 19*ace85d60SEd 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 */ 63*ace85d60SEd Tanous nlohmann::json resourceMissingAtURI(const boost::urls::url_view& arg1); 64b5c07418SJames Feist 65*ace85d60SEd Tanous void resourceMissingAtURI(crow::Response& res, 66*ace85d60SEd 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 */ 78b5c07418SJames Feist nlohmann::json actionParameterValueFormatError(const std::string& arg1, 79b5c07418SJames Feist const std::string& arg2, 80b5c07418SJames Feist const std::string& arg3); 81b5c07418SJames Feist 82f12894f8SJason M. Bills void actionParameterValueFormatError(crow::Response& res, 83f12894f8SJason M. Bills const std::string& arg1, 84f4c4dcf4SKowalski, Kamil const std::string& arg2, 85f4c4dcf4SKowalski, Kamil const std::string& arg3); 86f4c4dcf4SKowalski, Kamil 87f4c4dcf4SKowalski, Kamil /** 88f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 89f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 90f4c4dcf4SKowalski, Kamil * service is still operational." 91f4c4dcf4SKowalski, Kamil * 92f4c4dcf4SKowalski, Kamil * 93f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 9465176d39SEd Tanous nlohmann::json internalError(); 95b5c07418SJames Feist 969eb808c1SEd Tanous void internalError(crow::Response& res, bmcweb::source_location location = 97df5415fcSEd Tanous bmcweb::source_location::current()); 98f12894f8SJason M. Bills 99f12894f8SJason M. Bills /** 100f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 101f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 102f4c4dcf4SKowalski, Kamil * unable to interpret." 103f4c4dcf4SKowalski, Kamil * 104f4c4dcf4SKowalski, Kamil * 105f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 10665176d39SEd Tanous nlohmann::json unrecognizedRequestBody(); 107b5c07418SJames Feist 108f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 109f4c4dcf4SKowalski, Kamil 110f4c4dcf4SKowalski, Kamil /** 111f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 11266ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 11366ac2b8cSJason M. Bills * an authorization error <arg2>." 114f4c4dcf4SKowalski, Kamil * 115f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 116f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 117f4c4dcf4SKowalski, Kamil * 118f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 119*ace85d60SEd Tanous nlohmann::json resourceAtUriUnauthorized(const boost::urls::url_view& arg1, 120b5c07418SJames Feist const std::string& arg2); 121b5c07418SJames Feist 122*ace85d60SEd Tanous void resourceAtUriUnauthorized(crow::Response& res, 123*ace85d60SEd Tanous const boost::urls::url_view& arg1, 124f4c4dcf4SKowalski, Kamil const std::string& arg2); 125f4c4dcf4SKowalski, Kamil 126f4c4dcf4SKowalski, Kamil /** 127f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 12866ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 12966ac2b8cSJason M. Bills * <arg2>." 130f4c4dcf4SKowalski, Kamil * 131f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 132f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 133f4c4dcf4SKowalski, Kamil * 134f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 135b5c07418SJames Feist nlohmann::json actionParameterUnknown(const std::string& arg1, 136b5c07418SJames Feist const std::string& arg2); 137b5c07418SJames Feist 138f12894f8SJason M. Bills void actionParameterUnknown(crow::Response& res, const std::string& arg1, 139f4c4dcf4SKowalski, Kamil const std::string& arg2); 140f4c4dcf4SKowalski, Kamil 141f4c4dcf4SKowalski, Kamil /** 142f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 143f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 144f4c4dcf4SKowalski, Kamil * cannot be deleted." 145f4c4dcf4SKowalski, Kamil * 146f4c4dcf4SKowalski, Kamil * 147f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 14865176d39SEd Tanous nlohmann::json resourceCannotBeDeleted(); 149b5c07418SJames Feist 150f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 151f4c4dcf4SKowalski, Kamil 152f4c4dcf4SKowalski, Kamil /** 153f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 15466ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 155f4c4dcf4SKowalski, Kamil * 156f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 157f4c4dcf4SKowalski, Kamil * 158f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 159b5c07418SJames Feist nlohmann::json propertyDuplicate(const std::string& arg1); 160b5c07418SJames Feist 161f12894f8SJason M. Bills void propertyDuplicate(crow::Response& res, const std::string& arg1); 162f4c4dcf4SKowalski, Kamil 163f4c4dcf4SKowalski, Kamil /** 164f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 16566ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 166f4c4dcf4SKowalski, Kamil * seconds." 167f4c4dcf4SKowalski, Kamil * 168f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 169f4c4dcf4SKowalski, Kamil * 170f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 171b5c07418SJames Feist nlohmann::json serviceTemporarilyUnavailable(const std::string& arg1); 172b5c07418SJames Feist 173f12894f8SJason M. Bills void serviceTemporarilyUnavailable(crow::Response& res, 174f12894f8SJason M. Bills const std::string& arg1); 175f4c4dcf4SKowalski, Kamil 176f4c4dcf4SKowalski, Kamil /** 177f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 17866ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 17966ac2b8cSJason M. Bills * with the value <arg3> already exists." 180f4c4dcf4SKowalski, Kamil * 181f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 182f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 183f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 184f4c4dcf4SKowalski, Kamil * 185f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 186b5c07418SJames Feist nlohmann::json resourceAlreadyExists(const std::string& arg1, 187b5c07418SJames Feist const std::string& arg2, 188b5c07418SJames Feist const std::string& arg3); 189b5c07418SJames Feist 190f12894f8SJason M. Bills void resourceAlreadyExists(crow::Response& res, const std::string& arg1, 191f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 192f4c4dcf4SKowalski, Kamil 193f4c4dcf4SKowalski, Kamil /** 194f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 195f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 196f4c4dcf4SKowalski, Kamil * current session has been removed as well." 197f4c4dcf4SKowalski, Kamil * 198f4c4dcf4SKowalski, Kamil * 199f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 20065176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 201b5c07418SJames Feist 202f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 203f4c4dcf4SKowalski, Kamil 204f4c4dcf4SKowalski, Kamil /** 205f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 206f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 20766ac2b8cSJason M. Bills * <arg1> was missing from the request." 208f4c4dcf4SKowalski, Kamil * 209f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 210f4c4dcf4SKowalski, Kamil * 211f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 212b5c07418SJames Feist nlohmann::json createFailedMissingReqProperties(const std::string& arg1); 213b5c07418SJames Feist 214f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 215f12894f8SJason M. Bills const std::string& arg1); 216f4c4dcf4SKowalski, Kamil 217f4c4dcf4SKowalski, Kamil /** 218f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 21966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 220f4c4dcf4SKowalski, Kamil * format than the property can accept." 221f4c4dcf4SKowalski, Kamil * 222f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 223f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 224f4c4dcf4SKowalski, Kamil * 225f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 226b5c07418SJames Feist nlohmann::json propertyValueFormatError(const std::string& arg1, 227b5c07418SJames Feist const std::string& arg2); 228b5c07418SJames Feist 229f12894f8SJason M. Bills void propertyValueFormatError(crow::Response& res, const std::string& arg1, 230f4c4dcf4SKowalski, Kamil const std::string& arg2); 231f4c4dcf4SKowalski, Kamil 232f4c4dcf4SKowalski, Kamil /** 233f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 23466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 235f4c4dcf4SKowalski, Kamil * acceptable values." 236f4c4dcf4SKowalski, Kamil * 237f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 238f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 239f4c4dcf4SKowalski, Kamil * 240f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 241b5c07418SJames Feist nlohmann::json propertyValueNotInList(const std::string& arg1, 242b5c07418SJames Feist const std::string& arg2); 243b5c07418SJames Feist 244f12894f8SJason M. Bills void propertyValueNotInList(crow::Response& res, const std::string& arg1, 245f4c4dcf4SKowalski, Kamil const std::string& arg2); 246f4c4dcf4SKowalski, Kamil 247f4c4dcf4SKowalski, Kamil /** 248f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 24966ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 250f4c4dcf4SKowalski, Kamil * service." 251f4c4dcf4SKowalski, Kamil * 252f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 253f4c4dcf4SKowalski, Kamil * 254f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 255*ace85d60SEd Tanous nlohmann::json resourceAtUriInUnknownFormat(const boost::urls::url_view& arg1); 256b5c07418SJames Feist 257*ace85d60SEd Tanous void resourceAtUriInUnknownFormat(crow::Response& res, 258*ace85d60SEd Tanous const boost::urls::url_view& arg1); 259f4c4dcf4SKowalski, Kamil 260f4c4dcf4SKowalski, Kamil /** 26181856681SAsmitha Karunanithi * @brief Formats ServiceDisabled message into JSON 26281856681SAsmitha Karunanithi * Message body: "The operation failed because the service at <arg1> is disabled 26381856681SAsmitha Karunanithi * and " cannot accept requests." 26481856681SAsmitha Karunanithi * 26581856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 26681856681SAsmitha Karunanithi * 26781856681SAsmitha Karunanithi * @returns Message ServiceDisabled formatted to JSON */ 26881856681SAsmitha Karunanithi nlohmann::json serviceDisabled(const std::string& arg1); 26981856681SAsmitha Karunanithi 27081856681SAsmitha Karunanithi void serviceDisabled(crow::Response& res, const std::string& arg1); 27181856681SAsmitha Karunanithi 27281856681SAsmitha Karunanithi /** 273f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 274f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 275f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 276f4c4dcf4SKowalski, Kamil * 277f4c4dcf4SKowalski, Kamil * 278f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 27965176d39SEd Tanous nlohmann::json serviceInUnknownState(); 280b5c07418SJames Feist 281f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 282f4c4dcf4SKowalski, Kamil 283f4c4dcf4SKowalski, Kamil /** 284f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 285f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 286f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 287f4c4dcf4SKowalski, Kamil * 288f4c4dcf4SKowalski, Kamil * 289f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 29065176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 291b5c07418SJames Feist 292f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 293f4c4dcf4SKowalski, Kamil 294f4c4dcf4SKowalski, Kamil /** 295f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 29666ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 297f4c4dcf4SKowalski, Kamil * in the request body." 298f4c4dcf4SKowalski, Kamil * 299f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 300f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 301f4c4dcf4SKowalski, Kamil * 302f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 303b5c07418SJames Feist nlohmann::json actionParameterMissing(const std::string& arg1, 304b5c07418SJames Feist const std::string& arg2); 305b5c07418SJames Feist 306f12894f8SJason M. Bills void actionParameterMissing(crow::Response& res, const std::string& arg1, 307f4c4dcf4SKowalski, Kamil const std::string& arg2); 308f4c4dcf4SKowalski, Kamil 309f4c4dcf4SKowalski, Kamil /** 310f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 31166ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 312f4c4dcf4SKowalski, Kamil * 313f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 314f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 315f4c4dcf4SKowalski, Kamil * 316f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 317331b2017SEd Tanous nlohmann::json stringValueTooLong(const std::string& arg1, int arg2); 318b5c07418SJames Feist 319331b2017SEd Tanous void stringValueTooLong(crow::Response& res, const std::string& arg1, int arg2); 320f4c4dcf4SKowalski, Kamil 321f4c4dcf4SKowalski, Kamil /** 322cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 323cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 324cc9139ecSJason M. Bills * 325cc9139ecSJason M. Bills * 326cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 32765176d39SEd Tanous nlohmann::json sessionTerminated(); 328b5c07418SJames Feist 329cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 330cc9139ecSJason M. Bills 331cc9139ecSJason M. Bills /** 332684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 333684bb4b8SJason M. Bills * Message body: "The event subscription has been terminated." 334684bb4b8SJason M. Bills * 335684bb4b8SJason M. Bills * 336684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 33765176d39SEd Tanous nlohmann::json subscriptionTerminated(); 338684bb4b8SJason M. Bills 339684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 340684bb4b8SJason M. Bills 341684bb4b8SJason M. Bills /** 342cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 343cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 344cc9139ecSJason M. Bills * with the @odata.type of the resource which is <arg2>." 345cc9139ecSJason M. Bills * 346cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 347cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 348cc9139ecSJason M. Bills * 349cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 350b5c07418SJames Feist nlohmann::json resourceTypeIncompatible(const std::string& arg1, 351b5c07418SJames Feist const std::string& arg2); 352b5c07418SJames Feist 353cc9139ecSJason M. Bills void resourceTypeIncompatible(crow::Response& res, const std::string& arg1, 354cc9139ecSJason M. Bills const std::string& arg2); 355cc9139ecSJason M. Bills 356cc9139ecSJason M. Bills /** 357684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 358684bb4b8SJason M. Bills * Message body: "In order to complete the operation, a component reset is 359684bb4b8SJason M. Bills * required with the Reset action URI '<arg1>' and ResetType '<arg2>'." 360684bb4b8SJason M. Bills * 361684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 362684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 363684bb4b8SJason M. Bills * 364684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 365*ace85d60SEd Tanous nlohmann::json resetRequired(const boost::urls::url_view& arg1, 366*ace85d60SEd Tanous const std::string& arg2); 367684bb4b8SJason M. Bills 368*ace85d60SEd Tanous void resetRequired(crow::Response& res, const boost::urls::url_view& arg1, 369684bb4b8SJason M. Bills const std::string& arg2); 370684bb4b8SJason M. Bills 371684bb4b8SJason M. Bills /** 372684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 373684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered on to 374684bb4b8SJason M. Bills * perform this request." 375684bb4b8SJason M. Bills * 376684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 377684bb4b8SJason M. Bills * 378684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 379684bb4b8SJason M. Bills nlohmann::json chassisPowerStateOnRequired(const std::string& arg1); 380684bb4b8SJason M. Bills 381684bb4b8SJason M. Bills void chassisPowerStateOnRequired(crow::Response& res, const std::string& arg1); 382684bb4b8SJason M. Bills 383684bb4b8SJason M. Bills /** 384684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 385684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered off to 386684bb4b8SJason M. Bills * perform this request." 387684bb4b8SJason M. Bills * 388684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 389684bb4b8SJason M. Bills * 390684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 391684bb4b8SJason M. Bills nlohmann::json chassisPowerStateOffRequired(const std::string& arg1); 392684bb4b8SJason M. Bills 393684bb4b8SJason M. Bills void chassisPowerStateOffRequired(crow::Response& res, const std::string& arg1); 394684bb4b8SJason M. Bills 395684bb4b8SJason M. Bills /** 396684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 397684bb4b8SJason M. Bills * Message body: "The property '<arg1>' could not be written because its value 398684bb4b8SJason M. Bills * would conflict with the value of the '<arg2>' property." 399684bb4b8SJason M. Bills * 400684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 401684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 402684bb4b8SJason M. Bills * 403684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 404684bb4b8SJason M. Bills nlohmann::json propertyValueConflict(const std::string& arg1, 405684bb4b8SJason M. Bills const std::string& arg2); 406684bb4b8SJason M. Bills 407684bb4b8SJason M. Bills void propertyValueConflict(crow::Response& res, const std::string& arg1, 408684bb4b8SJason M. Bills const std::string& arg2); 409684bb4b8SJason M. Bills 410684bb4b8SJason M. Bills /** 411684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 412684bb4b8SJason M. Bills * Message body: "The property '<arg1>' with the requested value of '<arg2>' 413684bb4b8SJason M. Bills * could not be written because the value does not meet the constraints of the 414684bb4b8SJason M. Bills * implementation." 415684bb4b8SJason M. Bills * 416684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 417684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 418684bb4b8SJason M. Bills * 419684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 420684bb4b8SJason M. Bills nlohmann::json propertyValueIncorrect(const std::string& arg1, 421684bb4b8SJason M. Bills const std::string& arg2); 422684bb4b8SJason M. Bills 423684bb4b8SJason M. Bills void propertyValueIncorrect(crow::Response& res, const std::string& arg1, 424684bb4b8SJason M. Bills const std::string& arg2); 425684bb4b8SJason M. Bills 426684bb4b8SJason M. Bills /** 427684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 428684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 429684bb4b8SJason M. Bills * at URI '<arg1>' that conflicts with the creation 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 ResourceCreationConflict formatted to JSON */ 434*ace85d60SEd Tanous nlohmann::json resourceCreationConflict(const boost::urls::url_view& arg1); 435684bb4b8SJason M. Bills 436*ace85d60SEd Tanous void resourceCreationConflict(crow::Response& res, 437*ace85d60SEd Tanous const boost::urls::url_view& arg1); 438684bb4b8SJason M. Bills 439684bb4b8SJason M. Bills /** 440684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 441684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 442684bb4b8SJason M. Bills * 443684bb4b8SJason M. Bills * 444684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 44565176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 446684bb4b8SJason M. Bills 447684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 448684bb4b8SJason M. Bills 449684bb4b8SJason M. Bills /** 450684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 451684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 452684bb4b8SJason M. Bills * this resource." 453684bb4b8SJason M. Bills * 454684bb4b8SJason M. Bills * 455684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 45665176d39SEd Tanous nlohmann::json preconditionFailed(); 457684bb4b8SJason M. Bills 458684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 459684bb4b8SJason M. Bills 460684bb4b8SJason M. Bills /** 461684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 462684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 463684bb4b8SJason M. Bills * resource." 464684bb4b8SJason M. Bills * 465684bb4b8SJason M. Bills * 466684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 46765176d39SEd Tanous nlohmann::json preconditionRequired(); 468684bb4b8SJason M. Bills 469684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 470684bb4b8SJason M. Bills 471684bb4b8SJason M. Bills /** 472684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 473684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 474684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 475684bb4b8SJason M. Bills * 476684bb4b8SJason M. Bills * 477684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 47865176d39SEd Tanous nlohmann::json operationFailed(); 479684bb4b8SJason M. Bills 480684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 481684bb4b8SJason M. Bills 482684bb4b8SJason M. Bills /** 483684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 484684bb4b8SJason M. Bills * Message body: "A timeout internal to the service occured as part of the 485684bb4b8SJason M. Bills * request. Partial results may have been returned." 486684bb4b8SJason M. Bills * 487684bb4b8SJason M. Bills * 488684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 48965176d39SEd Tanous nlohmann::json operationTimeout(); 490684bb4b8SJason M. Bills 491684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 492684bb4b8SJason M. Bills 493684bb4b8SJason M. Bills /** 494f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 49566ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 496f4c4dcf4SKowalski, Kamil * type than the property can accept." 497f4c4dcf4SKowalski, Kamil * 498f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 499f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 500f4c4dcf4SKowalski, Kamil * 501f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 502b5c07418SJames Feist nlohmann::json propertyValueTypeError(const std::string& arg1, 503b5c07418SJames Feist const std::string& arg2); 504b5c07418SJames Feist 505f12894f8SJason M. Bills void propertyValueTypeError(crow::Response& res, const std::string& arg1, 506f4c4dcf4SKowalski, Kamil const std::string& arg2); 507f4c4dcf4SKowalski, Kamil 508f4c4dcf4SKowalski, Kamil /** 509f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 51066ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 511f4c4dcf4SKowalski, Kamil * found." 512f4c4dcf4SKowalski, Kamil * 513f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 514f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 515f4c4dcf4SKowalski, Kamil * 516f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 517b5c07418SJames Feist nlohmann::json resourceNotFound(const std::string& arg1, 518b5c07418SJames Feist const std::string& arg2); 519b5c07418SJames Feist 520f12894f8SJason M. Bills void resourceNotFound(crow::Response& res, const std::string& arg1, 521f4c4dcf4SKowalski, Kamil const std::string& arg2); 522f4c4dcf4SKowalski, Kamil 523f4c4dcf4SKowalski, Kamil /** 524f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 52555c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 52666ac2b8cSJason M. Bills * <arg1>." 527f4c4dcf4SKowalski, Kamil * 528f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 529f4c4dcf4SKowalski, Kamil * 530f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 531*ace85d60SEd Tanous nlohmann::json couldNotEstablishConnection(const boost::urls::url_view& arg1); 532b5c07418SJames Feist 533*ace85d60SEd Tanous void couldNotEstablishConnection(crow::Response& res, 534*ace85d60SEd Tanous const boost::urls::url_view& arg1); 535f4c4dcf4SKowalski, Kamil 536f4c4dcf4SKowalski, Kamil /** 537f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 53866ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 539f4c4dcf4SKowalski, Kamil * assigned a value." 540f4c4dcf4SKowalski, Kamil * 541f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 542f4c4dcf4SKowalski, Kamil * 543f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 544b5c07418SJames Feist nlohmann::json propertyNotWritable(const std::string& arg1); 545b5c07418SJames Feist 546f12894f8SJason M. Bills void propertyNotWritable(crow::Response& res, const std::string& arg1); 547f12894f8SJason M. Bills 548f12894f8SJason M. Bills /** 549f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 55066ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 551f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 552f4c4dcf4SKowalski, Kamil * 553f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 554f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 555f4c4dcf4SKowalski, Kamil * 556f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 557b5c07418SJames Feist nlohmann::json queryParameterValueTypeError(const std::string& arg1, 558b5c07418SJames Feist const std::string& arg2); 559b5c07418SJames Feist 560f12894f8SJason M. Bills void queryParameterValueTypeError(crow::Response& res, const std::string& arg1, 561f4c4dcf4SKowalski, Kamil const std::string& arg2); 562f4c4dcf4SKowalski, Kamil 563f4c4dcf4SKowalski, Kamil /** 564f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 565f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 566f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 567f4c4dcf4SKowalski, Kamil * 568f4c4dcf4SKowalski, Kamil * 569f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 57065176d39SEd Tanous nlohmann::json serviceShuttingDown(); 571b5c07418SJames Feist 572f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 573f4c4dcf4SKowalski, Kamil 574f4c4dcf4SKowalski, Kamil /** 575f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 57666ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 57766ac2b8cSJason M. Bills * the parameter <arg2>." 578f4c4dcf4SKowalski, Kamil * 579f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 580f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 581f4c4dcf4SKowalski, Kamil * 582f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 583b5c07418SJames Feist nlohmann::json actionParameterDuplicate(const std::string& arg1, 584b5c07418SJames Feist const std::string& arg2); 585b5c07418SJames Feist 586f12894f8SJason M. Bills void actionParameterDuplicate(crow::Response& res, const std::string& arg1, 587f4c4dcf4SKowalski, Kamil const std::string& arg2); 588f4c4dcf4SKowalski, Kamil 589f4c4dcf4SKowalski, Kamil /** 590f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 59166ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 592f4c4dcf4SKowalski, Kamil * the target resource." 593f4c4dcf4SKowalski, Kamil * 594f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 595f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 596f4c4dcf4SKowalski, Kamil * 597f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 598b5c07418SJames Feist nlohmann::json actionParameterNotSupported(const std::string& arg1, 599b5c07418SJames Feist const std::string& arg2); 600b5c07418SJames Feist 601f12894f8SJason M. Bills void actionParameterNotSupported(crow::Response& res, const std::string& arg1, 602f4c4dcf4SKowalski, Kamil const std::string& arg2); 603f4c4dcf4SKowalski, Kamil 604f4c4dcf4SKowalski, Kamil /** 605f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 60666ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 60766ac2b8cSJason M. Bills * specified protocol <arg2>." 608f4c4dcf4SKowalski, Kamil * 609f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 610f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 611f4c4dcf4SKowalski, Kamil * 612f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 613*ace85d60SEd Tanous nlohmann::json sourceDoesNotSupportProtocol(const boost::urls::url_view& arg1, 614b5c07418SJames Feist const std::string& arg2); 615b5c07418SJames Feist 616*ace85d60SEd Tanous void sourceDoesNotSupportProtocol(crow::Response& res, 617*ace85d60SEd Tanous const boost::urls::url_view& arg1, 618f4c4dcf4SKowalski, Kamil const std::string& arg2); 619f4c4dcf4SKowalski, Kamil 620f4c4dcf4SKowalski, Kamil /** 621f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 622f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 623f4c4dcf4SKowalski, Kamil * 624f4c4dcf4SKowalski, Kamil * 625f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 62665176d39SEd Tanous nlohmann::json accountRemoved(); 627b5c07418SJames Feist 628f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 629f4c4dcf4SKowalski, Kamil 630f4c4dcf4SKowalski, Kamil /** 631f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 63266ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 633f4c4dcf4SKowalski, Kamil * service denied access." 634f4c4dcf4SKowalski, Kamil * 635f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 636f4c4dcf4SKowalski, Kamil * 637f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 638*ace85d60SEd Tanous nlohmann::json accessDenied(const boost::urls::url_view& arg1); 639b5c07418SJames Feist 640*ace85d60SEd Tanous void accessDenied(crow::Response& res, const boost::urls::url_view& arg1); 641f4c4dcf4SKowalski, Kamil 642f4c4dcf4SKowalski, Kamil /** 643f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 644f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 645f4c4dcf4SKowalski, Kamil * 646f4c4dcf4SKowalski, Kamil * 647f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 64865176d39SEd Tanous nlohmann::json queryNotSupported(); 649b5c07418SJames Feist 650f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 651f4c4dcf4SKowalski, Kamil 652f4c4dcf4SKowalski, Kamil /** 653f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 654f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 655f4c4dcf4SKowalski, Kamil * the limit of possible resources." 656f4c4dcf4SKowalski, Kamil * 657f4c4dcf4SKowalski, Kamil * 658f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 65965176d39SEd Tanous nlohmann::json createLimitReachedForResource(); 660b5c07418SJames Feist 661f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 662f4c4dcf4SKowalski, Kamil 663f4c4dcf4SKowalski, Kamil /** 664f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 665f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 666f4c4dcf4SKowalski, Kamil * information." 667f4c4dcf4SKowalski, Kamil * 668f4c4dcf4SKowalski, Kamil * 669f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 67065176d39SEd Tanous nlohmann::json generalError(); 671b5c07418SJames Feist 672f12894f8SJason M. Bills void generalError(crow::Response& res); 673f4c4dcf4SKowalski, Kamil 674f4c4dcf4SKowalski, Kamil /** 675f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 676f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 677f4c4dcf4SKowalski, Kamil * 678f4c4dcf4SKowalski, Kamil * 679f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 68065176d39SEd Tanous nlohmann::json success(); 681b5c07418SJames Feist 682f12894f8SJason M. Bills void success(crow::Response& res); 683f12894f8SJason M. Bills 684f12894f8SJason M. Bills /** 685f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 686f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 687f4c4dcf4SKowalski, Kamil * 688f4c4dcf4SKowalski, Kamil * 689f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 69065176d39SEd Tanous nlohmann::json created(); 691b5c07418SJames Feist 692f12894f8SJason M. Bills void created(crow::Response& res); 693f4c4dcf4SKowalski, Kamil 694f4c4dcf4SKowalski, Kamil /** 695cc9139ecSJason M. Bills * @brief Formats NoOperation message into JSON 696cc9139ecSJason M. Bills * Message body: "The request body submitted contain no data to act upon and 697cc9139ecSJason M. Bills * no changes to the resource took place." 698cc9139ecSJason M. Bills * 699cc9139ecSJason M. Bills * 700cc9139ecSJason M. Bills * @returns Message NoOperation formatted to JSON */ 70165176d39SEd Tanous nlohmann::json noOperation(); 702b5c07418SJames Feist 703cc9139ecSJason M. Bills void noOperation(crow::Response& res); 704cc9139ecSJason M. Bills 705cc9139ecSJason M. Bills /** 706f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 70766ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 708f4c4dcf4SKowalski, Kamil * the resource." 709f4c4dcf4SKowalski, Kamil * 710f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 711f4c4dcf4SKowalski, Kamil * 712f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 713b5c07418SJames Feist nlohmann::json propertyUnknown(const std::string& arg1); 714b5c07418SJames Feist 715f12894f8SJason M. Bills void propertyUnknown(crow::Response& res, const std::string& arg1); 716f12894f8SJason M. Bills 717f12894f8SJason M. Bills /** 718f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 719f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 720f4c4dcf4SKowalski, Kamil * implementation." 721f4c4dcf4SKowalski, Kamil * 722f4c4dcf4SKowalski, Kamil * 723f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 72465176d39SEd Tanous nlohmann::json noValidSession(); 725b5c07418SJames Feist 726f12894f8SJason M. Bills void noValidSession(crow::Response& res); 727f4c4dcf4SKowalski, Kamil 728f4c4dcf4SKowalski, Kamil /** 729f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 73066ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 731f4c4dcf4SKowalski, Kamil * 732f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 733f4c4dcf4SKowalski, Kamil * 734f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 735*ace85d60SEd Tanous nlohmann::json invalidObject(const boost::urls::url_view& arg1); 736b5c07418SJames Feist 737*ace85d60SEd Tanous void invalidObject(crow::Response& res, const boost::urls::url_view& arg1); 738f4c4dcf4SKowalski, Kamil 739f4c4dcf4SKowalski, Kamil /** 740f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 741f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 742f4c4dcf4SKowalski, Kamil * standby." 743f4c4dcf4SKowalski, Kamil * 744f4c4dcf4SKowalski, Kamil * 745f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 74665176d39SEd Tanous nlohmann::json resourceInStandby(); 747b5c07418SJames Feist 748f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 749f4c4dcf4SKowalski, Kamil 750f4c4dcf4SKowalski, Kamil /** 751f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 75266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 753f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 754f4c4dcf4SKowalski, Kamil * 755f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 756f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 757f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 758f4c4dcf4SKowalski, Kamil * 759f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 760b5c07418SJames Feist nlohmann::json actionParameterValueTypeError(const std::string& arg1, 761b5c07418SJames Feist const std::string& arg2, 762b5c07418SJames Feist const std::string& arg3); 763b5c07418SJames Feist 764f12894f8SJason M. Bills void actionParameterValueTypeError(crow::Response& res, const std::string& arg1, 765f4c4dcf4SKowalski, Kamil const std::string& arg2, 766f4c4dcf4SKowalski, Kamil const std::string& arg3); 767f4c4dcf4SKowalski, Kamil 768f4c4dcf4SKowalski, Kamil /** 769f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 770f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 771f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 772f4c4dcf4SKowalski, Kamil * 773f4c4dcf4SKowalski, Kamil * 774f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 77565176d39SEd Tanous nlohmann::json sessionLimitExceeded(); 776b5c07418SJames Feist 777f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 778f4c4dcf4SKowalski, Kamil 779f4c4dcf4SKowalski, Kamil /** 780f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 78166ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 782f4c4dcf4SKowalski, Kamil * 783f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 784f4c4dcf4SKowalski, Kamil * 785f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 786b5c07418SJames Feist nlohmann::json actionNotSupported(const std::string& arg1); 787b5c07418SJames Feist 788f12894f8SJason M. Bills void actionNotSupported(crow::Response& res, const std::string& arg1); 789f4c4dcf4SKowalski, Kamil 790f4c4dcf4SKowalski, Kamil /** 791f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 79266ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 793f4c4dcf4SKowalski, Kamil * 794f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 795f4c4dcf4SKowalski, Kamil * 796f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 7975187e09bSJosh Lehan nlohmann::json invalidIndex(int64_t arg1); 798b5c07418SJames Feist 7995187e09bSJosh Lehan void invalidIndex(crow::Response& res, int64_t arg1); 800f4c4dcf4SKowalski, Kamil 801f4c4dcf4SKowalski, Kamil /** 802f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 803f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 804f4c4dcf4SKowalski, Kamil * the service is unable to process it." 805f4c4dcf4SKowalski, Kamil * 806f4c4dcf4SKowalski, Kamil * 807f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 80865176d39SEd Tanous nlohmann::json emptyJSON(); 809b5c07418SJames Feist 810f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 811f4c4dcf4SKowalski, Kamil 812f4c4dcf4SKowalski, Kamil /** 813f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 814f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 815f4c4dcf4SKowalski, Kamil * 816f4c4dcf4SKowalski, Kamil * 817f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 81865176d39SEd Tanous nlohmann::json queryNotSupportedOnResource(); 819b5c07418SJames Feist 820f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 821f4c4dcf4SKowalski, Kamil 822f4c4dcf4SKowalski, Kamil /** 823684bb4b8SJason M. Bills * @brief Formats QueryNotSupportedOnOperation message into JSON 824684bb4b8SJason M. Bills * Message body: "Querying is not supported with the requested operation." 825684bb4b8SJason M. Bills * 826684bb4b8SJason M. Bills * 827684bb4b8SJason M. Bills * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 82865176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 829684bb4b8SJason M. Bills 830684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res); 831684bb4b8SJason M. Bills 832684bb4b8SJason M. Bills /** 833684bb4b8SJason M. Bills * @brief Formats QueryCombinationInvalid message into JSON 834684bb4b8SJason M. Bills * Message body: "Two or more query parameters in the request cannot be used 835684bb4b8SJason M. Bills * together." 836684bb4b8SJason M. Bills * 837684bb4b8SJason M. Bills * 838684bb4b8SJason M. Bills * @returns Message QueryCombinationInvalid formatted to JSON */ 83965176d39SEd Tanous nlohmann::json queryCombinationInvalid(); 840684bb4b8SJason M. Bills 841684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res); 842684bb4b8SJason M. Bills 843684bb4b8SJason M. Bills /** 844f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 845f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 846f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 847f4c4dcf4SKowalski, Kamil * operation." 848f4c4dcf4SKowalski, Kamil * 849f4c4dcf4SKowalski, Kamil * 850f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 85165176d39SEd Tanous nlohmann::json insufficientPrivilege(); 852b5c07418SJames Feist 853f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 854f4c4dcf4SKowalski, Kamil 855f4c4dcf4SKowalski, Kamil /** 856f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 85766ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 858f4c4dcf4SKowalski, Kamil * modification by the service." 859f4c4dcf4SKowalski, Kamil * 860f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 861f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 862f4c4dcf4SKowalski, Kamil * 863f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 864b5c07418SJames Feist nlohmann::json propertyValueModified(const std::string& arg1, 865b5c07418SJames Feist const std::string& arg2); 866b5c07418SJames Feist 867f12894f8SJason M. Bills void propertyValueModified(crow::Response& res, const std::string& arg1, 868f4c4dcf4SKowalski, Kamil const std::string& arg2); 869f4c4dcf4SKowalski, Kamil 870f4c4dcf4SKowalski, Kamil /** 871f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 872f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 873f4c4dcf4SKowalski, Kamil * 874f4c4dcf4SKowalski, Kamil * 875f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 87665176d39SEd Tanous nlohmann::json accountNotModified(); 877b5c07418SJames Feist 878f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 879f4c4dcf4SKowalski, Kamil 880f4c4dcf4SKowalski, Kamil /** 881f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 88266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 883f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 884f4c4dcf4SKowalski, Kamil * 885f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 886f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 887f4c4dcf4SKowalski, Kamil * 888f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 889b5c07418SJames Feist 890b5c07418SJames Feist nlohmann::json queryParameterValueFormatError(const std::string& arg1, 891b5c07418SJames Feist const std::string& arg2); 892b5c07418SJames Feist 893f12894f8SJason M. Bills void queryParameterValueFormatError(crow::Response& res, 894f12894f8SJason M. Bills const std::string& arg1, 895f4c4dcf4SKowalski, Kamil const std::string& arg2); 896f4c4dcf4SKowalski, Kamil 897f4c4dcf4SKowalski, Kamil /** 898f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 89966ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 900f4c4dcf4SKowalski, Kamil * included in the request." 901f4c4dcf4SKowalski, Kamil * 902f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 903f4c4dcf4SKowalski, Kamil * 904f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 905b5c07418SJames Feist nlohmann::json propertyMissing(const std::string& arg1); 906b5c07418SJames Feist 907f12894f8SJason M. Bills void propertyMissing(crow::Response& res, const std::string& arg1); 908f12894f8SJason M. Bills 909f12894f8SJason M. Bills /** 910f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 91166ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 912f4c4dcf4SKowalski, Kamil * unavailability of resources." 913f4c4dcf4SKowalski, Kamil * 914f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 915f4c4dcf4SKowalski, Kamil * 916f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 917b5c07418SJames Feist nlohmann::json resourceExhaustion(const std::string& arg1); 918b5c07418SJames Feist 919f12894f8SJason M. Bills void resourceExhaustion(crow::Response& res, const std::string& arg1); 920f4c4dcf4SKowalski, Kamil 921f4c4dcf4SKowalski, Kamil /** 922f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 923f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 924f4c4dcf4SKowalski, Kamil * 925f4c4dcf4SKowalski, Kamil * 926f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 92765176d39SEd Tanous nlohmann::json accountModified(); 928b5c07418SJames Feist 929a08b46ccSJason M. Bills void accountModified(crow::Response& res); 930f4c4dcf4SKowalski, Kamil 931f4c4dcf4SKowalski, Kamil /** 932f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 93366ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 93466ac2b8cSJason M. Bills * range <arg3>." 935f4c4dcf4SKowalski, Kamil * 936f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 937f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 938f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 939f4c4dcf4SKowalski, Kamil * 940f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 941b5c07418SJames Feist nlohmann::json queryParameterOutOfRange(const std::string& arg1, 942b5c07418SJames Feist const std::string& arg2, 943b5c07418SJames Feist const std::string& arg3); 944b5c07418SJames Feist 945f12894f8SJason M. Bills void queryParameterOutOfRange(crow::Response& res, const std::string& arg1, 946f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 947f4c4dcf4SKowalski, Kamil 9483bf4e632SJoseph Reynolds /** 9493bf4e632SJoseph Reynolds * @brief Formats PasswordChangeRequired message into JSON 9503bf4e632SJoseph Reynolds * Message body: The password provided for this account must be changed 9513bf4e632SJoseph Reynolds * before access is granted. PATCH the 'Password' property for this 9523bf4e632SJoseph Reynolds * account located at the target URI '%1' to complete this process. 9533bf4e632SJoseph Reynolds * 9543bf4e632SJoseph Reynolds * @param[in] arg1 Parameter of message that will replace %1 in its body. 9553bf4e632SJoseph Reynolds * 9563bf4e632SJoseph Reynolds * @returns Message PasswordChangeRequired formatted to JSON */ 957*ace85d60SEd Tanous 958*ace85d60SEd Tanous nlohmann::json passwordChangeRequired(const boost::urls::url_view& arg1); 959*ace85d60SEd Tanous 960*ace85d60SEd Tanous void passwordChangeRequired(crow::Response& res, 961*ace85d60SEd Tanous const boost::urls::url_view& arg1); 9623bf4e632SJoseph Reynolds 9634cde5d90SJames Feist /** 9644cde5d90SJames Feist * @brief Formats InvalidUpload message into JSON 9654cde5d90SJames Feist * Message body: Invalid file uploaded to %1: %2.* 9664cde5d90SJames Feist * @param[in] arg1 Parameter of message that will replace %1 in its body. 9674cde5d90SJames Feist * @param[in] arg2 Parameter of message that will replace %2 in its body. 9684cde5d90SJames Feist * 9694cde5d90SJames Feist * @returns Message InvalidUpload formatted to JSON */ 9704cde5d90SJames Feist nlohmann::json invalidUpload(const std::string& arg1, const std::string& arg2); 9714cde5d90SJames Feist 9724cde5d90SJames Feist void invalidUpload(crow::Response& res, const std::string& arg1, 9734cde5d90SJames Feist const std::string& arg2); 9744cde5d90SJames Feist 975f4c4dcf4SKowalski, Kamil } // namespace messages 976f4c4dcf4SKowalski, Kamil 977f4c4dcf4SKowalski, Kamil } // namespace redfish 978