-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathObject.cpp
91 lines (76 loc) · 2.16 KB
/
Object.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
* TikHub.io - Your Ultimate Social Media Data & API Marketplace
* High-performance asynchronous Douyin(抖音) TikTok Xiaohongshu(小红书) Kuaishou(快手) Weibo(微博) Instagram YouTube(油管) Twitter(X) Captcha Solver(验证码解决器) Temp Mail(临时邮箱) API(接口).
*
* The version of the OpenAPI document: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 4.3.1.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "Object.h"
namespace org {
namespace openapitools {
namespace client {
namespace model {
Object::Object()
{
m_object = web::json::value::object();
}
Object::~Object()
{
}
void Object::validate()
{
}
web::json::value Object::toJson() const
{
return m_object;
}
bool Object::fromJson(const web::json::value& val)
{
if (val.is_object())
{
m_object = val;
m_IsSet = true;
}
return isSet();
}
void Object::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
{
namePrefix += utility::conversions::to_string_t(".");
}
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object));
}
bool Object::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
{
namePrefix += utility::conversions::to_string_t(".");
}
if( ModelBase::fromHttpContent(multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object ) )
{
m_IsSet = true;
}
return isSet();
}
web::json::value Object::getValue(const utility::string_t& key) const
{
return m_object.at(key);
}
void Object::setValue(const utility::string_t& key, const web::json::value& value)
{
if( !value.is_null() )
{
m_object[key] = value;
m_IsSet = true;
}
}
}
}
}
}