forked from loafle/openapi-generator-original
* Add operationId in exception message * add number data type mapping * removing mergetool lines * first draft of cmake file * compiles generated source files with 64 bit cpprest and boost * using glob recurs to add source files * using glob recurse for source files * cmake to build statuc library * add cmake style comments, use project source dir and lib * fix_issue5488: Add supporting files and source files separately * fix_issue5488: Add supporting files and source files separately * fix_issue5488: Add supporting files and source files separately * fix_issue5488 - updated header comments * updated samples
117 lines
3.7 KiB
C++
117 lines
3.7 KiB
C++
/**
|
|
* Swagger Petstore
|
|
* This is a sample server Petstore server. You can find out more about Swagger at <a href=\"http://swagger.io\">http://swagger.io</a> or on irc.freenode.net, #swagger. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
|
*
|
|
* OpenAPI spec version: 1.0.0
|
|
* Contact: apiteam@wordnik.com
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
/*
|
|
* PetApi.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef PetApi_H_
|
|
#define PetApi_H_
|
|
|
|
|
|
#include "ApiClient.h"
|
|
|
|
#include "HttpContent.h"
|
|
#include "Pet.h"
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace io {
|
|
namespace swagger {
|
|
namespace client {
|
|
namespace api {
|
|
|
|
using namespace io::swagger::client::model;
|
|
|
|
class PetApi
|
|
{
|
|
public:
|
|
PetApi( std::shared_ptr<ApiClient> apiClient );
|
|
virtual ~PetApi();
|
|
/// <summary>
|
|
/// Add a new pet to the store
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="body">Pet object that needs to be added to the store (optional)</param>
|
|
pplx::task<void> addPet(std::shared_ptr<Pet> body);
|
|
/// <summary>
|
|
/// Deletes a pet
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="petId">Pet id to delete</param>/// <param name="apiKey"> (optional)</param>
|
|
pplx::task<void> deletePet(int64_t petId, utility::string_t apiKey);
|
|
/// <summary>
|
|
/// Finds Pets by status
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Multiple status values can be provided with comma separated strings
|
|
/// </remarks>
|
|
/// <param name="status">Status values that need to be considered for filter (optional, default to available)</param>
|
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByStatus(std::vector<utility::string_t> status);
|
|
/// <summary>
|
|
/// Finds Pets by tags
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
|
/// </remarks>
|
|
/// <param name="tags">Tags to filter by (optional)</param>
|
|
pplx::task<std::vector<std::shared_ptr<Pet>>> findPetsByTags(std::vector<utility::string_t> tags);
|
|
/// <summary>
|
|
/// Find pet by ID
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
|
/// </remarks>
|
|
/// <param name="petId">ID of pet that needs to be fetched</param>
|
|
pplx::task<std::shared_ptr<Pet>> getPetById(int64_t petId);
|
|
/// <summary>
|
|
/// Update an existing pet
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="body">Pet object that needs to be added to the store (optional)</param>
|
|
pplx::task<void> updatePet(std::shared_ptr<Pet> body);
|
|
/// <summary>
|
|
/// Updates a pet in the store with form data
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="petId">ID of pet that needs to be updated</param>/// <param name="name">Updated name of the pet (optional)</param>/// <param name="status">Updated status of the pet (optional)</param>
|
|
pplx::task<void> updatePetWithForm(utility::string_t petId, utility::string_t name, utility::string_t status);
|
|
/// <summary>
|
|
/// uploads an image
|
|
/// </summary>
|
|
/// <remarks>
|
|
///
|
|
/// </remarks>
|
|
/// <param name="petId">ID of pet to update</param>/// <param name="additionalMetadata">Additional data to pass to server (optional)</param>/// <param name="file">file to upload (optional)</param>
|
|
pplx::task<void> uploadFile(int64_t petId, utility::string_t additionalMetadata, std::shared_ptr<HttpContent> file);
|
|
|
|
protected:
|
|
std::shared_ptr<ApiClient> m_ApiClient;
|
|
};
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#endif /* PetApi_H_ */
|
|
|