/** * This file is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ #pragma once // System headers #include #include namespace models { // anyOf schema - type alias for std::variant using StringOrNumber = std::variant< std::string, double >; // JSON serialization functions (inline for header-only) inline void from_json(const nlohmann::json& j, StringOrNumber& obj) { try { obj = j.get(); return; } catch (const nlohmann::json::exception&) { // Type mismatch, try next variant alternative } try { obj = j.get(); return; } catch (const nlohmann::json::exception&) { // Type mismatch, try next variant alternative } throw nlohmann::json::type_error::create(302, "Could not deserialize into any variant type of StringOrNumber", &j); } inline void to_json(nlohmann::json& j, const StringOrNumber& obj) { std::visit([&j](const auto& val) { j = nlohmann::json(val); }, obj); } } // namespace models