forked from loafle/openapi-generator-original
[cpp][tiny] rename generator, update samples (#9560)
* rename generator, update samples * add doc * update readme
This commit is contained in:
78
samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.h
Normal file
78
samples/client/petstore/cpp-tiny/lib/Models/ApiResponse.h
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
/*
|
||||
* ApiResponse.h
|
||||
*
|
||||
* Describes the result of uploading an image resource
|
||||
*/
|
||||
|
||||
#ifndef TINY_CPP_CLIENT_ApiResponse_H_
|
||||
#define TINY_CPP_CLIENT_ApiResponse_H_
|
||||
|
||||
|
||||
#include <string>
|
||||
#include "bourne/json.hpp"
|
||||
#include "Helpers.h"
|
||||
|
||||
namespace Tiny {
|
||||
|
||||
|
||||
/*! \brief Describes the result of uploading an image resource
|
||||
*
|
||||
* \ingroup Models
|
||||
*
|
||||
*/
|
||||
|
||||
class ApiResponse{
|
||||
public:
|
||||
|
||||
/*! \brief Constructor.
|
||||
*/
|
||||
ApiResponse();
|
||||
ApiResponse(std::string jsonString);
|
||||
|
||||
|
||||
/*! \brief Destructor.
|
||||
*/
|
||||
virtual ~ApiResponse();
|
||||
|
||||
|
||||
/*! \brief Retrieve a bourne JSON representation of this class.
|
||||
*/
|
||||
bourne::json toJson();
|
||||
|
||||
|
||||
/*! \brief Fills in members of this class from bourne JSON object representing it.
|
||||
*/
|
||||
void fromJson(std::string jsonObj);
|
||||
|
||||
/*! \brief Get
|
||||
*/
|
||||
int getCode();
|
||||
|
||||
/*! \brief Set
|
||||
*/
|
||||
void setCode(int code);
|
||||
/*! \brief Get
|
||||
*/
|
||||
std::string getType();
|
||||
|
||||
/*! \brief Set
|
||||
*/
|
||||
void setType(std::string type);
|
||||
/*! \brief Get
|
||||
*/
|
||||
std::string getMessage();
|
||||
|
||||
/*! \brief Set
|
||||
*/
|
||||
void setMessage(std::string message);
|
||||
|
||||
|
||||
private:
|
||||
int code{};
|
||||
std::string type{};
|
||||
std::string message{};
|
||||
};
|
||||
}
|
||||
|
||||
#endif /* TINY_CPP_CLIENT_ApiResponse_H_ */
|
||||
Reference in New Issue
Block a user