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 /**************************************************************** 17f4c4dcf4SKowalski, Kamil * This is an auto-generated header which contains definitions 18f4c4dcf4SKowalski, Kamil * to use Redfish DMTF defined messages. 19f4c4dcf4SKowalski, Kamil * 20f4c4dcf4SKowalski, Kamil * This header contains preprocessor defines which wrap 21f4c4dcf4SKowalski, Kamil * preparation functions for message with given id. The message 22f4c4dcf4SKowalski, Kamil * ids can be retrieved from Base.__ver__.json file. 23f4c4dcf4SKowalski, Kamil ***************************************************************/ 24f4c4dcf4SKowalski, Kamil #pragma once 25f4c4dcf4SKowalski, Kamil #include <nlohmann/json.hpp> 26f4c4dcf4SKowalski, Kamil 27f12894f8SJason M. Bills #include "crow/http_response.h" 28f12894f8SJason M. Bills 291abe55efSEd Tanous namespace redfish 301abe55efSEd Tanous { 31f4c4dcf4SKowalski, Kamil 321abe55efSEd Tanous namespace messages 331abe55efSEd Tanous { 34f4c4dcf4SKowalski, Kamil 3555c7b7a2SEd Tanous constexpr const char* messageVersionPrefix = "Base.1.2.0."; 3655c7b7a2SEd Tanous constexpr const char* messageAnnotation = "@Message.ExtendedInfo"; 37f4c4dcf4SKowalski, Kamil 38f4c4dcf4SKowalski, Kamil /** 39f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInUse message into JSON 40f4c4dcf4SKowalski, Kamil * Message body: "The change to the requested resource failed because the 41f4c4dcf4SKowalski, Kamil * resource is in use or in transition." 42f4c4dcf4SKowalski, Kamil * 43f4c4dcf4SKowalski, Kamil * 44f4c4dcf4SKowalski, Kamil * @returns Message ResourceInUse formatted to JSON */ 45f12894f8SJason M. Bills void resourceInUse(crow::Response& res); 46f4c4dcf4SKowalski, Kamil 47f4c4dcf4SKowalski, Kamil /** 48f4c4dcf4SKowalski, Kamil * @brief Formats MalformedJSON message into JSON 49f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted was malformed JSON and could not be 50f4c4dcf4SKowalski, Kamil * parsed by the receiving service." 51f4c4dcf4SKowalski, Kamil * 52f4c4dcf4SKowalski, Kamil * 53f4c4dcf4SKowalski, Kamil * @returns Message MalformedJSON formatted to JSON */ 54f12894f8SJason M. Bills void malformedJSON(crow::Response& res); 55f4c4dcf4SKowalski, Kamil 56f4c4dcf4SKowalski, Kamil /** 57f4c4dcf4SKowalski, Kamil * @brief Formats ResourceMissingAtURI message into JSON 58*66ac2b8cSJason 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 */ 63f12894f8SJason M. Bills void resourceMissingAtURI(crow::Response& res, const std::string& arg1); 64f4c4dcf4SKowalski, Kamil 65f4c4dcf4SKowalski, Kamil /** 66f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueFormatError message into JSON 67*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 68f4c4dcf4SKowalski, Kamil * is of a different format than the parameter can accept." 69f4c4dcf4SKowalski, Kamil * 70f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 71f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 72f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 73f4c4dcf4SKowalski, Kamil * 74f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueFormatError formatted to JSON */ 75f12894f8SJason M. Bills void actionParameterValueFormatError(crow::Response& res, 76f12894f8SJason M. Bills const std::string& arg1, 77f4c4dcf4SKowalski, Kamil const std::string& arg2, 78f4c4dcf4SKowalski, Kamil const std::string& arg3); 79f4c4dcf4SKowalski, Kamil 80f4c4dcf4SKowalski, Kamil /** 81f4c4dcf4SKowalski, Kamil * @brief Formats InternalError message into JSON 82f4c4dcf4SKowalski, Kamil * Message body: "The request failed due to an internal service error. The 83f4c4dcf4SKowalski, Kamil * service is still operational." 84f4c4dcf4SKowalski, Kamil * 85f4c4dcf4SKowalski, Kamil * 86f4c4dcf4SKowalski, Kamil * @returns Message InternalError formatted to JSON */ 87f12894f8SJason M. Bills void internalError(crow::Response& res); 88f12894f8SJason M. Bills 89f12894f8SJason M. Bills /** 90f12894f8SJason M. Bills * @brief Formats InternalError message into JSON for the specified field 91f12894f8SJason M. Bills * Message body: "The request failed due to an internal service error. The 92f12894f8SJason M. Bills * service is still operational." 93f12894f8SJason M. Bills * 94f12894f8SJason M. Bills * 95f12894f8SJason M. Bills * @returns Message InternalError formatted to JSON */ 96f12894f8SJason M. Bills void internalError(crow::Response& res, const std::string& fieldPath); 97f4c4dcf4SKowalski, Kamil 98f4c4dcf4SKowalski, Kamil /** 99f4c4dcf4SKowalski, Kamil * @brief Formats UnrecognizedRequestBody message into JSON 100f4c4dcf4SKowalski, Kamil * Message body: "The service detected a malformed request body that it was 101f4c4dcf4SKowalski, Kamil * unable to interpret." 102f4c4dcf4SKowalski, Kamil * 103f4c4dcf4SKowalski, Kamil * 104f4c4dcf4SKowalski, Kamil * @returns Message UnrecognizedRequestBody formatted to JSON */ 105f12894f8SJason M. Bills void unrecognizedRequestBody(crow::Response& res); 106f4c4dcf4SKowalski, Kamil 107f4c4dcf4SKowalski, Kamil /** 108f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriUnauthorized message into JSON 109*66ac2b8cSJason M. Bills * Message body: "While accessing the resource at <arg1>, the service received 110*66ac2b8cSJason M. Bills * an authorization error <arg2>." 111f4c4dcf4SKowalski, Kamil * 112f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 113f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 114f4c4dcf4SKowalski, Kamil * 115f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriUnauthorized formatted to JSON */ 116f12894f8SJason M. Bills void resourceAtUriUnauthorized(crow::Response& res, const std::string& arg1, 117f4c4dcf4SKowalski, Kamil const std::string& arg2); 118f4c4dcf4SKowalski, Kamil 119f4c4dcf4SKowalski, Kamil /** 120f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterUnknown message into JSON 121*66ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with the invalid parameter 122*66ac2b8cSJason M. Bills * <arg2>." 123f4c4dcf4SKowalski, Kamil * 124f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 125f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 126f4c4dcf4SKowalski, Kamil * 127f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterUnknown formatted to JSON */ 128f12894f8SJason M. Bills void actionParameterUnknown(crow::Response& res, const std::string& arg1, 129f4c4dcf4SKowalski, Kamil const std::string& arg2); 130f4c4dcf4SKowalski, Kamil 131f4c4dcf4SKowalski, Kamil /** 132f4c4dcf4SKowalski, Kamil * @brief Formats ResourceCannotBeDeleted message into JSON 133f4c4dcf4SKowalski, Kamil * Message body: "The delete request failed because the resource requested 134f4c4dcf4SKowalski, Kamil * cannot be deleted." 135f4c4dcf4SKowalski, Kamil * 136f4c4dcf4SKowalski, Kamil * 137f4c4dcf4SKowalski, Kamil * @returns Message ResourceCannotBeDeleted formatted to JSON */ 138f12894f8SJason M. Bills void resourceCannotBeDeleted(crow::Response& res); 139f4c4dcf4SKowalski, Kamil 140f4c4dcf4SKowalski, Kamil /** 141f4c4dcf4SKowalski, Kamil * @brief Formats PropertyDuplicate message into JSON 142*66ac2b8cSJason M. Bills * Message body: "The property <arg1> was duplicated in the request." 143f4c4dcf4SKowalski, Kamil * 144f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 145f4c4dcf4SKowalski, Kamil * 146f4c4dcf4SKowalski, Kamil * @returns Message PropertyDuplicate formatted to JSON */ 147f12894f8SJason M. Bills void propertyDuplicate(crow::Response& res, const std::string& arg1); 148f4c4dcf4SKowalski, Kamil 149f4c4dcf4SKowalski, Kamil /** 150f4c4dcf4SKowalski, Kamil * @brief Formats ServiceTemporarilyUnavailable message into JSON 151*66ac2b8cSJason M. Bills * Message body: "The service is temporarily unavailable. Retry in <arg1> 152f4c4dcf4SKowalski, Kamil * seconds." 153f4c4dcf4SKowalski, Kamil * 154f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 155f4c4dcf4SKowalski, Kamil * 156f4c4dcf4SKowalski, Kamil * @returns Message ServiceTemporarilyUnavailable formatted to JSON */ 157f12894f8SJason M. Bills void serviceTemporarilyUnavailable(crow::Response& res, 158f12894f8SJason M. Bills const std::string& arg1); 159f4c4dcf4SKowalski, Kamil 160f4c4dcf4SKowalski, Kamil /** 161f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAlreadyExists message into JSON 162*66ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> with the property <arg2> 163*66ac2b8cSJason M. Bills * with the value <arg3> already exists." 164f4c4dcf4SKowalski, Kamil * 165f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 166f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 167f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 168f4c4dcf4SKowalski, Kamil * 169f4c4dcf4SKowalski, Kamil * @returns Message ResourceAlreadyExists formatted to JSON */ 170f12894f8SJason M. Bills void resourceAlreadyExists(crow::Response& res, const std::string& arg1, 171f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 172f4c4dcf4SKowalski, Kamil 173f4c4dcf4SKowalski, Kamil /** 174f4c4dcf4SKowalski, Kamil * @brief Formats AccountForSessionNoLongerExists message into JSON 175f4c4dcf4SKowalski, Kamil * Message body: "The account for the current session has been removed, thus the 176f4c4dcf4SKowalski, Kamil * current session has been removed as well." 177f4c4dcf4SKowalski, Kamil * 178f4c4dcf4SKowalski, Kamil * 179f4c4dcf4SKowalski, Kamil * @returns Message AccountForSessionNoLongerExists formatted to JSON */ 180f12894f8SJason M. Bills void accountForSessionNoLongerExists(crow::Response& res); 181f4c4dcf4SKowalski, Kamil 182f4c4dcf4SKowalski, Kamil /** 183f4c4dcf4SKowalski, Kamil * @brief Formats CreateFailedMissingReqProperties message into JSON 184f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the required property 185*66ac2b8cSJason M. Bills * <arg1> was missing from the request." 186f4c4dcf4SKowalski, Kamil * 187f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 188f4c4dcf4SKowalski, Kamil * 189f4c4dcf4SKowalski, Kamil * @returns Message CreateFailedMissingReqProperties formatted to JSON */ 190f12894f8SJason M. Bills void createFailedMissingReqProperties(crow::Response& res, 191f12894f8SJason M. Bills const std::string& arg1); 192f4c4dcf4SKowalski, Kamil 193f4c4dcf4SKowalski, Kamil /** 194f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueFormatError message into JSON 195*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 196f4c4dcf4SKowalski, Kamil * format than the property can accept." 197f4c4dcf4SKowalski, Kamil * 198f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 199f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 200f4c4dcf4SKowalski, Kamil * 201f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueFormatError formatted to JSON */ 202f12894f8SJason M. Bills void propertyValueFormatError(crow::Response& res, const std::string& arg1, 203f4c4dcf4SKowalski, Kamil const std::string& arg2); 204f4c4dcf4SKowalski, Kamil 205f4c4dcf4SKowalski, Kamil /** 206f12894f8SJason M. Bills * @brief Formats PropertyValueFormatError message into JSON for the specified 207f12894f8SJason M. Bills * property 208*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 209f12894f8SJason M. Bills * format than the property can accept." 210f12894f8SJason M. Bills * 211f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 212f12894f8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 213f12894f8SJason M. Bills * 214f12894f8SJason M. Bills * @returns Message PropertyValueFormatError formatted to JSON */ 215f12894f8SJason M. Bills void propertyValueFormatError(crow::Response& res, const std::string& arg1, 216f12894f8SJason M. Bills const std::string& arg2, 217f12894f8SJason M. Bills const std::string property); 218f12894f8SJason M. Bills 219f12894f8SJason M. Bills /** 220f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueNotInList message into JSON 221*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in the list of 222f4c4dcf4SKowalski, Kamil * acceptable values." 223f4c4dcf4SKowalski, Kamil * 224f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 225f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 226f4c4dcf4SKowalski, Kamil * 227f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueNotInList formatted to JSON */ 228f12894f8SJason M. Bills void propertyValueNotInList(crow::Response& res, const std::string& arg1, 229f4c4dcf4SKowalski, Kamil const std::string& arg2); 230f4c4dcf4SKowalski, Kamil 231f4c4dcf4SKowalski, Kamil /** 232f12894f8SJason M. Bills * @brief Formats PropertyValueNotInList message into JSON for the specified 233f12894f8SJason M. Bills * property 234*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is not in 235f12894f8SJason M. Bills * the list of acceptable values." 236f12894f8SJason M. Bills * 237f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 238f12894f8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 239f12894f8SJason M. Bills * 240f12894f8SJason M. Bills * @returns Message PropertyValueNotInList formatted to JSON */ 241f12894f8SJason M. Bills void propertyValueNotInList(crow::Response& res, const std::string& arg1, 242f12894f8SJason M. Bills const std::string& arg2, 243f12894f8SJason M. Bills const std::string property); 244f12894f8SJason M. Bills 245f12894f8SJason M. Bills /** 246f4c4dcf4SKowalski, Kamil * @brief Formats ResourceAtUriInUnknownFormat message into JSON 247*66ac2b8cSJason M. Bills * Message body: "The resource at <arg1> is in a format not recognized by the 248f4c4dcf4SKowalski, Kamil * service." 249f4c4dcf4SKowalski, Kamil * 250f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 251f4c4dcf4SKowalski, Kamil * 252f4c4dcf4SKowalski, Kamil * @returns Message ResourceAtUriInUnknownFormat formatted to JSON */ 253f12894f8SJason M. Bills void resourceAtUriInUnknownFormat(crow::Response& res, const std::string& arg1); 254f4c4dcf4SKowalski, Kamil 255f4c4dcf4SKowalski, Kamil /** 256f4c4dcf4SKowalski, Kamil * @brief Formats ServiceInUnknownState message into JSON 257f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is in an unknown 258f4c4dcf4SKowalski, Kamil * state and can no longer take incoming requests." 259f4c4dcf4SKowalski, Kamil * 260f4c4dcf4SKowalski, Kamil * 261f4c4dcf4SKowalski, Kamil * @returns Message ServiceInUnknownState formatted to JSON */ 262f12894f8SJason M. Bills void serviceInUnknownState(crow::Response& res); 263f4c4dcf4SKowalski, Kamil 264f4c4dcf4SKowalski, Kamil /** 265f4c4dcf4SKowalski, Kamil * @brief Formats EventSubscriptionLimitExceeded message into JSON 266f4c4dcf4SKowalski, Kamil * Message body: "The event subscription failed due to the number of 267f4c4dcf4SKowalski, Kamil * simultaneous subscriptions exceeding the limit of the implementation." 268f4c4dcf4SKowalski, Kamil * 269f4c4dcf4SKowalski, Kamil * 270f4c4dcf4SKowalski, Kamil * @returns Message EventSubscriptionLimitExceeded formatted to JSON */ 271f12894f8SJason M. Bills void eventSubscriptionLimitExceeded(crow::Response& res); 272f4c4dcf4SKowalski, Kamil 273f4c4dcf4SKowalski, Kamil /** 274f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterMissing message into JSON 275*66ac2b8cSJason M. Bills * Message body: "The action <arg1> requires the parameter <arg2> to be present 276f4c4dcf4SKowalski, Kamil * in the request body." 277f4c4dcf4SKowalski, Kamil * 278f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 279f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 280f4c4dcf4SKowalski, Kamil * 281f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterMissing formatted to JSON */ 282f12894f8SJason M. Bills void actionParameterMissing(crow::Response& res, const std::string& arg1, 283f4c4dcf4SKowalski, Kamil const std::string& arg2); 284f4c4dcf4SKowalski, Kamil 285f4c4dcf4SKowalski, Kamil /** 286f4c4dcf4SKowalski, Kamil * @brief Formats StringValueTooLong message into JSON 287*66ac2b8cSJason M. Bills * Message body: "The string <arg1> exceeds the length limit <arg2>." 288f4c4dcf4SKowalski, Kamil * 289f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 290f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 291f4c4dcf4SKowalski, Kamil * 292f4c4dcf4SKowalski, Kamil * @returns Message StringValueTooLong formatted to JSON */ 293f12894f8SJason M. Bills void stringValueTooLong(crow::Response& res, const std::string& arg1, 294f12894f8SJason M. Bills const int& arg2); 295f4c4dcf4SKowalski, Kamil 296f4c4dcf4SKowalski, Kamil /** 297f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueTypeError message into JSON 298*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a different 299f4c4dcf4SKowalski, Kamil * type than the property can accept." 300f4c4dcf4SKowalski, Kamil * 301f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 302f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 303f4c4dcf4SKowalski, Kamil * 304f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueTypeError formatted to JSON */ 305f12894f8SJason M. Bills void propertyValueTypeError(crow::Response& res, const std::string& arg1, 306f4c4dcf4SKowalski, Kamil const std::string& arg2); 307f4c4dcf4SKowalski, Kamil 308f4c4dcf4SKowalski, Kamil /** 309f12894f8SJason M. Bills * @brief Formats PropertyValueTypeError message into JSON for the specified 310f12894f8SJason M. Bills * property 311*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the property <arg2> is of a 312f12894f8SJason M. Bills * different type than the property can accept." 313f12894f8SJason M. Bills * 314f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 315f12894f8SJason M. Bills * @param[in] arg2 Parameter of message that will replace %2 in its body. 316f12894f8SJason M. Bills * 317f12894f8SJason M. Bills * @returns Message PropertyValueTypeError formatted to JSON */ 318f12894f8SJason M. Bills void propertyValueTypeError(crow::Response& res, const std::string& arg1, 319f12894f8SJason M. Bills const std::string& arg2, 320f12894f8SJason M. Bills const std::string& property); 321f12894f8SJason M. Bills 322f12894f8SJason M. Bills /** 323f4c4dcf4SKowalski, Kamil * @brief Formats ResourceNotFound message into JSON 324*66ac2b8cSJason M. Bills * Message body: "The requested resource of type <arg1> named <arg2> was not 325f4c4dcf4SKowalski, Kamil * found." 326f4c4dcf4SKowalski, Kamil * 327f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 328f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 329f4c4dcf4SKowalski, Kamil * 330f4c4dcf4SKowalski, Kamil * @returns Message ResourceNotFound formatted to JSON */ 331f12894f8SJason M. Bills void resourceNotFound(crow::Response& res, const std::string& arg1, 332f4c4dcf4SKowalski, Kamil const std::string& arg2); 333f4c4dcf4SKowalski, Kamil 334f4c4dcf4SKowalski, Kamil /** 335f4c4dcf4SKowalski, Kamil * @brief Formats CouldNotEstablishConnection message into JSON 33655c7b7a2SEd Tanous * Message body: "The service failed to establish a Connection with the URI 337*66ac2b8cSJason M. Bills * <arg1>." 338f4c4dcf4SKowalski, Kamil * 339f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 340f4c4dcf4SKowalski, Kamil * 341f4c4dcf4SKowalski, Kamil * @returns Message CouldNotEstablishConnection formatted to JSON */ 342f12894f8SJason M. Bills void couldNotEstablishConnection(crow::Response& res, const std::string& arg1); 343f4c4dcf4SKowalski, Kamil 344f4c4dcf4SKowalski, Kamil /** 345f4c4dcf4SKowalski, Kamil * @brief Formats PropertyNotWritable message into JSON 346*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and cannot be 347f4c4dcf4SKowalski, Kamil * assigned a value." 348f4c4dcf4SKowalski, Kamil * 349f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 350f4c4dcf4SKowalski, Kamil * 351f4c4dcf4SKowalski, Kamil * @returns Message PropertyNotWritable formatted to JSON */ 352f12894f8SJason M. Bills void propertyNotWritable(crow::Response& res, const std::string& arg1); 353f12894f8SJason M. Bills 354f12894f8SJason M. Bills /** 355f12894f8SJason M. Bills * @brief Formats PropertyNotWritable message into JSON for the specified 356f12894f8SJason M. Bills * property 357*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is a read only property and 358f12894f8SJason M. Bills * cannot be assigned a value." 359f12894f8SJason M. Bills * 360f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 361f12894f8SJason M. Bills * 362f12894f8SJason M. Bills * @returns Message PropertyNotWritable formatted to JSON */ 363f12894f8SJason M. Bills void propertyNotWritable(crow::Response& res, const std::string& arg1, 364f12894f8SJason M. Bills const std::string& property); 365f4c4dcf4SKowalski, Kamil 366f4c4dcf4SKowalski, Kamil /** 367f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueTypeError message into JSON 368*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is of a 369f4c4dcf4SKowalski, Kamil * different type than the parameter can accept." 370f4c4dcf4SKowalski, Kamil * 371f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 372f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 373f4c4dcf4SKowalski, Kamil * 374f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueTypeError formatted to JSON */ 375f12894f8SJason M. Bills void queryParameterValueTypeError(crow::Response& res, const std::string& arg1, 376f4c4dcf4SKowalski, Kamil const std::string& arg2); 377f4c4dcf4SKowalski, Kamil 378f4c4dcf4SKowalski, Kamil /** 379f4c4dcf4SKowalski, Kamil * @brief Formats ServiceShuttingDown message into JSON 380f4c4dcf4SKowalski, Kamil * Message body: "The operation failed because the service is shutting down and 381f4c4dcf4SKowalski, Kamil * can no longer take incoming requests." 382f4c4dcf4SKowalski, Kamil * 383f4c4dcf4SKowalski, Kamil * 384f4c4dcf4SKowalski, Kamil * @returns Message ServiceShuttingDown formatted to JSON */ 385f12894f8SJason M. Bills void serviceShuttingDown(crow::Response& res); 386f4c4dcf4SKowalski, Kamil 387f4c4dcf4SKowalski, Kamil /** 388f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterDuplicate message into JSON 389*66ac2b8cSJason M. Bills * Message body: "The action <arg1> was submitted with more than one value for 390*66ac2b8cSJason M. Bills * the parameter <arg2>." 391f4c4dcf4SKowalski, Kamil * 392f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 393f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 394f4c4dcf4SKowalski, Kamil * 395f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterDuplicate formatted to JSON */ 396f12894f8SJason M. Bills void actionParameterDuplicate(crow::Response& res, const std::string& arg1, 397f4c4dcf4SKowalski, Kamil const std::string& arg2); 398f4c4dcf4SKowalski, Kamil 399f4c4dcf4SKowalski, Kamil /** 400f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterNotSupported message into JSON 401*66ac2b8cSJason M. Bills * Message body: "The parameter <arg1> for the action <arg2> is not supported on 402f4c4dcf4SKowalski, Kamil * the target resource." 403f4c4dcf4SKowalski, Kamil * 404f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 405f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 406f4c4dcf4SKowalski, Kamil * 407f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterNotSupported formatted to JSON */ 408f12894f8SJason M. Bills void actionParameterNotSupported(crow::Response& res, const std::string& arg1, 409f4c4dcf4SKowalski, Kamil const std::string& arg2); 410f4c4dcf4SKowalski, Kamil 411f4c4dcf4SKowalski, Kamil /** 412f4c4dcf4SKowalski, Kamil * @brief Formats SourceDoesNotSupportProtocol message into JSON 413*66ac2b8cSJason M. Bills * Message body: "The other end of the Connection at <arg1> does not support the 414*66ac2b8cSJason M. Bills * specified protocol <arg2>." 415f4c4dcf4SKowalski, Kamil * 416f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 417f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 418f4c4dcf4SKowalski, Kamil * 419f4c4dcf4SKowalski, Kamil * @returns Message SourceDoesNotSupportProtocol formatted to JSON */ 420f12894f8SJason M. Bills void sourceDoesNotSupportProtocol(crow::Response& res, const std::string& arg1, 421f4c4dcf4SKowalski, Kamil const std::string& arg2); 422f4c4dcf4SKowalski, Kamil 423f4c4dcf4SKowalski, Kamil /** 424f4c4dcf4SKowalski, Kamil * @brief Formats AccountRemoved message into JSON 425f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully removed." 426f4c4dcf4SKowalski, Kamil * 427f4c4dcf4SKowalski, Kamil * 428f4c4dcf4SKowalski, Kamil * @returns Message AccountRemoved formatted to JSON */ 429f12894f8SJason M. Bills void accountRemoved(crow::Response& res); 430f4c4dcf4SKowalski, Kamil 431f4c4dcf4SKowalski, Kamil /** 432f4c4dcf4SKowalski, Kamil * @brief Formats AccessDenied message into JSON 433*66ac2b8cSJason M. Bills * Message body: "While attempting to establish a Connection to <arg1>, the 434f4c4dcf4SKowalski, Kamil * service denied access." 435f4c4dcf4SKowalski, Kamil * 436f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 437f4c4dcf4SKowalski, Kamil * 438f4c4dcf4SKowalski, Kamil * @returns Message AccessDenied formatted to JSON */ 439f12894f8SJason M. Bills void accessDenied(crow::Response& res, const std::string& arg1); 440f4c4dcf4SKowalski, Kamil 441f4c4dcf4SKowalski, Kamil /** 442f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupported message into JSON 443f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported by the implementation." 444f4c4dcf4SKowalski, Kamil * 445f4c4dcf4SKowalski, Kamil * 446f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupported formatted to JSON */ 447f12894f8SJason M. Bills void queryNotSupported(crow::Response& res); 448f4c4dcf4SKowalski, Kamil 449f4c4dcf4SKowalski, Kamil /** 450f4c4dcf4SKowalski, Kamil * @brief Formats CreateLimitReachedForResource message into JSON 451f4c4dcf4SKowalski, Kamil * Message body: "The create operation failed because the resource has reached 452f4c4dcf4SKowalski, Kamil * the limit of possible resources." 453f4c4dcf4SKowalski, Kamil * 454f4c4dcf4SKowalski, Kamil * 455f4c4dcf4SKowalski, Kamil * @returns Message CreateLimitReachedForResource formatted to JSON */ 456f12894f8SJason M. Bills void createLimitReachedForResource(crow::Response& res); 457f4c4dcf4SKowalski, Kamil 458f4c4dcf4SKowalski, Kamil /** 459f4c4dcf4SKowalski, Kamil * @brief Formats GeneralError message into JSON 460f4c4dcf4SKowalski, Kamil * Message body: "A general error has occurred. See ExtendedInfo for more 461f4c4dcf4SKowalski, Kamil * information." 462f4c4dcf4SKowalski, Kamil * 463f4c4dcf4SKowalski, Kamil * 464f4c4dcf4SKowalski, Kamil * @returns Message GeneralError formatted to JSON */ 465f12894f8SJason M. Bills void generalError(crow::Response& res); 466f4c4dcf4SKowalski, Kamil 467f4c4dcf4SKowalski, Kamil /** 468f4c4dcf4SKowalski, Kamil * @brief Formats Success message into JSON 469f4c4dcf4SKowalski, Kamil * Message body: "Successfully Completed Request" 470f4c4dcf4SKowalski, Kamil * 471f4c4dcf4SKowalski, Kamil * 472f4c4dcf4SKowalski, Kamil * @returns Message Success formatted to JSON */ 473f12894f8SJason M. Bills void success(crow::Response& res); 474f12894f8SJason M. Bills 475f12894f8SJason M. Bills /** 476f12894f8SJason M. Bills * @brief Formats Success message into JSON for the specified field 477f12894f8SJason M. Bills * Message body: "Successfully Completed Request" 478f12894f8SJason M. Bills * 479f12894f8SJason M. Bills * 480f12894f8SJason M. Bills * @returns Message Success formatted to JSON */ 481f12894f8SJason M. Bills void success(crow::Response& res, const std::string& fieldPath); 482f4c4dcf4SKowalski, Kamil 483f4c4dcf4SKowalski, Kamil /** 484f4c4dcf4SKowalski, Kamil * @brief Formats Created message into JSON 485f4c4dcf4SKowalski, Kamil * Message body: "The resource has been created successfully" 486f4c4dcf4SKowalski, Kamil * 487f4c4dcf4SKowalski, Kamil * 488f4c4dcf4SKowalski, Kamil * @returns Message Created formatted to JSON */ 489f12894f8SJason M. Bills void created(crow::Response& res); 490f4c4dcf4SKowalski, Kamil 491f4c4dcf4SKowalski, Kamil /** 492f4c4dcf4SKowalski, Kamil * @brief Formats PropertyUnknown message into JSON 493*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 494f4c4dcf4SKowalski, Kamil * the resource." 495f4c4dcf4SKowalski, Kamil * 496f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 497f4c4dcf4SKowalski, Kamil * 498f4c4dcf4SKowalski, Kamil * @returns Message PropertyUnknown formatted to JSON */ 499f12894f8SJason M. Bills void propertyUnknown(crow::Response& res, const std::string& arg1); 500f12894f8SJason M. Bills 501f12894f8SJason M. Bills /** 502f12894f8SJason M. Bills * @brief Formats PropertyUnknown message into JSON for the specified property 503*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is not in the list of valid properties for 504f12894f8SJason M. Bills * the resource." 505f12894f8SJason M. Bills * 506f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 507f12894f8SJason M. Bills * 508f12894f8SJason M. Bills * @returns Message PropertyUnknown formatted to JSON */ 509f12894f8SJason M. Bills void propertyUnknown(crow::Response& res, const std::string& arg1, 510f12894f8SJason M. Bills const std::string& property); 511f4c4dcf4SKowalski, Kamil 512f4c4dcf4SKowalski, Kamil /** 513f4c4dcf4SKowalski, Kamil * @brief Formats NoValidSession message into JSON 514f4c4dcf4SKowalski, Kamil * Message body: "There is no valid session established with the 515f4c4dcf4SKowalski, Kamil * implementation." 516f4c4dcf4SKowalski, Kamil * 517f4c4dcf4SKowalski, Kamil * 518f4c4dcf4SKowalski, Kamil * @returns Message NoValidSession formatted to JSON */ 519f12894f8SJason M. Bills void noValidSession(crow::Response& res); 520f4c4dcf4SKowalski, Kamil 521f4c4dcf4SKowalski, Kamil /** 522f4c4dcf4SKowalski, Kamil * @brief Formats InvalidObject message into JSON 523*66ac2b8cSJason M. Bills * Message body: "The object at <arg1> is invalid." 524f4c4dcf4SKowalski, Kamil * 525f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 526f4c4dcf4SKowalski, Kamil * 527f4c4dcf4SKowalski, Kamil * @returns Message InvalidObject formatted to JSON */ 528f12894f8SJason M. Bills void invalidObject(crow::Response& res, const std::string& arg1); 529f4c4dcf4SKowalski, Kamil 530f4c4dcf4SKowalski, Kamil /** 531f4c4dcf4SKowalski, Kamil * @brief Formats ResourceInStandby message into JSON 532f4c4dcf4SKowalski, Kamil * Message body: "The request could not be performed because the resource is in 533f4c4dcf4SKowalski, Kamil * standby." 534f4c4dcf4SKowalski, Kamil * 535f4c4dcf4SKowalski, Kamil * 536f4c4dcf4SKowalski, Kamil * @returns Message ResourceInStandby formatted to JSON */ 537f12894f8SJason M. Bills void resourceInStandby(crow::Response& res); 538f4c4dcf4SKowalski, Kamil 539f4c4dcf4SKowalski, Kamil /** 540f4c4dcf4SKowalski, Kamil * @brief Formats ActionParameterValueTypeError message into JSON 541*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> in the action <arg3> 542f4c4dcf4SKowalski, Kamil * is of a different type than the parameter can accept." 543f4c4dcf4SKowalski, Kamil * 544f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 545f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 546f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 547f4c4dcf4SKowalski, Kamil * 548f4c4dcf4SKowalski, Kamil * @returns Message ActionParameterValueTypeError formatted to JSON */ 549f12894f8SJason M. Bills void actionParameterValueTypeError(crow::Response& res, const std::string& arg1, 550f4c4dcf4SKowalski, Kamil const std::string& arg2, 551f4c4dcf4SKowalski, Kamil const std::string& arg3); 552f4c4dcf4SKowalski, Kamil 553f4c4dcf4SKowalski, Kamil /** 554f4c4dcf4SKowalski, Kamil * @brief Formats SessionLimitExceeded message into JSON 555f4c4dcf4SKowalski, Kamil * Message body: "The session establishment failed due to the number of 556f4c4dcf4SKowalski, Kamil * simultaneous sessions exceeding the limit of the implementation." 557f4c4dcf4SKowalski, Kamil * 558f4c4dcf4SKowalski, Kamil * 559f4c4dcf4SKowalski, Kamil * @returns Message SessionLimitExceeded formatted to JSON */ 560f12894f8SJason M. Bills void sessionLimitExceeded(crow::Response& res); 561f4c4dcf4SKowalski, Kamil 562f4c4dcf4SKowalski, Kamil /** 563f4c4dcf4SKowalski, Kamil * @brief Formats ActionNotSupported message into JSON 564*66ac2b8cSJason M. Bills * Message body: "The action <arg1> is not supported by the resource." 565f4c4dcf4SKowalski, Kamil * 566f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 567f4c4dcf4SKowalski, Kamil * 568f4c4dcf4SKowalski, Kamil * @returns Message ActionNotSupported formatted to JSON */ 569f12894f8SJason M. Bills void actionNotSupported(crow::Response& res, const std::string& arg1); 570f4c4dcf4SKowalski, Kamil 571f4c4dcf4SKowalski, Kamil /** 572f4c4dcf4SKowalski, Kamil * @brief Formats InvalidIndex message into JSON 573*66ac2b8cSJason M. Bills * Message body: "The index <arg1> is not a valid offset into the array." 574f4c4dcf4SKowalski, Kamil * 575f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 576f4c4dcf4SKowalski, Kamil * 577f4c4dcf4SKowalski, Kamil * @returns Message InvalidIndex formatted to JSON */ 578f12894f8SJason M. Bills void invalidIndex(crow::Response& res, const int& arg1); 579f4c4dcf4SKowalski, Kamil 580f4c4dcf4SKowalski, Kamil /** 581f4c4dcf4SKowalski, Kamil * @brief Formats EmptyJSON message into JSON 582f4c4dcf4SKowalski, Kamil * Message body: "The request body submitted contained an empty JSON object and 583f4c4dcf4SKowalski, Kamil * the service is unable to process it." 584f4c4dcf4SKowalski, Kamil * 585f4c4dcf4SKowalski, Kamil * 586f4c4dcf4SKowalski, Kamil * @returns Message EmptyJSON formatted to JSON */ 587f12894f8SJason M. Bills void emptyJSON(crow::Response& res); 588f4c4dcf4SKowalski, Kamil 589f4c4dcf4SKowalski, Kamil /** 590f4c4dcf4SKowalski, Kamil * @brief Formats QueryNotSupportedOnResource message into JSON 591f4c4dcf4SKowalski, Kamil * Message body: "Querying is not supported on the requested resource." 592f4c4dcf4SKowalski, Kamil * 593f4c4dcf4SKowalski, Kamil * 594f4c4dcf4SKowalski, Kamil * @returns Message QueryNotSupportedOnResource formatted to JSON */ 595f12894f8SJason M. Bills void queryNotSupportedOnResource(crow::Response& res); 596f4c4dcf4SKowalski, Kamil 597f4c4dcf4SKowalski, Kamil /** 598f4c4dcf4SKowalski, Kamil * @brief Formats InsufficientPrivilege message into JSON 599f4c4dcf4SKowalski, Kamil * Message body: "There are insufficient privileges for the account or 600f4c4dcf4SKowalski, Kamil * credentials associated with the current session to perform the requested 601f4c4dcf4SKowalski, Kamil * operation." 602f4c4dcf4SKowalski, Kamil * 603f4c4dcf4SKowalski, Kamil * 604f4c4dcf4SKowalski, Kamil * @returns Message InsufficientPrivilege formatted to JSON */ 605f12894f8SJason M. Bills void insufficientPrivilege(crow::Response& res); 606f4c4dcf4SKowalski, Kamil 607f4c4dcf4SKowalski, Kamil /** 608f4c4dcf4SKowalski, Kamil * @brief Formats PropertyValueModified message into JSON 609*66ac2b8cSJason M. Bills * Message body: "The property <arg1> was assigned the value <arg2> due to 610f4c4dcf4SKowalski, Kamil * modification by the service." 611f4c4dcf4SKowalski, Kamil * 612f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 613f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 614f4c4dcf4SKowalski, Kamil * 615f4c4dcf4SKowalski, Kamil * @returns Message PropertyValueModified formatted to JSON */ 616f12894f8SJason M. Bills void propertyValueModified(crow::Response& res, const std::string& arg1, 617f4c4dcf4SKowalski, Kamil const std::string& arg2); 618f4c4dcf4SKowalski, Kamil 619f4c4dcf4SKowalski, Kamil /** 620f4c4dcf4SKowalski, Kamil * @brief Formats AccountNotModified message into JSON 621f4c4dcf4SKowalski, Kamil * Message body: "The account modification request failed." 622f4c4dcf4SKowalski, Kamil * 623f4c4dcf4SKowalski, Kamil * 624f4c4dcf4SKowalski, Kamil * @returns Message AccountNotModified formatted to JSON */ 625f12894f8SJason M. Bills void accountNotModified(crow::Response& res); 626f4c4dcf4SKowalski, Kamil 627f4c4dcf4SKowalski, Kamil /** 628f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterValueFormatError message into JSON 629*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the parameter <arg2> is of a different 630f4c4dcf4SKowalski, Kamil * format than the parameter can accept." 631f4c4dcf4SKowalski, Kamil * 632f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 633f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 634f4c4dcf4SKowalski, Kamil * 635f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterValueFormatError formatted to JSON */ 636f12894f8SJason M. Bills void queryParameterValueFormatError(crow::Response& res, 637f12894f8SJason M. Bills const std::string& arg1, 638f4c4dcf4SKowalski, Kamil const std::string& arg2); 639f4c4dcf4SKowalski, Kamil 640f4c4dcf4SKowalski, Kamil /** 641f4c4dcf4SKowalski, Kamil * @brief Formats PropertyMissing message into JSON 642*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 643f4c4dcf4SKowalski, Kamil * included in the request." 644f4c4dcf4SKowalski, Kamil * 645f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 646f4c4dcf4SKowalski, Kamil * 647f4c4dcf4SKowalski, Kamil * @returns Message PropertyMissing formatted to JSON */ 648f12894f8SJason M. Bills void propertyMissing(crow::Response& res, const std::string& arg1); 649f12894f8SJason M. Bills 650f12894f8SJason M. Bills /** 651f12894f8SJason M. Bills * @brief Formats PropertyMissing message into JSON for the specified property 652*66ac2b8cSJason M. Bills * Message body: "The property <arg1> is a required property and must be 653f12894f8SJason M. Bills * included in the request." 654f12894f8SJason M. Bills * 655f12894f8SJason M. Bills * @param[in] arg1 Parameter of message that will replace %1 in its body. 656f12894f8SJason M. Bills * 657f12894f8SJason M. Bills * @returns Message PropertyMissing formatted to JSON */ 658f12894f8SJason M. Bills void propertyMissing(crow::Response& res, const std::string& arg1, 659f12894f8SJason M. Bills const std::string& property); 660f4c4dcf4SKowalski, Kamil 661f4c4dcf4SKowalski, Kamil /** 662f4c4dcf4SKowalski, Kamil * @brief Formats ResourceExhaustion message into JSON 663*66ac2b8cSJason M. Bills * Message body: "The resource <arg1> was unable to satisfy the request due to 664f4c4dcf4SKowalski, Kamil * unavailability of resources." 665f4c4dcf4SKowalski, Kamil * 666f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 667f4c4dcf4SKowalski, Kamil * 668f4c4dcf4SKowalski, Kamil * @returns Message ResourceExhaustion formatted to JSON */ 669f12894f8SJason M. Bills void resourceExhaustion(crow::Response& res, const std::string& arg1); 670f4c4dcf4SKowalski, Kamil 671f4c4dcf4SKowalski, Kamil /** 672f4c4dcf4SKowalski, Kamil * @brief Formats AccountModified message into JSON 673f4c4dcf4SKowalski, Kamil * Message body: "The account was successfully modified." 674f4c4dcf4SKowalski, Kamil * 675f4c4dcf4SKowalski, Kamil * 676f4c4dcf4SKowalski, Kamil * @returns Message AccountModified formatted to JSON */ 677f12894f8SJason M. Bills void accountModified(crow::Response& res, const std::string& fieldPath); 678f4c4dcf4SKowalski, Kamil 679f4c4dcf4SKowalski, Kamil /** 680f4c4dcf4SKowalski, Kamil * @brief Formats QueryParameterOutOfRange message into JSON 681*66ac2b8cSJason M. Bills * Message body: "The value <arg1> for the query parameter <arg2> is out of 682*66ac2b8cSJason M. Bills * range <arg3>." 683f4c4dcf4SKowalski, Kamil * 684f4c4dcf4SKowalski, Kamil * @param[in] arg1 Parameter of message that will replace %1 in its body. 685f4c4dcf4SKowalski, Kamil * @param[in] arg2 Parameter of message that will replace %2 in its body. 686f4c4dcf4SKowalski, Kamil * @param[in] arg3 Parameter of message that will replace %3 in its body. 687f4c4dcf4SKowalski, Kamil * 688f4c4dcf4SKowalski, Kamil * @returns Message QueryParameterOutOfRange formatted to JSON */ 689f12894f8SJason M. Bills void queryParameterOutOfRange(crow::Response& res, const std::string& arg1, 690f12894f8SJason M. Bills const std::string& arg2, const std::string& arg3); 691f4c4dcf4SKowalski, Kamil 692f4c4dcf4SKowalski, Kamil } // namespace messages 693f4c4dcf4SKowalski, Kamil 694f4c4dcf4SKowalski, Kamil } // namespace redfish 695