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
|
// object.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.
*/
#ifndef OAI_OBJECT_H
#define OAI_OBJECT_H
#include <QJsonDocument>
#include <QJsonObject>
#include <QMetaType>
namespace OpenAPI {
class OAIObject {
public:
OAIObject() {}
OAIObject(QString jsonString) {
fromJson(jsonString);
}
virtual ~OAIObject() {}
virtual QJsonObject asJsonObject() const {
return jObj;
}
virtual QString asJson() const {
QJsonDocument doc(jObj);
return QString::fromUtf8(doc.toJson(QJsonDocument::Compact));
}
virtual void fromJson(QString jsonString) {
QJsonDocument doc = QJsonDocument::fromJson(jsonString.toUtf8());
jObj = doc.object();
}
virtual void fromJsonObject(QJsonObject json) {
jObj = json;
}
virtual bool isSet() const {
return false;
}
virtual bool isValid() const {
return true;
}
private:
QJsonObject jObj;
};
} // namespace OpenAPI
Q_DECLARE_METATYPE(OpenAPI::OAIObject)
#endif // OAI_OBJECT_H
|