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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
|
// model-body.mustache
// licenseInfo.mustache
/**
* Libre Graph API
* Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
*
* The version of the OpenAPI document: v1.0.4
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
#include "OAISpecialFolder.h"
#include <QDebug>
#include <QJsonArray>
#include <QJsonDocument>
#include <QObject>
#include "OAIHelpers.h"
namespace OpenAPI {
class OAISpecialFolderPrivate {
friend class OAISpecialFolder;
QString name;
bool name_isSet;
bool name_isValid;
};
OAISpecialFolder::OAISpecialFolder()
: d_ptr()
{
}
OAISpecialFolder::OAISpecialFolder(const OAISpecialFolder& other)
: d_ptr(other.d_ptr)
{
}
OAISpecialFolder::OAISpecialFolder(QString json)
: d_ptr(nullptr)
{
this->fromJson(json);
}
OAISpecialFolder::~OAISpecialFolder() = default;
void OAISpecialFolder::initializeModel() {
if (d_ptr == nullptr) {
d_ptr.reset(new OAISpecialFolderPrivate{});
Q_D(OAISpecialFolder);
d->name_isSet = false;
d->name_isValid = false;
}
}
void OAISpecialFolder::fromJson(QString jsonString) {
QByteArray array(jsonString.toUtf8());
QJsonDocument doc = QJsonDocument::fromJson(array);
QJsonObject jsonObject = doc.object();
this->fromJsonObject(jsonObject);
}
void OAISpecialFolder::fromJsonObject(QJsonObject json) {
initializeModel();
Q_D(OAISpecialFolder);
d->name_isValid = ::OpenAPI::fromJsonValue(d->name, json[QString("name")]);
d->name_isSet = !json[QString("name")].isNull() && d->name_isValid;
}
QString OAISpecialFolder::asJson() const {
QJsonObject obj = this->asJsonObject();
QJsonDocument doc(obj);
QByteArray bytes = doc.toJson();
return QString(bytes);
}
QJsonObject OAISpecialFolder::asJsonObject() const {
Q_D(const OAISpecialFolder);
if(!d){
return {};
}
QJsonObject obj;
if (d->name_isSet) {
obj.insert(QString("name"), ::OpenAPI::toJsonValue(d->name));
}
return obj;
}
QString OAISpecialFolder::getName() const {
Q_D(const OAISpecialFolder);
if(!d){
return {};
}
return d->name;
}
void OAISpecialFolder::setName(const QString &name) {
Q_D(OAISpecialFolder);
Q_ASSERT(d);
d->name = name;
d->name_isSet = true;
}
bool OAISpecialFolder::is_name_Set() const{
Q_D(const OAISpecialFolder);
if(!d){
return false;
}
return d->name_isSet;
}
bool OAISpecialFolder::is_name_Valid() const{
Q_D(const OAISpecialFolder);
if(!d){
return false;
}
return d->name_isValid;
}
bool OAISpecialFolder::isSet() const {
Q_D(const OAISpecialFolder);
if(!d){
return false;
}
bool isObjectUpdated = false;
do {
if (d->name_isSet) {
isObjectUpdated = true;
break;
}
} while (false);
return isObjectUpdated;
}
bool OAISpecialFolder::isValid() const {
Q_D(const OAISpecialFolder);
if(!d){
return false;
}
// only required properties are required for the object to be considered valid
return true;
}
} // namespace OpenAPI
|