Revision control
/**
* Qt Quick Demo - RESTful API client
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit the class manually.
*/
#ifndef OAI_HTTP_FILE_ELEMENT_H
#define OAI_HTTP_FILE_ELEMENT_H
#include <QtCore/qjsonvalue.h>
#include <QtCore/qmetatype.h>
+ #include <QtCore/qshareddata.h>
#include <QtCore/qstring.h>
namespace OpenAPI {
- class OAIHttpFileElement {
+ // NOTE: Normally, OAIHttpFileElementShared would be forward-declared and
+ // defined in the cpp file with QT_DECLARE/DEFINE_QESDP_SPECIALIZATION_DTOR(),
+ // but since those macros are internal, we define it here instead.
+ // The class enables implicit sharing via QExplicitlySharedDataPointer.
+ class OAIHttpFileElementShared : public QSharedData
+ {
public:
QString m_variableName;
QString m_localFilename;
QString m_requestFilename;
QString m_mimeType;
+ };
+
+ class OAIHttpFileElement {
+
+ public:
+ OAIHttpFileElement();
+ OAIHttpFileElement(const OAIHttpFileElement &other);
+ OAIHttpFileElement(OAIHttpFileElement &&other) noexcept : d(std::move(other.d)) {}
+ OAIHttpFileElement &operator=(const OAIHttpFileElement &other);
+ OAIHttpFileElement &operator=(OAIHttpFileElement &&other) noexcept
+ {
+ if (this != &other)
+ d = std::move(other.d);
+ return *this;
+ }
+ ~OAIHttpFileElement();
+
void setMimeType(const QString &mime);
void setFileName(const QString &name);
void setVariableName(const QString &name);
void setRequestFileName(const QString &name);
+
+ QString mimeType() const;
+ QString filename() const;
+ QString variableName() const;
+ QString requestFilename() const;
+
bool isSet() const;
bool fromStringValue(const QString &instr);
bool fromJsonValue(const QJsonValue &jval);
bool fromByteArray(const QByteArray &bytes);
bool saveToFile(const QString &variableName, const QString &localFilename, const QString &requestFilename, const QString &mime, const QByteArray &bytes);
QString asJson() const;
QJsonValue asJsonValue() const;
QByteArray asByteArray() const;
QByteArray loadFromFile(const QString &variableName, const QString &localFilename, const QString &requestFilename, const QString &mime);
+
+ private:
+ QExplicitlySharedDataPointer<OAIHttpFileElementShared> d;
};
} // namespace OpenAPI
Q_DECLARE_METATYPE(OpenAPI::OAIHttpFileElement)
#endif // OAI_HTTP_FILE_ELEMENT_H