mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 20:50:55 +00:00
* Small fixes to prevent crash when empty json body is provided. * WIP: plug mem-leaks * fixup: add the QJsonObject instance in toJsonArray instead of pointer * fixup: simplify toJsonMap Actually the original solution is incomplete, because "innerType" maps to a single C++ type. Have a look at Qt's builtin QJsonObject::fromVariantMap. * Updates to antis81:patch-1 after tests. * update to remove string allocation * Updates due to address of members being passed * Update PetStore Examples * Small updates for Header includes
101 lines
2.0 KiB
C++
101 lines
2.0 KiB
C++
/**
|
|
* Swagger Petstore
|
|
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
|
|
*
|
|
* OpenAPI spec version: 1.0.0
|
|
* Contact: apiteam@swagger.io
|
|
*
|
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* SWGUser.h
|
|
*
|
|
* A User who is purchasing from the pet store
|
|
*/
|
|
|
|
#ifndef SWGUser_H_
|
|
#define SWGUser_H_
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include "SWGObject.h"
|
|
|
|
namespace Swagger {
|
|
|
|
class SWGUser: public SWGObject {
|
|
public:
|
|
SWGUser();
|
|
SWGUser(QString json);
|
|
~SWGUser();
|
|
void init();
|
|
void cleanup();
|
|
|
|
QString asJson ();
|
|
QJsonObject asJsonObject();
|
|
void fromJsonObject(QJsonObject json);
|
|
SWGUser* fromJson(QString jsonString);
|
|
|
|
qint64 getId();
|
|
void setId(qint64 id);
|
|
|
|
QString* getUsername();
|
|
void setUsername(QString* username);
|
|
|
|
QString* getFirstName();
|
|
void setFirstName(QString* first_name);
|
|
|
|
QString* getLastName();
|
|
void setLastName(QString* last_name);
|
|
|
|
QString* getEmail();
|
|
void setEmail(QString* email);
|
|
|
|
QString* getPassword();
|
|
void setPassword(QString* password);
|
|
|
|
QString* getPhone();
|
|
void setPhone(QString* phone);
|
|
|
|
qint32 getUserStatus();
|
|
void setUserStatus(qint32 user_status);
|
|
|
|
|
|
virtual bool isSet() override;
|
|
|
|
private:
|
|
qint64 id;
|
|
bool m_id_isSet;
|
|
|
|
QString* username;
|
|
bool m_username_isSet;
|
|
|
|
QString* first_name;
|
|
bool m_first_name_isSet;
|
|
|
|
QString* last_name;
|
|
bool m_last_name_isSet;
|
|
|
|
QString* email;
|
|
bool m_email_isSet;
|
|
|
|
QString* password;
|
|
bool m_password_isSet;
|
|
|
|
QString* phone;
|
|
bool m_phone_isSet;
|
|
|
|
qint32 user_status;
|
|
bool m_user_status_isSet;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* SWGUser_H_ */
|