mirror of
https://github.com/tribufu/sdk-cpp
synced 2025-06-15 11:24:18 +00:00
65 lines
1.4 KiB
C++
65 lines
1.4 KiB
C++
/**
|
|
* Tribufu API
|
|
* REST API to access Tribufu services.
|
|
*
|
|
* The version of the OpenAPI document: 1.1.0
|
|
* Contact: contact@tribufu.com
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.12.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
#include "tribufu++/AnyType.h"
|
|
|
|
namespace tribufu
|
|
{
|
|
namespace models
|
|
{
|
|
|
|
AnyType::AnyType()
|
|
{
|
|
m_value = web::json::value::null();
|
|
}
|
|
|
|
AnyType::~AnyType()
|
|
{
|
|
}
|
|
|
|
void AnyType::validate()
|
|
{
|
|
}
|
|
|
|
web::json::value AnyType::toJson() const
|
|
{
|
|
return m_value;
|
|
}
|
|
|
|
bool AnyType::fromJson(const web::json::value &val)
|
|
{
|
|
m_value = val;
|
|
m_IsSet = true;
|
|
return isSet();
|
|
}
|
|
|
|
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
|
{
|
|
if (m_value.is_object())
|
|
{
|
|
return Object::toMultipart(multipart, prefix);
|
|
}
|
|
throw std::runtime_error("AnyType::toMultipart: unsupported type");
|
|
}
|
|
|
|
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
|
|
{
|
|
if (m_value.is_object())
|
|
{
|
|
return Object::fromMultiPart(multipart, prefix);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|
|
}
|