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 191214b7e7SGunnar Mills #include <nlohmann/json.hpp> 20*df5415fcSEd Tanous #include <source_location.hpp> 211214b7e7SGunnar Mills 221abe55efSEd Tanous namespace redfish 231abe55efSEd Tanous { 24f4c4dcf4SKowalski, Kamil 251abe55efSEd Tanous namespace messages 261abe55efSEd Tanous { 27f4c4dcf4SKowalski, Kamil 2881856681SAsmitha Karunanithi constexpr const char* messageVersionPrefix = "Base.1.11.0."; 2955c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo"; 30f4c4dcf4SKowalski, Kamil 31f4c4dcf4SKowalski, Kamil /** 32f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInUse message into JSON 33f4c4dcf4SKowalski, Kamil * Message body: "The change to the requested resource failed because the 34f4c4dcf4SKowalski, Kamil * resource is in use or in transition." 35f4c4dcf4SKowalski, Kamil * 36f4c4dcf4SKowalski, Kamil * 37f4c4dcf4SKowalski, Kamil * @returns Message ResourceInUse formatted to JSON */ 3865176d39SEd Tanous nlohmann::json resourceInUse(); 39b5c07418SJames Feist 40f12894f8SJason M. Bills void resourceInUse(crow::Response& res); 41f4c4dcf4SKowalski, Kamil 42f4c4dcf4SKowalski, Kamil /** 43f4c4dcf4SKowalski, Kamil * @brief Formats MalformedJSON message into JSON 44f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted was malformed JSON and could not be 45f4c4dcf4SKowalski, Kamil * parsed by the receiving service." 46f4c4dcf4SKowalski, Kamil * 47f4c4dcf4SKowalski, Kamil * 48f4c4dcf4SKowalski, Kamil * @returns Message MalformedJSON formatted to JSON */ 4965176d39SEd Tanous nlohmann::json malformedJSON(); 50b5c07418SJames Feist 51f12894f8SJason M. Bills void malformedJSON(crow::Response& res); 52f4c4dcf4SKowalski, Kamil 53f4c4dcf4SKowalski, Kamil /** 54f4c4dcf4SKowalski, Kamil * @brief Formats ResourceMissingAtURI message into JSON 5566ac2b8cSJason M. Bills * Message body: "The resource at the URI <arg1> was not found." 56f4c4dcf4SKowalski, Kamil * 57f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 58f4c4dcf4SKowalski, Kamil * 59f4c4dcf4SKowalski, Kamil * @returns Message ResourceMissingAtURI formatted to JSON */ 60b5c07418SJames Feist nlohmann::json resourceMissingAtURI(const std::string& arg1); 61b5c07418SJames Feist 62f12894f8SJason M. Bills void resourceMissingAtURI(crow::Response& res, const std::string& arg1); 63f4c4dcf4SKowalski, Kamil 64f4c4dcf4SKowalski, Kamil /** 65f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueFormatError message into JSON 6666ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 67f4c4dcf4SKowalski, Kamil * is of a different format than the parameter can accept." 68f4c4dcf4SKowalski, Kamil * 69f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 70f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 71f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 72f4c4dcf4SKowalski, Kamil * 73f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueFormatError formatted to JSON */ 74b5c07418SJames Feist nlohmann::json actionParameterValueFormatError(const std::string& arg1, 75b5c07418SJames Feist const std::string& arg2, 76b5c07418SJames Feist const std::string& arg3); 77b5c07418SJames Feist 78f12894f8SJason M. Bills void actionParameterValueFormatError(crow::Response& res, 79f12894f8SJason M. Bills const std::string& arg1, 80f4c4dcf4SKowalski, Kamil const std::string& arg2, 81f4c4dcf4SKowalski, Kamil const std::string& arg3); 82f4c4dcf4SKowalski, Kamil 83f4c4dcf4SKowalski, Kamil /** 84f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 85f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 86f4c4dcf4SKowalski, Kamil * service is still operational." 87f4c4dcf4SKowalski, Kamil * 88f4c4dcf4SKowalski, Kamil * 89f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 9065176d39SEd Tanous nlohmann::json internalError(); 91b5c07418SJames Feist 92*df5415fcSEd Tanous void internalError(crow::Response& res, const bmcweb::source_location location = 93*df5415fcSEd Tanous bmcweb::source_location::current()); 94f12894f8SJason M. Bills 95f12894f8SJason M. Bills /** 96f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 97f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 98f4c4dcf4SKowalski, Kamil * unable to interpret." 99f4c4dcf4SKowalski, Kamil * 100f4c4dcf4SKowalski, Kamil * 101f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 10265176d39SEd Tanous nlohmann::json unrecognizedRequestBody(); 103b5c07418SJames Feist 104f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 105f4c4dcf4SKowalski, Kamil 106f4c4dcf4SKowalski, Kamil /** 107f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 10866ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 10966ac2b8cSJason M. Bills * an authorization error <arg2>." 110f4c4dcf4SKowalski, Kamil * 111f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 112f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 113f4c4dcf4SKowalski, Kamil * 114f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 115b5c07418SJames Feist nlohmann::json resourceAtUriUnauthorized(const std::string& arg1, 116b5c07418SJames Feist const std::string& arg2); 117b5c07418SJames Feist 118f12894f8SJason M. Bills void resourceAtUriUnauthorized(crow::Response& res, const std::string& arg1, 119f4c4dcf4SKowalski, Kamil const std::string& arg2); 120f4c4dcf4SKowalski, Kamil 121f4c4dcf4SKowalski, Kamil /** 122f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 12366ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 12466ac2b8cSJason M. Bills * <arg2>." 125f4c4dcf4SKowalski, Kamil * 126f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 127f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 128f4c4dcf4SKowalski, Kamil * 129f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 130b5c07418SJames Feist nlohmann::json actionParameterUnknown(const std::string& arg1, 131b5c07418SJames Feist const std::string& arg2); 132b5c07418SJames Feist 133f12894f8SJason M. Bills void actionParameterUnknown(crow::Response& res, const std::string& arg1, 134f4c4dcf4SKowalski, Kamil const std::string& arg2); 135f4c4dcf4SKowalski, Kamil 136f4c4dcf4SKowalski, Kamil /** 137f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 138f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 139f4c4dcf4SKowalski, Kamil * cannot be deleted." 140f4c4dcf4SKowalski, Kamil * 141f4c4dcf4SKowalski, Kamil * 142f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 14365176d39SEd Tanous nlohmann::json resourceCannotBeDeleted(); 144b5c07418SJames Feist 145f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 146f4c4dcf4SKowalski, Kamil 147f4c4dcf4SKowalski, Kamil /** 148f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 14966ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 150f4c4dcf4SKowalski, Kamil * 151f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 152f4c4dcf4SKowalski, Kamil * 153f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 154b5c07418SJames Feist nlohmann::json propertyDuplicate(const std::string& arg1); 155b5c07418SJames Feist 156f12894f8SJason M. Bills void propertyDuplicate(crow::Response& res, const std::string& arg1); 157f4c4dcf4SKowalski, Kamil 158f4c4dcf4SKowalski, Kamil /** 159f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 16066ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 161f4c4dcf4SKowalski, Kamil * seconds." 162f4c4dcf4SKowalski, Kamil * 163f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 164f4c4dcf4SKowalski, Kamil * 165f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 166b5c07418SJames Feist nlohmann::json serviceTemporarilyUnavailable(const std::string& arg1); 167b5c07418SJames Feist 168f12894f8SJason M. Bills void serviceTemporarilyUnavailable(crow::Response& res, 169f12894f8SJason M. Bills const std::string& arg1); 170f4c4dcf4SKowalski, Kamil 171f4c4dcf4SKowalski, Kamil /** 172f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 17366ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 17466ac2b8cSJason M. Bills * with the value <arg3> already exists." 175f4c4dcf4SKowalski, Kamil * 176f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 177f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 178f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 179f4c4dcf4SKowalski, Kamil * 180f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 181b5c07418SJames Feist nlohmann::json resourceAlreadyExists(const std::string& arg1, 182b5c07418SJames Feist const std::string& arg2, 183b5c07418SJames Feist const std::string& arg3); 184b5c07418SJames Feist 185f12894f8SJason M. Bills void resourceAlreadyExists(crow::Response& res, const std::string& arg1, 186f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 187f4c4dcf4SKowalski, Kamil 188f4c4dcf4SKowalski, Kamil /** 189f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 190f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 191f4c4dcf4SKowalski, Kamil * current session has been removed as well." 192f4c4dcf4SKowalski, Kamil * 193f4c4dcf4SKowalski, Kamil * 194f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 19565176d39SEd Tanous nlohmann::json accountForSessionNoLongerExists(); 196b5c07418SJames Feist 197f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 198f4c4dcf4SKowalski, Kamil 199f4c4dcf4SKowalski, Kamil /** 200f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 201f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 20266ac2b8cSJason M. Bills * <arg1> was missing from the request." 203f4c4dcf4SKowalski, Kamil * 204f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 205f4c4dcf4SKowalski, Kamil * 206f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 207b5c07418SJames Feist nlohmann::json createFailedMissingReqProperties(const std::string& arg1); 208b5c07418SJames Feist 209f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 210f12894f8SJason M. Bills const std::string& arg1); 211f4c4dcf4SKowalski, Kamil 212f4c4dcf4SKowalski, Kamil /** 213f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 21466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 215f4c4dcf4SKowalski, Kamil * format than the property can accept." 216f4c4dcf4SKowalski, Kamil * 217f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 218f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 219f4c4dcf4SKowalski, Kamil * 220f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 221b5c07418SJames Feist nlohmann::json propertyValueFormatError(const std::string& arg1, 222b5c07418SJames Feist const std::string& arg2); 223b5c07418SJames Feist 224f12894f8SJason M. Bills void propertyValueFormatError(crow::Response& res, const std::string& arg1, 225f4c4dcf4SKowalski, Kamil const std::string& arg2); 226f4c4dcf4SKowalski, Kamil 227f4c4dcf4SKowalski, Kamil /** 228f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 22966ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 230f4c4dcf4SKowalski, Kamil * acceptable values." 231f4c4dcf4SKowalski, Kamil * 232f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 233f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 234f4c4dcf4SKowalski, Kamil * 235f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 236b5c07418SJames Feist nlohmann::json propertyValueNotInList(const std::string& arg1, 237b5c07418SJames Feist const std::string& arg2); 238b5c07418SJames Feist 239f12894f8SJason M. Bills void propertyValueNotInList(crow::Response& res, const std::string& arg1, 240f4c4dcf4SKowalski, Kamil const std::string& arg2); 241f4c4dcf4SKowalski, Kamil 242f4c4dcf4SKowalski, Kamil /** 243f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 24466ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 245f4c4dcf4SKowalski, Kamil * service." 246f4c4dcf4SKowalski, Kamil * 247f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 248f4c4dcf4SKowalski, Kamil * 249f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 250b5c07418SJames Feist nlohmann::json resourceAtUriInUnknownFormat(const std::string& arg1); 251b5c07418SJames Feist 252f12894f8SJason M. Bills void resourceAtUriInUnknownFormat(crow::Response& res, const std::string& arg1); 253f4c4dcf4SKowalski, Kamil 254f4c4dcf4SKowalski, Kamil /** 25581856681SAsmitha Karunanithi * @brief Formats ServiceDisabled message into JSON 25681856681SAsmitha Karunanithi * Message body: "The operation failed because the service at <arg1> is disabled 25781856681SAsmitha Karunanithi * and " cannot accept requests." 25881856681SAsmitha Karunanithi * 25981856681SAsmitha Karunanithi * @param[in] arg1 Parameter of message that will replace %1 in its body. 26081856681SAsmitha Karunanithi * 26181856681SAsmitha Karunanithi * @returns Message ServiceDisabled formatted to JSON */ 26281856681SAsmitha Karunanithi nlohmann::json serviceDisabled(const std::string& arg1); 26381856681SAsmitha Karunanithi 26481856681SAsmitha Karunanithi void serviceDisabled(crow::Response& res, const std::string& arg1); 26581856681SAsmitha Karunanithi 26681856681SAsmitha Karunanithi /** 267f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 268f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 269f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 270f4c4dcf4SKowalski, Kamil * 271f4c4dcf4SKowalski, Kamil * 272f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 27365176d39SEd Tanous nlohmann::json serviceInUnknownState(); 274b5c07418SJames Feist 275f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 276f4c4dcf4SKowalski, Kamil 277f4c4dcf4SKowalski, Kamil /** 278f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 279f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 280f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 281f4c4dcf4SKowalski, Kamil * 282f4c4dcf4SKowalski, Kamil * 283f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 28465176d39SEd Tanous nlohmann::json eventSubscriptionLimitExceeded(); 285b5c07418SJames Feist 286f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 287f4c4dcf4SKowalski, Kamil 288f4c4dcf4SKowalski, Kamil /** 289f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 29066ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 291f4c4dcf4SKowalski, Kamil * in the request body." 292f4c4dcf4SKowalski, Kamil * 293f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 294f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 295f4c4dcf4SKowalski, Kamil * 296f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 297b5c07418SJames Feist nlohmann::json actionParameterMissing(const std::string& arg1, 298b5c07418SJames Feist const std::string& arg2); 299b5c07418SJames Feist 300f12894f8SJason M. Bills void actionParameterMissing(crow::Response& res, const std::string& arg1, 301f4c4dcf4SKowalski, Kamil const std::string& arg2); 302f4c4dcf4SKowalski, Kamil 303f4c4dcf4SKowalski, Kamil /** 304f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 30566ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 306f4c4dcf4SKowalski, Kamil * 307f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 308f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 309f4c4dcf4SKowalski, Kamil * 310f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 311b5c07418SJames Feist nlohmann::json stringValueTooLong(const std::string& arg1, const int& arg2); 312b5c07418SJames Feist 313f12894f8SJason M. Bills void stringValueTooLong(crow::Response& res, const std::string& arg1, 314f12894f8SJason M. Bills const int& arg2); 315f4c4dcf4SKowalski, Kamil 316f4c4dcf4SKowalski, Kamil /** 317cc9139ecSJason M. Bills * @brief Formats SessionTerminated message into JSON 318cc9139ecSJason M. Bills * Message body: "The session was successfully terminated." 319cc9139ecSJason M. Bills * 320cc9139ecSJason M. Bills * 321cc9139ecSJason M. Bills * @returns Message SessionTerminated formatted to JSON */ 32265176d39SEd Tanous nlohmann::json sessionTerminated(); 323b5c07418SJames Feist 324cc9139ecSJason M. Bills void sessionTerminated(crow::Response& res); 325cc9139ecSJason M. Bills 326cc9139ecSJason M. Bills /** 327684bb4b8SJason M. Bills * @brief Formats SubscriptionTerminated message into JSON 328684bb4b8SJason M. Bills * Message body: "The event subscription has been terminated." 329684bb4b8SJason M. Bills * 330684bb4b8SJason M. Bills * 331684bb4b8SJason M. Bills * @returns Message SubscriptionTerminated formatted to JSON */ 33265176d39SEd Tanous nlohmann::json subscriptionTerminated(); 333684bb4b8SJason M. Bills 334684bb4b8SJason M. Bills void subscriptionTerminated(crow::Response& res); 335684bb4b8SJason M. Bills 336684bb4b8SJason M. Bills /** 337cc9139ecSJason M. Bills * @brief Formats ResourceTypeIncompatible message into JSON 338cc9139ecSJason M. Bills * Message body: "The @odata.type of the request body <arg1> is incompatible 339cc9139ecSJason M. Bills * with the @odata.type of the resource which is <arg2>." 340cc9139ecSJason M. Bills * 341cc9139ecSJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 342cc9139ecSJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 343cc9139ecSJason M. Bills * 344cc9139ecSJason M. Bills * @returns Message ResourceTypeIncompatible formatted to JSON */ 345b5c07418SJames Feist nlohmann::json resourceTypeIncompatible(const std::string& arg1, 346b5c07418SJames Feist const std::string& arg2); 347b5c07418SJames Feist 348cc9139ecSJason M. Bills void resourceTypeIncompatible(crow::Response& res, const std::string& arg1, 349cc9139ecSJason M. Bills const std::string& arg2); 350cc9139ecSJason M. Bills 351cc9139ecSJason M. Bills /** 352684bb4b8SJason M. Bills * @brief Formats ResetRequired message into JSON 353684bb4b8SJason M. Bills * Message body: "In order to complete the operation, a component reset is 354684bb4b8SJason M. Bills * required with the Reset action URI '<arg1>' and ResetType '<arg2>'." 355684bb4b8SJason M. Bills * 356684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 357684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 358684bb4b8SJason M. Bills * 359684bb4b8SJason M. Bills * @returns Message ResetRequired formatted to JSON */ 360684bb4b8SJason M. Bills nlohmann::json resetRequired(const std::string& arg1, const std::string& arg2); 361684bb4b8SJason M. Bills 362684bb4b8SJason M. Bills void resetRequired(crow::Response& res, const std::string& arg1, 363684bb4b8SJason M. Bills const std::string& arg2); 364684bb4b8SJason M. Bills 365684bb4b8SJason M. Bills /** 366684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOnRequired message into JSON 367684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered on to 368684bb4b8SJason M. Bills * perform this request." 369684bb4b8SJason M. Bills * 370684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 371684bb4b8SJason M. Bills * 372684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOnRequired formatted to JSON */ 373684bb4b8SJason M. Bills nlohmann::json chassisPowerStateOnRequired(const std::string& arg1); 374684bb4b8SJason M. Bills 375684bb4b8SJason M. Bills void chassisPowerStateOnRequired(crow::Response& res, const std::string& arg1); 376684bb4b8SJason M. Bills 377684bb4b8SJason M. Bills /** 378684bb4b8SJason M. Bills * @brief Formats ChassisPowerStateOffRequired message into JSON 379684bb4b8SJason M. Bills * Message body: "The Chassis with Id '<arg1>' requires to be powered off to 380684bb4b8SJason M. Bills * perform this request." 381684bb4b8SJason M. Bills * 382684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 383684bb4b8SJason M. Bills * 384684bb4b8SJason M. Bills * @returns Message ChassisPowerStateOffRequired formatted to JSON */ 385684bb4b8SJason M. Bills nlohmann::json chassisPowerStateOffRequired(const std::string& arg1); 386684bb4b8SJason M. Bills 387684bb4b8SJason M. Bills void chassisPowerStateOffRequired(crow::Response& res, const std::string& arg1); 388684bb4b8SJason M. Bills 389684bb4b8SJason M. Bills /** 390684bb4b8SJason M. Bills * @brief Formats PropertyValueConflict message into JSON 391684bb4b8SJason M. Bills * Message body: "The property '<arg1>' could not be written because its value 392684bb4b8SJason M. Bills * would conflict with the value of the '<arg2>' property." 393684bb4b8SJason M. Bills * 394684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 395684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 396684bb4b8SJason M. Bills * 397684bb4b8SJason M. Bills * @returns Message PropertyValueConflict formatted to JSON */ 398684bb4b8SJason M. Bills nlohmann::json propertyValueConflict(const std::string& arg1, 399684bb4b8SJason M. Bills const std::string& arg2); 400684bb4b8SJason M. Bills 401684bb4b8SJason M. Bills void propertyValueConflict(crow::Response& res, const std::string& arg1, 402684bb4b8SJason M. Bills const std::string& arg2); 403684bb4b8SJason M. Bills 404684bb4b8SJason M. Bills /** 405684bb4b8SJason M. Bills * @brief Formats PropertyValueIncorrect message into JSON 406684bb4b8SJason M. Bills * Message body: "The property '<arg1>' with the requested value of '<arg2>' 407684bb4b8SJason M. Bills * could not be written because the value does not meet the constraints of the 408684bb4b8SJason M. Bills * implementation." 409684bb4b8SJason M. Bills * 410684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 411684bb4b8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 412684bb4b8SJason M. Bills * 413684bb4b8SJason M. Bills * @returns Message PropertyValueIncorrect formatted to JSON */ 414684bb4b8SJason M. Bills nlohmann::json propertyValueIncorrect(const std::string& arg1, 415684bb4b8SJason M. Bills const std::string& arg2); 416684bb4b8SJason M. Bills 417684bb4b8SJason M. Bills void propertyValueIncorrect(crow::Response& res, const std::string& arg1, 418684bb4b8SJason M. Bills const std::string& arg2); 419684bb4b8SJason M. Bills 420684bb4b8SJason M. Bills /** 421684bb4b8SJason M. Bills * @brief Formats ResourceCreationConflict message into JSON 422684bb4b8SJason M. Bills * Message body: "The resource could not be created. The service has a resource 423684bb4b8SJason M. Bills * at URI '<arg1>' that conflicts with the creation request." 424684bb4b8SJason M. Bills * 425684bb4b8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 426684bb4b8SJason M. Bills * 427684bb4b8SJason M. Bills * @returns Message ResourceCreationConflict formatted to JSON */ 428684bb4b8SJason M. Bills nlohmann::json resourceCreationConflict(const std::string& arg1); 429684bb4b8SJason M. Bills 430684bb4b8SJason M. Bills void resourceCreationConflict(crow::Response& res, const std::string& arg1); 431684bb4b8SJason M. Bills 432684bb4b8SJason M. Bills /** 433684bb4b8SJason M. Bills * @brief Formats MaximumErrorsExceeded message into JSON 434684bb4b8SJason M. Bills * Message body: "Too many errors have occurred to report them all." 435684bb4b8SJason M. Bills * 436684bb4b8SJason M. Bills * 437684bb4b8SJason M. Bills * @returns Message MaximumErrorsExceeded formatted to JSON */ 43865176d39SEd Tanous nlohmann::json maximumErrorsExceeded(); 439684bb4b8SJason M. Bills 440684bb4b8SJason M. Bills void maximumErrorsExceeded(crow::Response& res); 441684bb4b8SJason M. Bills 442684bb4b8SJason M. Bills /** 443684bb4b8SJason M. Bills * @brief Formats PreconditionFailed message into JSON 444684bb4b8SJason M. Bills * Message body: "The ETag supplied did not match the ETag required to change 445684bb4b8SJason M. Bills * this resource." 446684bb4b8SJason M. Bills * 447684bb4b8SJason M. Bills * 448684bb4b8SJason M. Bills * @returns Message PreconditionFailed formatted to JSON */ 44965176d39SEd Tanous nlohmann::json preconditionFailed(); 450684bb4b8SJason M. Bills 451684bb4b8SJason M. Bills void preconditionFailed(crow::Response& res); 452684bb4b8SJason M. Bills 453684bb4b8SJason M. Bills /** 454684bb4b8SJason M. Bills * @brief Formats PreconditionRequired message into JSON 455684bb4b8SJason M. Bills * Message body: "A precondition header or annotation is required to change this 456684bb4b8SJason M. Bills * resource." 457684bb4b8SJason M. Bills * 458684bb4b8SJason M. Bills * 459684bb4b8SJason M. Bills * @returns Message PreconditionRequired formatted to JSON */ 46065176d39SEd Tanous nlohmann::json preconditionRequired(); 461684bb4b8SJason M. Bills 462684bb4b8SJason M. Bills void preconditionRequired(crow::Response& res); 463684bb4b8SJason M. Bills 464684bb4b8SJason M. Bills /** 465684bb4b8SJason M. Bills * @brief Formats OperationFailed message into JSON 466684bb4b8SJason M. Bills * Message body: "An error occurred internal to the service as part of the 467684bb4b8SJason M. Bills * overall request. Partial results may have been returned." 468684bb4b8SJason M. Bills * 469684bb4b8SJason M. Bills * 470684bb4b8SJason M. Bills * @returns Message OperationFailed formatted to JSON */ 47165176d39SEd Tanous nlohmann::json operationFailed(); 472684bb4b8SJason M. Bills 473684bb4b8SJason M. Bills void operationFailed(crow::Response& res); 474684bb4b8SJason M. Bills 475684bb4b8SJason M. Bills /** 476684bb4b8SJason M. Bills * @brief Formats OperationTimeout message into JSON 477684bb4b8SJason M. Bills * Message body: "A timeout internal to the service occured as part of the 478684bb4b8SJason M. Bills * request. Partial results may have been returned." 479684bb4b8SJason M. Bills * 480684bb4b8SJason M. Bills * 481684bb4b8SJason M. Bills * @returns Message OperationTimeout formatted to JSON */ 48265176d39SEd Tanous nlohmann::json operationTimeout(); 483684bb4b8SJason M. Bills 484684bb4b8SJason M. Bills void operationTimeout(crow::Response& res); 485684bb4b8SJason M. Bills 486684bb4b8SJason M. Bills /** 487f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 48866ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 489f4c4dcf4SKowalski, Kamil * type than the property can accept." 490f4c4dcf4SKowalski, Kamil * 491f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 492f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 493f4c4dcf4SKowalski, Kamil * 494f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 495b5c07418SJames Feist nlohmann::json propertyValueTypeError(const std::string& arg1, 496b5c07418SJames Feist const std::string& arg2); 497b5c07418SJames Feist 498f12894f8SJason M. Bills void propertyValueTypeError(crow::Response& res, const std::string& arg1, 499f4c4dcf4SKowalski, Kamil const std::string& arg2); 500f4c4dcf4SKowalski, Kamil 501f4c4dcf4SKowalski, Kamil /** 502f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 50366ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 504f4c4dcf4SKowalski, Kamil * found." 505f4c4dcf4SKowalski, Kamil * 506f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 507f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 508f4c4dcf4SKowalski, Kamil * 509f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 510b5c07418SJames Feist nlohmann::json resourceNotFound(const std::string& arg1, 511b5c07418SJames Feist const std::string& arg2); 512b5c07418SJames Feist 513f12894f8SJason M. Bills void resourceNotFound(crow::Response& res, const std::string& arg1, 514f4c4dcf4SKowalski, Kamil const std::string& arg2); 515f4c4dcf4SKowalski, Kamil 516f4c4dcf4SKowalski, Kamil /** 517f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 51855c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 51966ac2b8cSJason M. Bills * <arg1>." 520f4c4dcf4SKowalski, Kamil * 521f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 522f4c4dcf4SKowalski, Kamil * 523f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 524b5c07418SJames Feist nlohmann::json couldNotEstablishConnection(const std::string& arg1); 525b5c07418SJames Feist 526f12894f8SJason M. Bills void couldNotEstablishConnection(crow::Response& res, const std::string& arg1); 527f4c4dcf4SKowalski, Kamil 528f4c4dcf4SKowalski, Kamil /** 529f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 53066ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 531f4c4dcf4SKowalski, Kamil * assigned a value." 532f4c4dcf4SKowalski, Kamil * 533f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 534f4c4dcf4SKowalski, Kamil * 535f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 536b5c07418SJames Feist nlohmann::json propertyNotWritable(const std::string& arg1); 537b5c07418SJames Feist 538f12894f8SJason M. Bills void propertyNotWritable(crow::Response& res, const std::string& arg1); 539f12894f8SJason M. Bills 540f12894f8SJason M. Bills /** 541f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 54266ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 543f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 544f4c4dcf4SKowalski, Kamil * 545f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 546f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 547f4c4dcf4SKowalski, Kamil * 548f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 549b5c07418SJames Feist nlohmann::json queryParameterValueTypeError(const std::string& arg1, 550b5c07418SJames Feist const std::string& arg2); 551b5c07418SJames Feist 552f12894f8SJason M. Bills void queryParameterValueTypeError(crow::Response& res, const std::string& arg1, 553f4c4dcf4SKowalski, Kamil const std::string& arg2); 554f4c4dcf4SKowalski, Kamil 555f4c4dcf4SKowalski, Kamil /** 556f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 557f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 558f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 559f4c4dcf4SKowalski, Kamil * 560f4c4dcf4SKowalski, Kamil * 561f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 56265176d39SEd Tanous nlohmann::json serviceShuttingDown(); 563b5c07418SJames Feist 564f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 565f4c4dcf4SKowalski, Kamil 566f4c4dcf4SKowalski, Kamil /** 567f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 56866ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 56966ac2b8cSJason M. Bills * the parameter <arg2>." 570f4c4dcf4SKowalski, Kamil * 571f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 572f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 573f4c4dcf4SKowalski, Kamil * 574f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 575b5c07418SJames Feist nlohmann::json actionParameterDuplicate(const std::string& arg1, 576b5c07418SJames Feist const std::string& arg2); 577b5c07418SJames Feist 578f12894f8SJason M. Bills void actionParameterDuplicate(crow::Response& res, const std::string& arg1, 579f4c4dcf4SKowalski, Kamil const std::string& arg2); 580f4c4dcf4SKowalski, Kamil 581f4c4dcf4SKowalski, Kamil /** 582f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 58366ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 584f4c4dcf4SKowalski, Kamil * the target resource." 585f4c4dcf4SKowalski, Kamil * 586f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 587f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 588f4c4dcf4SKowalski, Kamil * 589f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 590b5c07418SJames Feist nlohmann::json actionParameterNotSupported(const std::string& arg1, 591b5c07418SJames Feist const std::string& arg2); 592b5c07418SJames Feist 593f12894f8SJason M. Bills void actionParameterNotSupported(crow::Response& res, const std::string& arg1, 594f4c4dcf4SKowalski, Kamil const std::string& arg2); 595f4c4dcf4SKowalski, Kamil 596f4c4dcf4SKowalski, Kamil /** 597f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 59866ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 59966ac2b8cSJason M. Bills * specified protocol <arg2>." 600f4c4dcf4SKowalski, Kamil * 601f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 602f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 603f4c4dcf4SKowalski, Kamil * 604f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 605b5c07418SJames Feist nlohmann::json sourceDoesNotSupportProtocol(const std::string& arg1, 606b5c07418SJames Feist const std::string& arg2); 607b5c07418SJames Feist 608f12894f8SJason M. Bills void sourceDoesNotSupportProtocol(crow::Response& res, const std::string& arg1, 609f4c4dcf4SKowalski, Kamil const std::string& arg2); 610f4c4dcf4SKowalski, Kamil 611f4c4dcf4SKowalski, Kamil /** 612f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 613f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 614f4c4dcf4SKowalski, Kamil * 615f4c4dcf4SKowalski, Kamil * 616f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 61765176d39SEd Tanous nlohmann::json accountRemoved(); 618b5c07418SJames Feist 619f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 620f4c4dcf4SKowalski, Kamil 621f4c4dcf4SKowalski, Kamil /** 622f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 62366ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 624f4c4dcf4SKowalski, Kamil * service denied access." 625f4c4dcf4SKowalski, Kamil * 626f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 627f4c4dcf4SKowalski, Kamil * 628f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 629b5c07418SJames Feist nlohmann::json accessDenied(const std::string& arg1); 630b5c07418SJames Feist 631f12894f8SJason M. Bills void accessDenied(crow::Response& res, const std::string& arg1); 632f4c4dcf4SKowalski, Kamil 633f4c4dcf4SKowalski, Kamil /** 634f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 635f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 636f4c4dcf4SKowalski, Kamil * 637f4c4dcf4SKowalski, Kamil * 638f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 63965176d39SEd Tanous nlohmann::json queryNotSupported(); 640b5c07418SJames Feist 641f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 642f4c4dcf4SKowalski, Kamil 643f4c4dcf4SKowalski, Kamil /** 644f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 645f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 646f4c4dcf4SKowalski, Kamil * the limit of possible resources." 647f4c4dcf4SKowalski, Kamil * 648f4c4dcf4SKowalski, Kamil * 649f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 65065176d39SEd Tanous nlohmann::json createLimitReachedForResource(); 651b5c07418SJames Feist 652f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 653f4c4dcf4SKowalski, Kamil 654f4c4dcf4SKowalski, Kamil /** 655f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 656f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 657f4c4dcf4SKowalski, Kamil * information." 658f4c4dcf4SKowalski, Kamil * 659f4c4dcf4SKowalski, Kamil * 660f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 66165176d39SEd Tanous nlohmann::json generalError(); 662b5c07418SJames Feist 663f12894f8SJason M. Bills void generalError(crow::Response& res); 664f4c4dcf4SKowalski, Kamil 665f4c4dcf4SKowalski, Kamil /** 666f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 667f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 668f4c4dcf4SKowalski, Kamil * 669f4c4dcf4SKowalski, Kamil * 670f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 67165176d39SEd Tanous nlohmann::json success(); 672b5c07418SJames Feist 673f12894f8SJason M. Bills void success(crow::Response& res); 674f12894f8SJason M. Bills 675f12894f8SJason M. Bills /** 676f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 677f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 678f4c4dcf4SKowalski, Kamil * 679f4c4dcf4SKowalski, Kamil * 680f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 68165176d39SEd Tanous nlohmann::json created(); 682b5c07418SJames Feist 683f12894f8SJason M. Bills void created(crow::Response& res); 684f4c4dcf4SKowalski, Kamil 685f4c4dcf4SKowalski, Kamil /** 686cc9139ecSJason M. Bills * @brief Formats NoOperation message into JSON 687cc9139ecSJason M. Bills * Message body: "The request body submitted contain no data to act upon and 688cc9139ecSJason M. Bills * no changes to the resource took place." 689cc9139ecSJason M. Bills * 690cc9139ecSJason M. Bills * 691cc9139ecSJason M. Bills * @returns Message NoOperation formatted to JSON */ 69265176d39SEd Tanous nlohmann::json noOperation(); 693b5c07418SJames Feist 694cc9139ecSJason M. Bills void noOperation(crow::Response& res); 695cc9139ecSJason M. Bills 696cc9139ecSJason M. Bills /** 697f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 69866ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 699f4c4dcf4SKowalski, Kamil * the resource." 700f4c4dcf4SKowalski, Kamil * 701f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 702f4c4dcf4SKowalski, Kamil * 703f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 704b5c07418SJames Feist nlohmann::json propertyUnknown(const std::string& arg1); 705b5c07418SJames Feist 706f12894f8SJason M. Bills void propertyUnknown(crow::Response& res, const std::string& arg1); 707f12894f8SJason M. Bills 708f12894f8SJason M. Bills /** 709f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 710f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 711f4c4dcf4SKowalski, Kamil * implementation." 712f4c4dcf4SKowalski, Kamil * 713f4c4dcf4SKowalski, Kamil * 714f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 71565176d39SEd Tanous nlohmann::json noValidSession(); 716b5c07418SJames Feist 717f12894f8SJason M. Bills void noValidSession(crow::Response& res); 718f4c4dcf4SKowalski, Kamil 719f4c4dcf4SKowalski, Kamil /** 720f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 72166ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 722f4c4dcf4SKowalski, Kamil * 723f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 724f4c4dcf4SKowalski, Kamil * 725f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 726b5c07418SJames Feist nlohmann::json invalidObject(const std::string& arg1); 727b5c07418SJames Feist 728f12894f8SJason M. Bills void invalidObject(crow::Response& res, const std::string& arg1); 729f4c4dcf4SKowalski, Kamil 730f4c4dcf4SKowalski, Kamil /** 731f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 732f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 733f4c4dcf4SKowalski, Kamil * standby." 734f4c4dcf4SKowalski, Kamil * 735f4c4dcf4SKowalski, Kamil * 736f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 73765176d39SEd Tanous nlohmann::json resourceInStandby(); 738b5c07418SJames Feist 739f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 740f4c4dcf4SKowalski, Kamil 741f4c4dcf4SKowalski, Kamil /** 742f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 74366ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 744f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 745f4c4dcf4SKowalski, Kamil * 746f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 747f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 748f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 749f4c4dcf4SKowalski, Kamil * 750f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 751b5c07418SJames Feist nlohmann::json actionParameterValueTypeError(const std::string& arg1, 752b5c07418SJames Feist const std::string& arg2, 753b5c07418SJames Feist const std::string& arg3); 754b5c07418SJames Feist 755f12894f8SJason M. Bills void actionParameterValueTypeError(crow::Response& res, const std::string& arg1, 756f4c4dcf4SKowalski, Kamil const std::string& arg2, 757f4c4dcf4SKowalski, Kamil const std::string& arg3); 758f4c4dcf4SKowalski, Kamil 759f4c4dcf4SKowalski, Kamil /** 760f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 761f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 762f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 763f4c4dcf4SKowalski, Kamil * 764f4c4dcf4SKowalski, Kamil * 765f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 76665176d39SEd Tanous nlohmann::json sessionLimitExceeded(); 767b5c07418SJames Feist 768f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 769f4c4dcf4SKowalski, Kamil 770f4c4dcf4SKowalski, Kamil /** 771f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 77266ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 773f4c4dcf4SKowalski, Kamil * 774f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 775f4c4dcf4SKowalski, Kamil * 776f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 777b5c07418SJames Feist nlohmann::json actionNotSupported(const std::string& arg1); 778b5c07418SJames Feist 779f12894f8SJason M. Bills void actionNotSupported(crow::Response& res, const std::string& arg1); 780f4c4dcf4SKowalski, Kamil 781f4c4dcf4SKowalski, Kamil /** 782f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 78366ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 784f4c4dcf4SKowalski, Kamil * 785f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 786f4c4dcf4SKowalski, Kamil * 787f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 788b5c07418SJames Feist nlohmann::json invalidIndex(const int& arg1); 789b5c07418SJames Feist 790f12894f8SJason M. Bills void invalidIndex(crow::Response& res, const int& arg1); 791f4c4dcf4SKowalski, Kamil 792f4c4dcf4SKowalski, Kamil /** 793f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 794f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 795f4c4dcf4SKowalski, Kamil * the service is unable to process it." 796f4c4dcf4SKowalski, Kamil * 797f4c4dcf4SKowalski, Kamil * 798f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 79965176d39SEd Tanous nlohmann::json emptyJSON(); 800b5c07418SJames Feist 801f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 802f4c4dcf4SKowalski, Kamil 803f4c4dcf4SKowalski, Kamil /** 804f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 805f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 806f4c4dcf4SKowalski, Kamil * 807f4c4dcf4SKowalski, Kamil * 808f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 80965176d39SEd Tanous nlohmann::json queryNotSupportedOnResource(); 810b5c07418SJames Feist 811f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 812f4c4dcf4SKowalski, Kamil 813f4c4dcf4SKowalski, Kamil /** 814684bb4b8SJason M. Bills * @brief Formats QueryNotSupportedOnOperation message into JSON 815684bb4b8SJason M. Bills * Message body: "Querying is not supported with the requested operation." 816684bb4b8SJason M. Bills * 817684bb4b8SJason M. Bills * 818684bb4b8SJason M. Bills * @returns Message QueryNotSupportedOnOperation formatted to JSON */ 81965176d39SEd Tanous nlohmann::json queryNotSupportedOnOperation(); 820684bb4b8SJason M. Bills 821684bb4b8SJason M. Bills void queryNotSupportedOnOperation(crow::Response& res); 822684bb4b8SJason M. Bills 823684bb4b8SJason M. Bills /** 824684bb4b8SJason M. Bills * @brief Formats QueryCombinationInvalid message into JSON 825684bb4b8SJason M. Bills * Message body: "Two or more query parameters in the request cannot be used 826684bb4b8SJason M. Bills * together." 827684bb4b8SJason M. Bills * 828684bb4b8SJason M. Bills * 829684bb4b8SJason M. Bills * @returns Message QueryCombinationInvalid formatted to JSON */ 83065176d39SEd Tanous nlohmann::json queryCombinationInvalid(); 831684bb4b8SJason M. Bills 832684bb4b8SJason M. Bills void queryCombinationInvalid(crow::Response& res); 833684bb4b8SJason M. Bills 834684bb4b8SJason M. Bills /** 835f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 836f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 837f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 838f4c4dcf4SKowalski, Kamil * operation." 839f4c4dcf4SKowalski, Kamil * 840f4c4dcf4SKowalski, Kamil * 841f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 84265176d39SEd Tanous nlohmann::json insufficientPrivilege(); 843b5c07418SJames Feist 844f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 845f4c4dcf4SKowalski, Kamil 846f4c4dcf4SKowalski, Kamil /** 847f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 84866ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 849f4c4dcf4SKowalski, Kamil * modification by the service." 850f4c4dcf4SKowalski, Kamil * 851f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 852f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 853f4c4dcf4SKowalski, Kamil * 854f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 855b5c07418SJames Feist nlohmann::json propertyValueModified(const std::string& arg1, 856b5c07418SJames Feist const std::string& arg2); 857b5c07418SJames Feist 858f12894f8SJason M. Bills void propertyValueModified(crow::Response& res, const std::string& arg1, 859f4c4dcf4SKowalski, Kamil const std::string& arg2); 860f4c4dcf4SKowalski, Kamil 861f4c4dcf4SKowalski, Kamil /** 862f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 863f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 864f4c4dcf4SKowalski, Kamil * 865f4c4dcf4SKowalski, Kamil * 866f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 86765176d39SEd Tanous nlohmann::json accountNotModified(); 868b5c07418SJames Feist 869f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 870f4c4dcf4SKowalski, Kamil 871f4c4dcf4SKowalski, Kamil /** 872f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 87366ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 874f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 875f4c4dcf4SKowalski, Kamil * 876f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 877f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 878f4c4dcf4SKowalski, Kamil * 879f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 880b5c07418SJames Feist 881b5c07418SJames Feist nlohmann::json queryParameterValueFormatError(const std::string& arg1, 882b5c07418SJames Feist const std::string& arg2); 883b5c07418SJames Feist 884f12894f8SJason M. Bills void queryParameterValueFormatError(crow::Response& res, 885f12894f8SJason M. Bills const std::string& arg1, 886f4c4dcf4SKowalski, Kamil const std::string& arg2); 887f4c4dcf4SKowalski, Kamil 888f4c4dcf4SKowalski, Kamil /** 889f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 89066ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 891f4c4dcf4SKowalski, Kamil * included in the request." 892f4c4dcf4SKowalski, Kamil * 893f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 894f4c4dcf4SKowalski, Kamil * 895f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 896b5c07418SJames Feist nlohmann::json propertyMissing(const std::string& arg1); 897b5c07418SJames Feist 898f12894f8SJason M. Bills void propertyMissing(crow::Response& res, const std::string& arg1); 899f12894f8SJason M. Bills 900f12894f8SJason M. Bills /** 901f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 90266ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 903f4c4dcf4SKowalski, Kamil * unavailability of resources." 904f4c4dcf4SKowalski, Kamil * 905f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 906f4c4dcf4SKowalski, Kamil * 907f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 908b5c07418SJames Feist nlohmann::json resourceExhaustion(const std::string& arg1); 909b5c07418SJames Feist 910f12894f8SJason M. Bills void resourceExhaustion(crow::Response& res, const std::string& arg1); 911f4c4dcf4SKowalski, Kamil 912f4c4dcf4SKowalski, Kamil /** 913f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 914f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 915f4c4dcf4SKowalski, Kamil * 916f4c4dcf4SKowalski, Kamil * 917f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 91865176d39SEd Tanous nlohmann::json accountModified(); 919b5c07418SJames Feist 920a08b46ccSJason M. Bills void accountModified(crow::Response& res); 921f4c4dcf4SKowalski, Kamil 922f4c4dcf4SKowalski, Kamil /** 923f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 92466ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 92566ac2b8cSJason M. Bills * range <arg3>." 926f4c4dcf4SKowalski, Kamil * 927f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 928f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 929f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 930f4c4dcf4SKowalski, Kamil * 931f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 932b5c07418SJames Feist nlohmann::json queryParameterOutOfRange(const std::string& arg1, 933b5c07418SJames Feist const std::string& arg2, 934b5c07418SJames Feist const std::string& arg3); 935b5c07418SJames Feist 936f12894f8SJason M. Bills void queryParameterOutOfRange(crow::Response& res, const std::string& arg1, 937f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 938f4c4dcf4SKowalski, Kamil 9393bf4e632SJoseph Reynolds /** 9403bf4e632SJoseph Reynolds * @brief Formats PasswordChangeRequired message into JSON 9413bf4e632SJoseph Reynolds * Message body: The password provided for this account must be changed 9423bf4e632SJoseph Reynolds * before access is granted. PATCH the 'Password' property for this 9433bf4e632SJoseph Reynolds * account located at the target URI '%1' to complete this process. 9443bf4e632SJoseph Reynolds * 9453bf4e632SJoseph Reynolds * @param[in] arg1 Parameter of message that will replace %1 in its body. 9463bf4e632SJoseph Reynolds * 9473bf4e632SJoseph Reynolds * @returns Message PasswordChangeRequired formatted to JSON */ 9483bf4e632SJoseph Reynolds void passwordChangeRequired(crow::Response& res, const std::string& arg1); 9493bf4e632SJoseph Reynolds 9504cde5d90SJames Feist /** 9514cde5d90SJames Feist * @brief Formats InvalidUpload message into JSON 9524cde5d90SJames Feist * Message body: Invalid file uploaded to %1: %2.* 9534cde5d90SJames Feist * @param[in] arg1 Parameter of message that will replace %1 in its body. 9544cde5d90SJames Feist * @param[in] arg2 Parameter of message that will replace %2 in its body. 9554cde5d90SJames Feist * 9564cde5d90SJames Feist * @returns Message InvalidUpload formatted to JSON */ 9574cde5d90SJames Feist nlohmann::json invalidUpload(const std::string& arg1, const std::string& arg2); 9584cde5d90SJames Feist 9594cde5d90SJames Feist void invalidUpload(crow::Response& res, const std::string& arg1, 9604cde5d90SJames Feist const std::string& arg2); 9614cde5d90SJames Feist 962dd28ba82SAppaRao Puli /** 963dd28ba82SAppaRao Puli * @brief Formats MutualExclusiveProperties message into JSON 964dd28ba82SAppaRao Puli * Message body: "The properties <arg1> and <arg2> are mutually exclusive." 965dd28ba82SAppaRao Puli * 966dd28ba82SAppaRao Puli * @param[in] arg1 Parameter of message that will replace %1 in its body. 967dd28ba82SAppaRao Puli * @param[in] arg2 Parameter of message that will replace %2 in its body. 968dd28ba82SAppaRao Puli * 969dd28ba82SAppaRao Puli * @returns Message MutualExclusiveProperties formatted to JSON */ 970dd28ba82SAppaRao Puli nlohmann::json mutualExclusiveProperties(const std::string& arg1, 971dd28ba82SAppaRao Puli const std::string& arg2); 972dd28ba82SAppaRao Puli 973dd28ba82SAppaRao Puli void mutualExclusiveProperties(crow::Response& res, const std::string& arg1, 974dd28ba82SAppaRao Puli const std::string& arg2); 975dd28ba82SAppaRao Puli 976f4c4dcf4SKowalski, Kamil } // namespace messages 977f4c4dcf4SKowalski, Kamil 978f4c4dcf4SKowalski, Kamil } // namespace redfish 979