forked from loafle/openapi-generator-original
* 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
92 lines
1.8 KiB
C++
92 lines
1.8 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.
|
|
*/
|
|
|
|
/*
|
|
* SWGPet.h
|
|
*
|
|
* A pet for sale in the pet store
|
|
*/
|
|
|
|
#ifndef SWGPet_H_
|
|
#define SWGPet_H_
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
|
#include "SWGCategory.h"
|
|
#include "SWGTag.h"
|
|
#include <QList>
|
|
#include <QString>
|
|
|
|
#include "SWGObject.h"
|
|
|
|
namespace Swagger {
|
|
|
|
class SWGPet: public SWGObject {
|
|
public:
|
|
SWGPet();
|
|
SWGPet(QString json);
|
|
~SWGPet();
|
|
void init();
|
|
void cleanup();
|
|
|
|
QString asJson ();
|
|
QJsonObject asJsonObject();
|
|
void fromJsonObject(QJsonObject json);
|
|
SWGPet* fromJson(QString jsonString);
|
|
|
|
qint64 getId();
|
|
void setId(qint64 id);
|
|
|
|
SWGCategory* getCategory();
|
|
void setCategory(SWGCategory* category);
|
|
|
|
QString* getName();
|
|
void setName(QString* name);
|
|
|
|
QList<QString*>* getPhotoUrls();
|
|
void setPhotoUrls(QList<QString*>* photo_urls);
|
|
|
|
QList<SWGTag*>* getTags();
|
|
void setTags(QList<SWGTag*>* tags);
|
|
|
|
QString* getStatus();
|
|
void setStatus(QString* status);
|
|
|
|
|
|
virtual bool isSet() override;
|
|
|
|
private:
|
|
qint64 id;
|
|
bool m_id_isSet;
|
|
|
|
SWGCategory* category;
|
|
bool m_category_isSet;
|
|
|
|
QString* name;
|
|
bool m_name_isSet;
|
|
|
|
QList<QString*>* photo_urls;
|
|
bool m_photo_urls_isSet;
|
|
|
|
QList<SWGTag*>* tags;
|
|
bool m_tags_isSet;
|
|
|
|
QString* status;
|
|
bool m_status_isSet;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* SWGPet_H_ */
|