Akihito Nakano cf657f1c7b [C++] Adjust the names (script, sample folder, generator) to lang option (#220)
* Rename script: qt5-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder: qt5cpp -> cpp-qt5

* Rename script: cpprest-petstore.sh -> cpp-restsdk-petstore.sh

* Rename sample folder: cpprest -> cpp-restsdk

* Rename generator: CppRestClientCodegen -> CppRestSdkClientCodegen

* Rename script: tizen-petstore.sh -> cpp-tizen-petstore.sh

* Rename sample folder: tizen -> cpp-tizen

* Rename script(security): qt5cpp-petstore.sh -> cpp-qt5-petstore.sh

* Rename sample folder(security): qt5cpp -> cpp-qt5

* Rename script(windows): qt5cpp-petstore.bat -> cpp-qt5-petstore.bat

* Change sample folder

* Rename script(windows): cpprest-petstore.bat -> cpp-restsdk-petstore.bat

* Change sample folder

* Rename script(windows): tizen-petstore.bat -> cpp-tizen-petstore.bat

* Change sample folder

* Change output folder: tizen -> cpp-tizen

* Rename the scripts under bin/openapi3

cpp-restsdk is not exist under bin/openapi3

* Change sample folder
2018-06-07 16:55:43 +08:00

94 lines
2.6 KiB
C++

/**
* OpenAPI Petstore
* This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
*
* NOTE: This class is auto generated by OpenAPI-Generator 3.0.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* ApiClient.h
*
* This is an API client responsible for stating the HTTP calls
*/
#ifndef ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#define ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_
#include "ApiConfiguration.h"
#include "ApiException.h"
#include "IHttpBody.h"
#include "HttpContent.h"
#include <memory>
#include <vector>
#include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h>
namespace org {
namespace openapitools {
namespace client {
namespace api {
using namespace org::openapitools::client::model;
class ApiClient
{
public:
ApiClient( std::shared_ptr<ApiConfiguration> configuration = nullptr );
virtual ~ApiClient();
std::shared_ptr<ApiConfiguration> getConfiguration() const;
void setConfiguration(std::shared_ptr<ApiConfiguration> configuration);
static utility::string_t parameterToString(utility::string_t value);
static utility::string_t parameterToString(int32_t value);
static utility::string_t parameterToString(int64_t value);
static utility::string_t parameterToString(float value);
static utility::string_t parameterToString(double value);
static utility::string_t parameterToString(const utility::datetime &value);
template<class T>
static utility::string_t parameterToString(const std::vector<T>& value);
pplx::task<web::http::http_response> callApi(
const utility::string_t& path,
const utility::string_t& method,
const std::map<utility::string_t, utility::string_t>& queryParams,
const std::shared_ptr<IHttpBody> postBody,
const std::map<utility::string_t, utility::string_t>& headerParams,
const std::map<utility::string_t, utility::string_t>& formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>>& fileParams,
const utility::string_t& contentType
) const;
protected:
std::shared_ptr<ApiConfiguration> m_Configuration;
};
template<class T>
utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
{
utility::stringstream_t ss;
for( size_t i = 0; i < value.size(); i++)
{
if( i > 0) ss << utility::conversions::to_string_t(", ");
ss << ApiClient::parameterToString(value[i]);
}
return ss.str();
}
}
}
}
}
#endif /* ORG_OPENAPITOOLS_CLIENT_API_ApiClient_H_ */