mirror of
https://github.com/tribufu/sdk-cpp
synced 2025-06-15 11:14:20 +00:00
Format c++ files on generation
This commit is contained in:
@ -19,16 +19,18 @@
|
||||
#ifndef TRIBUFU_MODELS_AnyType_H_
|
||||
#define TRIBUFU_MODELS_AnyType_H_
|
||||
|
||||
|
||||
#include "tribufu++/Object.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <cpprest/json.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class AnyType : public Object {
|
||||
class AnyType : public Object
|
||||
{
|
||||
public:
|
||||
AnyType();
|
||||
virtual ~AnyType();
|
||||
|
@ -19,11 +19,10 @@
|
||||
#ifndef TRIBUFU_API_ApiClient_H_
|
||||
#define TRIBUFU_API_ApiClient_H_
|
||||
|
||||
|
||||
#include "tribufu++/ApiConfiguration.h"
|
||||
#include "tribufu++/ApiException.h"
|
||||
#include "tribufu++/IHttpBody.h"
|
||||
#include "tribufu++/HttpContent.h"
|
||||
#include "tribufu++/IHttpBody.h"
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#undef U
|
||||
@ -32,12 +31,14 @@
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <cpprest/http_client.h>
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
using namespace tribufu::models;
|
||||
|
||||
@ -62,49 +63,42 @@ public:
|
||||
static utility::string_t parameterToString(double value);
|
||||
static utility::string_t parameterToString(const utility::datetime &value);
|
||||
static utility::string_t parameterToString(bool value);
|
||||
template<class T>
|
||||
static utility::string_t parameterToString(const std::vector<T>& value);
|
||||
template<class T>
|
||||
static utility::string_t parameterToString(const std::shared_ptr<T>& value);
|
||||
template <class T> static utility::string_t parameterToString(const std::vector<T> &value);
|
||||
template <class T> static utility::string_t parameterToString(const std::shared_ptr<T> &value);
|
||||
|
||||
pplx::task<web::http::http_response> callApi(
|
||||
const utility::string_t& path,
|
||||
const utility::string_t& method,
|
||||
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;
|
||||
const utility::string_t &contentType) const;
|
||||
|
||||
protected:
|
||||
|
||||
ResponseHandlerType m_ResponseHandler;
|
||||
std::shared_ptr<const ApiConfiguration> m_Configuration;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
|
||||
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(", ");
|
||||
if (i > 0)
|
||||
ss << utility::conversions::to_string_t(", ");
|
||||
ss << ApiClient::parameterToString(value[i]);
|
||||
}
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
template<class T>
|
||||
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
|
||||
template <class T> utility::string_t ApiClient::parameterToString(const std::shared_ptr<T> &value)
|
||||
{
|
||||
return parameterToString(*value.get());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,15 +19,15 @@
|
||||
#ifndef TRIBUFU_API_ApiConfiguration_H_
|
||||
#define TRIBUFU_API_ApiConfiguration_H_
|
||||
|
||||
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <cpprest/http_client.h>
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
class ApiConfiguration
|
||||
{
|
||||
|
@ -19,28 +19,25 @@
|
||||
#ifndef TRIBUFU_API_ApiException_H_
|
||||
#define TRIBUFU_API_ApiException_H_
|
||||
|
||||
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <cpprest/http_msg.h>
|
||||
|
||||
#include <memory>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
class ApiException
|
||||
: public web::http::http_exception
|
||||
class ApiException : public web::http::http_exception
|
||||
{
|
||||
public:
|
||||
ApiException( int errorCode
|
||||
, const utility::string_t& message
|
||||
, std::shared_ptr<std::istream> content = nullptr );
|
||||
ApiException( int errorCode
|
||||
, const utility::string_t& message
|
||||
, std::map<utility::string_t, utility::string_t>& headers
|
||||
, std::shared_ptr<std::istream> content = nullptr );
|
||||
ApiException(int errorCode, const utility::string_t &message,
|
||||
std::shared_ptr<std::istream> content = nullptr);
|
||||
ApiException(int errorCode, const utility::string_t &message,
|
||||
std::map<utility::string_t, utility::string_t> &headers,
|
||||
std::shared_ptr<std::istream> content = nullptr);
|
||||
virtual ~ApiException();
|
||||
|
||||
std::map<utility::string_t, utility::string_t> &getHeaders();
|
||||
|
@ -19,14 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_HttpContent_H_
|
||||
#define TRIBUFU_MODELS_HttpContent_H_
|
||||
|
||||
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class HttpContent
|
||||
{
|
||||
|
@ -19,16 +19,19 @@
|
||||
#ifndef TRIBUFU_MODELS_IHttpBody_H_
|
||||
#define TRIBUFU_MODELS_IHttpBody_H_
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class IHttpBody
|
||||
{
|
||||
public:
|
||||
virtual ~IHttpBody() { }
|
||||
virtual ~IHttpBody()
|
||||
{
|
||||
}
|
||||
|
||||
virtual void writeTo(std::ostream &stream) = 0;
|
||||
};
|
||||
|
@ -19,16 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_JsonBody_H_
|
||||
#define TRIBUFU_MODELS_JsonBody_H_
|
||||
|
||||
|
||||
#include "tribufu++/IHttpBody.h"
|
||||
|
||||
#include <cpprest/json.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class JsonBody
|
||||
: public IHttpBody
|
||||
class JsonBody : public IHttpBody
|
||||
{
|
||||
public:
|
||||
JsonBody(const web::json::value &value);
|
||||
|
@ -19,8 +19,6 @@
|
||||
#ifndef TRIBUFU_MODELS_ModelBase_H_
|
||||
#define TRIBUFU_MODELS_ModelBase_H_
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/HttpContent.h"
|
||||
#include "tribufu++/MultipartFormData.h"
|
||||
|
||||
@ -31,8 +29,10 @@
|
||||
#include <set>
|
||||
#include <vector>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class ModelBase
|
||||
{
|
||||
@ -45,8 +45,10 @@ public:
|
||||
virtual web::json::value toJson() const = 0;
|
||||
virtual bool fromJson(const web::json::value &json) = 0;
|
||||
|
||||
virtual void toMultipart( std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix ) const = 0;
|
||||
virtual bool fromMultiPart( std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix ) = 0;
|
||||
virtual void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const = 0;
|
||||
virtual bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) = 0;
|
||||
|
||||
virtual bool isSet() const;
|
||||
|
||||
@ -59,12 +61,9 @@ public:
|
||||
static utility::string_t toString(const utility::datetime &val);
|
||||
static utility::string_t toString(const web::json::value &val);
|
||||
static utility::string_t toString(const std::shared_ptr<HttpContent> &val);
|
||||
template <typename T>
|
||||
static utility::string_t toString( const std::shared_ptr<T>& val );
|
||||
template <typename T>
|
||||
static utility::string_t toString( const std::vector<T> & val );
|
||||
template <typename T>
|
||||
static utility::string_t toString( const std::set<T> & val );
|
||||
template <typename T> static utility::string_t toString(const std::shared_ptr<T> &val);
|
||||
template <typename T> static utility::string_t toString(const std::vector<T> &val);
|
||||
template <typename T> static utility::string_t toString(const std::set<T> &val);
|
||||
|
||||
static web::json::value toJson(bool val);
|
||||
static web::json::value toJson(float val);
|
||||
@ -75,15 +74,11 @@ public:
|
||||
static web::json::value toJson(const utility::datetime &val);
|
||||
static web::json::value toJson(const web::json::value &val);
|
||||
static web::json::value toJson(const std::shared_ptr<HttpContent> &val);
|
||||
template<typename T>
|
||||
static web::json::value toJson( const std::shared_ptr<T>& val );
|
||||
template <typename T> static web::json::value toJson(const std::shared_ptr<T> &val);
|
||||
static web::json::value toJson(const std::shared_ptr<utility::datetime> &val);
|
||||
template<typename T>
|
||||
static web::json::value toJson( const std::vector<T>& val );
|
||||
template<typename T>
|
||||
static web::json::value toJson( const std::set<T>& val );
|
||||
template<typename T>
|
||||
static web::json::value toJson( const std::map<utility::string_t, T>& val );
|
||||
template <typename T> static web::json::value toJson(const std::vector<T> &val);
|
||||
template <typename T> static web::json::value toJson(const std::set<T> &val);
|
||||
template <typename T> static web::json::value toJson(const std::map<utility::string_t, T> &val);
|
||||
|
||||
static bool fromString(const utility::string_t &val, bool &);
|
||||
static bool fromString(const utility::string_t &val, float &);
|
||||
@ -94,13 +89,10 @@ public:
|
||||
static bool fromString(const utility::string_t &val, utility::datetime &);
|
||||
static bool fromString(const utility::string_t &val, web::json::value &);
|
||||
static bool fromString(const utility::string_t &val, std::shared_ptr<HttpContent> &);
|
||||
template<typename T>
|
||||
static bool fromString( const utility::string_t& val, std::shared_ptr<T>& );
|
||||
template <typename T> static bool fromString(const utility::string_t &val, std::shared_ptr<T> &);
|
||||
static bool fromString(const utility::string_t &val, std::shared_ptr<utility::datetime> &outVal);
|
||||
template<typename T>
|
||||
static bool fromString( const utility::string_t& val, std::vector<T> & );
|
||||
template<typename T>
|
||||
static bool fromString( const utility::string_t& val, std::set<T> & );
|
||||
template <typename T> static bool fromString(const utility::string_t &val, std::vector<T> &);
|
||||
template <typename T> static bool fromString(const utility::string_t &val, std::set<T> &);
|
||||
template <typename T>
|
||||
static bool fromString(const utility::string_t &val, std::map<utility::string_t, T> &);
|
||||
|
||||
@ -113,35 +105,57 @@ public:
|
||||
static bool fromJson(const web::json::value &val, utility::datetime &);
|
||||
static bool fromJson(const web::json::value &val, web::json::value &);
|
||||
static bool fromJson(const web::json::value &val, std::shared_ptr<HttpContent> &);
|
||||
template<typename T>
|
||||
static bool fromJson( const web::json::value& val, std::shared_ptr<T>& );
|
||||
template <typename T> static bool fromJson(const web::json::value &val, std::shared_ptr<T> &);
|
||||
static bool fromJson(const web::json::value &val, std::shared_ptr<utility::datetime> &outVal);
|
||||
template<typename T>
|
||||
static bool fromJson( const web::json::value& val, std::vector<T> & );
|
||||
template<typename T>
|
||||
static bool fromJson( const web::json::value& val, std::set<T> & );
|
||||
template<typename T>
|
||||
static bool fromJson( const web::json::value& val, std::map<utility::string_t, T> & );
|
||||
template <typename T> static bool fromJson(const web::json::value &val, std::vector<T> &);
|
||||
template <typename T> static bool fromJson(const web::json::value &val, std::set<T> &);
|
||||
template <typename T> static bool fromJson(const web::json::value &val, std::map<utility::string_t, T> &);
|
||||
|
||||
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, bool value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, double value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const web::json::value& value, const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::shared_ptr<HttpContent>& );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, bool value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, float value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, double value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, int32_t value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, int64_t value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const utility::string_t &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const utility::datetime &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const web::json::value &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(const utility::string_t &name,
|
||||
const std::shared_ptr<HttpContent> &);
|
||||
template <typename T>
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::shared_ptr<T>& , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(const utility::string_t& name, const std::shared_ptr<utility::datetime>& value , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const std::shared_ptr<T> &,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const std::shared_ptr<utility::datetime> &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
|
||||
template <typename T>
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::vector<T>& value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const std::vector<T> &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
template <typename T>
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::set<T>& value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const std::set<T> &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
template <typename T>
|
||||
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::map<utility::string_t, T>& value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
|
||||
static std::shared_ptr<HttpContent> toHttpContent(
|
||||
const utility::string_t &name, const std::map<utility::string_t, T> &value,
|
||||
const utility::string_t &contentType = utility::conversions::to_string_t(""));
|
||||
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, bool &);
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, float &);
|
||||
@ -152,24 +166,21 @@ public:
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, utility::datetime &);
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &);
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &);
|
||||
template <typename T>
|
||||
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_ptr<T>& );
|
||||
template <typename T>
|
||||
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::vector<T> & );
|
||||
template <typename T>
|
||||
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::set<T> & );
|
||||
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &);
|
||||
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::vector<T> &);
|
||||
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T> &);
|
||||
template <typename T>
|
||||
static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> &);
|
||||
|
||||
static utility::string_t toBase64(utility::string_t value);
|
||||
static utility::string_t toBase64(std::shared_ptr<std::istream> value);
|
||||
static std::shared_ptr<std::istream> fromBase64(const utility::string_t &encoded);
|
||||
|
||||
protected:
|
||||
bool m_IsSet;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
utility::string_t ModelBase::toString( const std::shared_ptr<T>& val )
|
||||
template <typename T> utility::string_t ModelBase::toString(const std::shared_ptr<T> &val)
|
||||
{
|
||||
utility::stringstream_t ss;
|
||||
if (val != nullptr)
|
||||
@ -180,8 +191,7 @@ utility::string_t ModelBase::toString( const std::shared_ptr<T>& val )
|
||||
}
|
||||
|
||||
// std::vector to string
|
||||
template<typename T>
|
||||
utility::string_t ModelBase::toString( const std::vector<T> & val )
|
||||
template <typename T> utility::string_t ModelBase::toString(const std::vector<T> &val)
|
||||
{
|
||||
utility::string_t strArray;
|
||||
for (const auto &item : val)
|
||||
@ -196,8 +206,7 @@ utility::string_t ModelBase::toString( const std::vector<T> & val )
|
||||
}
|
||||
|
||||
// std::set to string
|
||||
template<typename T>
|
||||
utility::string_t ModelBase::toString( const std::set<T> & val )
|
||||
template <typename T> utility::string_t ModelBase::toString(const std::set<T> &val)
|
||||
{
|
||||
utility::string_t strArray;
|
||||
for (const auto &item : val)
|
||||
@ -211,9 +220,7 @@ utility::string_t ModelBase::toString( const std::set<T> & val )
|
||||
return strArray;
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
web::json::value ModelBase::toJson( const std::shared_ptr<T>& val )
|
||||
template <typename T> web::json::value ModelBase::toJson(const std::shared_ptr<T> &val)
|
||||
{
|
||||
web::json::value retVal;
|
||||
if (val != nullptr)
|
||||
@ -224,8 +231,7 @@ web::json::value ModelBase::toJson( const std::shared_ptr<T>& val )
|
||||
}
|
||||
|
||||
// std::vector to json
|
||||
template<typename T>
|
||||
web::json::value ModelBase::toJson( const std::vector<T>& value )
|
||||
template <typename T> web::json::value ModelBase::toJson(const std::vector<T> &value)
|
||||
{
|
||||
std::vector<web::json::value> ret;
|
||||
for (const auto &x : value)
|
||||
@ -236,10 +242,10 @@ web::json::value ModelBase::toJson( const std::vector<T>& value )
|
||||
}
|
||||
|
||||
// std::set to json
|
||||
template<typename T>
|
||||
web::json::value ModelBase::toJson( const std::set<T>& value )
|
||||
template <typename T> web::json::value ModelBase::toJson(const std::set<T> &value)
|
||||
{
|
||||
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
|
||||
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector
|
||||
// to get an array.
|
||||
std::vector<web::json::value> ret;
|
||||
for (const auto &x : value)
|
||||
{
|
||||
@ -248,9 +254,7 @@ web::json::value ModelBase::toJson( const std::set<T>& value )
|
||||
return web::json::value::array(ret);
|
||||
}
|
||||
|
||||
|
||||
template<typename T>
|
||||
web::json::value ModelBase::toJson( const std::map<utility::string_t, T>& val )
|
||||
template <typename T> web::json::value ModelBase::toJson(const std::map<utility::string_t, T> &val)
|
||||
{
|
||||
web::json::value obj;
|
||||
for (const auto &itemkey : val)
|
||||
@ -259,8 +263,7 @@ web::json::value ModelBase::toJson( const std::map<utility::string_t, T>& val )
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& outVal )
|
||||
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::shared_ptr<T> &outVal)
|
||||
{
|
||||
bool ok = false;
|
||||
if (outVal == nullptr)
|
||||
@ -273,8 +276,7 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& ou
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromString(const utility::string_t& val, std::vector<T>& outVal )
|
||||
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::vector<T> &outVal)
|
||||
{
|
||||
bool ok = true;
|
||||
web::json::value jsonValue = web::json::value::parse(val);
|
||||
@ -295,8 +297,7 @@ bool ModelBase::fromString(const utility::string_t& val, std::vector<T>& outVal
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromString(const utility::string_t& val, std::set<T>& outVal )
|
||||
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::set<T> &outVal)
|
||||
{
|
||||
bool ok = true;
|
||||
web::json::value jsonValue = web::json::value::parse(val);
|
||||
@ -339,8 +340,7 @@ bool ModelBase::fromString(const utility::string_t& val, std::map<utility::strin
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<T> &outVal )
|
||||
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::shared_ptr<T> &outVal)
|
||||
{
|
||||
bool ok = false;
|
||||
if (outVal == nullptr)
|
||||
@ -353,8 +353,7 @@ bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<T> &outVa
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
|
||||
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::vector<T> &outVal)
|
||||
{
|
||||
bool ok = true;
|
||||
if (val.is_array())
|
||||
@ -372,8 +371,7 @@ bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
template<typename T>
|
||||
bool ModelBase::fromJson(const web::json::value& val, std::set<T>& outVal )
|
||||
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::set<T> &outVal)
|
||||
{
|
||||
bool ok = true;
|
||||
if (val.is_array())
|
||||
@ -414,7 +412,9 @@ bool ModelBase::fromJson( const web::json::value& jval, std::map<utility::string
|
||||
return ok;
|
||||
}
|
||||
template <typename T>
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& name, const std::shared_ptr<T>& value , const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const std::shared_ptr<T> &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
|
||||
if (value != nullptr)
|
||||
@ -422,49 +422,59 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& n
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(value->toJson().serialize()) ) );
|
||||
content->setData(std::make_shared<std::stringstream>(
|
||||
utility::conversions::to_utf8string(value->toJson().serialize())));
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::vector<T>& value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const std::vector<T> &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
web::json::value json_array = ModelBase::toJson(value);
|
||||
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(json_array.serialize()) ) );
|
||||
content->setData(
|
||||
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(json_array.serialize())));
|
||||
return content;
|
||||
}
|
||||
template <typename T>
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::set<T>& value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, const std::set<T> &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
web::json::value json_array = ModelBase::toJson(value);
|
||||
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(json_array.serialize()) ) );
|
||||
content->setData(
|
||||
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(json_array.serialize())));
|
||||
return content;
|
||||
}
|
||||
template <typename T>
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::map<utility::string_t, T>& value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const std::map<utility::string_t, T> &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
web::json::value jobj = ModelBase::toJson(value);
|
||||
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(jobj.serialize()) ) );
|
||||
content->setData(
|
||||
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(jobj.serialize())));
|
||||
return content;
|
||||
}
|
||||
template <typename T>
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if(val == nullptr) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
if (outVal == nullptr)
|
||||
{
|
||||
outVal = std::make_shared<T>();
|
||||
@ -472,19 +482,19 @@ bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
template <typename T>
|
||||
bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::vector<T> & outVal )
|
||||
template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::vector<T> &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if (val == nullptr) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
template <typename T>
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T>& outVal )
|
||||
template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T> &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if (val == nullptr) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
@ -492,7 +502,8 @@ template <typename T>
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if (val == nullptr) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
|
@ -19,21 +19,21 @@
|
||||
#ifndef TRIBUFU_MODELS_MultipartFormData_H_
|
||||
#define TRIBUFU_MODELS_MultipartFormData_H_
|
||||
|
||||
|
||||
#include "tribufu++/IHttpBody.h"
|
||||
#include "tribufu++/HttpContent.h"
|
||||
#include "tribufu++/IHttpBody.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class MultipartFormData
|
||||
: public IHttpBody
|
||||
class MultipartFormData : public IHttpBody
|
||||
{
|
||||
public:
|
||||
MultipartFormData();
|
||||
|
@ -19,14 +19,15 @@
|
||||
#ifndef TRIBUFU_MODELS_Object_H_
|
||||
#define TRIBUFU_MODELS_Object_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <cpprest/json.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class Object : public ModelBase
|
||||
{
|
||||
@ -41,8 +42,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Object manipulation
|
||||
|
@ -19,12 +19,10 @@
|
||||
#ifndef TRIBUFU_API_TribufuGeneratedApi_H_
|
||||
#define TRIBUFU_API_TribufuGeneratedApi_H_
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/ApiClient.h"
|
||||
|
||||
#include "tribufu++/model/Account.h"
|
||||
#include "tribufu++/AnyType.h"
|
||||
#include "tribufu++/model/Account.h"
|
||||
#include "tribufu++/model/AuthorizeRequest.h"
|
||||
#include "tribufu++/model/CryptoViewModel.h"
|
||||
#include "tribufu++/model/Game.h"
|
||||
@ -54,22 +52,21 @@
|
||||
#include "tribufu++/model/TokenResponse.h"
|
||||
#include "tribufu++/model/UpdateProfile.h"
|
||||
#include "tribufu++/model/UserInfo.h"
|
||||
#include <boost/optional.hpp>
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
using namespace tribufu::models;
|
||||
|
||||
|
||||
|
||||
class TribufuGeneratedApi
|
||||
{
|
||||
public:
|
||||
|
||||
explicit TribufuGeneratedApi(std::shared_ptr<const ApiClient> apiClient);
|
||||
|
||||
virtual ~TribufuGeneratedApi();
|
||||
@ -81,45 +78,41 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code>
|
||||
/// </remarks>
|
||||
/// <param name="authorizeRequest"> (optional)</param>
|
||||
pplx::task<void> authorize(
|
||||
boost::optional<std::shared_ptr<AuthorizeRequest>> authorizeRequest
|
||||
) const;
|
||||
pplx::task<void> authorize(boost::optional<std::shared_ptr<AuthorizeRequest>> authorizeRequest) const;
|
||||
/// <summary>
|
||||
/// Change the email of a user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code>
|
||||
/// This endpoint is not available with an api key, only with a bearer
|
||||
/// token.<br/><br/><b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.identity.user.email.update</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> changeEmail(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> changeEmail(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Change the password of a user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code>
|
||||
/// This endpoint is not available with an api key, only with a bearer
|
||||
/// token.<br/><br/><b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.identity.user.password.update</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> changePassword(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> changePassword(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Claim a game server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.community.game.server.claim</code>
|
||||
/// This endpoint is not available with an api key, only with a bearer
|
||||
/// token.<br/><br/><b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.claim</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> claimGameServer(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> claimGameServer(utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Convert a string to base64 or vice versa.
|
||||
/// </summary>
|
||||
@ -128,28 +121,25 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="cryptoViewModel"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<CryptoViewModel>> convertBase64(
|
||||
boost::optional<std::shared_ptr<CryptoViewModel>> cryptoViewModel
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<CryptoViewModel>> cryptoViewModel) const;
|
||||
/// <summary>
|
||||
/// Create a new game server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.create</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.create</code>
|
||||
/// </remarks>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> createGameServer(
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> createGameServer(boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Create a new game server cluster.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.create</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.create</code>
|
||||
/// </remarks>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> createGameServerCluster(
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> createGameServerCluster(boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Create a new group.
|
||||
/// </summary>
|
||||
@ -157,9 +147,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code>
|
||||
/// </remarks>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> createGroup(
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> createGroup(boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Create a new token with grant type.
|
||||
/// </summary>
|
||||
@ -168,28 +156,25 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="tokenRequest"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<TokenResponse>> createToken(
|
||||
boost::optional<std::shared_ptr<TokenRequest>> tokenRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<TokenRequest>> tokenRequest) const;
|
||||
/// <summary>
|
||||
/// Delete a game server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.delete</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.delete</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<void> deleteGameServer(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<void> deleteGameServer(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Delete a game server cluster.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.delete</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.delete</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<void> deleteGameServerCluster(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<void> deleteGameServerCluster(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Delete a group.
|
||||
/// </summary>
|
||||
@ -197,9 +182,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<void> deleteGroup(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<void> deleteGroup(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Generate one or more flake ids.
|
||||
/// </summary>
|
||||
@ -207,21 +190,18 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code>
|
||||
/// </remarks>
|
||||
/// <param name="amount"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<utility::string_t>> generateFlakeId(
|
||||
boost::optional<int32_t> amount
|
||||
) const;
|
||||
pplx::task<std::vector<utility::string_t>> generateFlakeId(boost::optional<int32_t> amount) const;
|
||||
/// <summary>
|
||||
/// Generate one or more flake ids from a timestamp.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.utils.generate.flake.timestamp</code>
|
||||
/// </remarks>
|
||||
/// <param name="timestamp"></param>
|
||||
/// <param name="amount"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<utility::string_t>> generateFlakeIdFromTimestamp(
|
||||
utility::string_t timestamp,
|
||||
boost::optional<int32_t> amount
|
||||
) const;
|
||||
utility::string_t timestamp, boost::optional<int32_t> amount) const;
|
||||
/// <summary>
|
||||
/// Generate a random password.
|
||||
/// </summary>
|
||||
@ -230,10 +210,8 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="length"> (optional, default to 0)</param>
|
||||
/// <param name="symbols"> (optional, default to false)</param>
|
||||
pplx::task<std::shared_ptr<HashViewModel>> generatePassword(
|
||||
boost::optional<int32_t> length,
|
||||
boost::optional<bool> symbols
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<HashViewModel>> generatePassword(boost::optional<int32_t> length,
|
||||
boost::optional<bool> symbols) const;
|
||||
/// <summary>
|
||||
/// Generate one or more uuids with a specific version.
|
||||
/// </summary>
|
||||
@ -242,26 +220,22 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="version"> (optional, default to 0)</param>
|
||||
/// <param name="amount"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<utility::string_t>> generateUuid(
|
||||
boost::optional<int32_t> version,
|
||||
boost::optional<int32_t> amount
|
||||
) const;
|
||||
pplx::task<std::vector<utility::string_t>> generateUuid(boost::optional<int32_t> version,
|
||||
boost::optional<int32_t> amount) const;
|
||||
/// <summary>
|
||||
/// Get current client information.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
pplx::task<void> getClientInfo(
|
||||
) const;
|
||||
pplx::task<void> getClientInfo() const;
|
||||
/// <summary>
|
||||
/// Get current ip address location.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.geoip.current</code>
|
||||
/// </remarks>
|
||||
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getCurrentIpAddress(
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getCurrentIpAddress() const;
|
||||
/// <summary>
|
||||
/// Get a game by id.
|
||||
/// </summary>
|
||||
@ -269,23 +243,19 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<Game>> getGameById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Game>> getGameById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of game server clusters of a game.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameClustersByGameId(
|
||||
utility::string_t id,
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
utility::string_t id, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of game items.
|
||||
/// </summary>
|
||||
@ -295,23 +265,20 @@ public:
|
||||
/// <param name="id"></param>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getGameItems(
|
||||
utility::string_t id,
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getGameItems(utility::string_t id,
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a game server by address and query port.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get.address</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.get.address</code>
|
||||
/// </remarks>
|
||||
/// <param name="address"></param>
|
||||
/// <param name="port"></param>
|
||||
pplx::task<std::shared_ptr<GameServer>> getGameServerByAddressAndQueryPort(
|
||||
utility::string_t address,
|
||||
int32_t port
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<GameServer>> getGameServerByAddressAndQueryPort(utility::string_t address,
|
||||
int32_t port) const;
|
||||
/// <summary>
|
||||
/// Get a game server by id.
|
||||
/// </summary>
|
||||
@ -319,31 +286,27 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<GameServer>> getGameServerById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<GameServer>> getGameServerById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a game server cluster by id.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.get</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<GameServerCluster>> getGameServerClusterById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<GameServerCluster>> getGameServerClusterById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of game server clusters.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameServerClusters(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of game servers.
|
||||
/// </summary>
|
||||
@ -352,24 +315,20 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServers(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServers(boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of game servers from a country.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.list.country</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.list.country</code>
|
||||
/// </remarks>
|
||||
/// <param name="country"></param>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByCountry(
|
||||
utility::string_t country,
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
utility::string_t country, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of game servers of a game.
|
||||
/// </summary>
|
||||
@ -380,34 +339,30 @@ public:
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByGameId(
|
||||
utility::string_t id,
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
utility::string_t id, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of countries with the number of game servers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.country.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.country.list</code>
|
||||
/// </remarks>
|
||||
pplx::task<std::map<utility::string_t, int32_t>> getGameServersCountries(
|
||||
) const;
|
||||
pplx::task<std::map<utility::string_t, int32_t>> getGameServersCountries() const;
|
||||
/// <summary>
|
||||
/// Get metrics about the tracked game servers.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.metric.get</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.metric.get</code>
|
||||
/// </remarks>
|
||||
pplx::task<std::shared_ptr<ServerMetrics>> getGameServersMetrics(
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<ServerMetrics>> getGameServersMetrics() const;
|
||||
/// <summary>
|
||||
/// Get a list of games.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.list</code>
|
||||
/// </remarks>
|
||||
pplx::task<std::vector<std::shared_ptr<Game>>> getGames(
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<Game>>> getGames() const;
|
||||
/// <summary>
|
||||
/// Get a group by id.
|
||||
/// </summary>
|
||||
@ -415,9 +370,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<Group>> getGroupById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Group>> getGroupById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a group by tag.
|
||||
/// </summary>
|
||||
@ -425,9 +378,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code>
|
||||
/// </remarks>
|
||||
/// <param name="tag"></param>
|
||||
pplx::task<std::shared_ptr<Group>> getGroupByTag(
|
||||
utility::string_t tag
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Group>> getGroupByTag(utility::string_t tag) const;
|
||||
/// <summary>
|
||||
/// Get a group by uuid.
|
||||
/// </summary>
|
||||
@ -435,9 +386,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code>
|
||||
/// </remarks>
|
||||
/// <param name="uuid"></param>
|
||||
pplx::task<std::shared_ptr<Group>> getGroupByUuid(
|
||||
utility::string_t uuid
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Group>> getGroupByUuid(utility::string_t uuid) const;
|
||||
/// <summary>
|
||||
/// Get a list of games of a group.
|
||||
/// </summary>
|
||||
@ -445,9 +394,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<GroupGame>>> getGroupGames(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<GroupGame>>> getGroupGames(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of members in a group.
|
||||
/// </summary>
|
||||
@ -455,9 +402,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<GroupMember>>> getGroupMembers(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<GroupMember>>> getGroupMembers(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of groups.
|
||||
/// </summary>
|
||||
@ -466,10 +411,8 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<Group>>> getGroups(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<Group>>> getGroups(boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a ip address location.
|
||||
/// </summary>
|
||||
@ -477,9 +420,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="address"></param>
|
||||
pplx::task<std::shared_ptr<IpAddress>> getIpAddress(
|
||||
utility::string_t address
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<IpAddress>> getIpAddress(utility::string_t address) const;
|
||||
/// <summary>
|
||||
/// Get a list of ip addresses.
|
||||
/// </summary>
|
||||
@ -488,10 +429,8 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getIpAddresses(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getIpAddresses(boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get the top 20 leaderboard users.
|
||||
/// </summary>
|
||||
@ -500,16 +439,14 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="order"> (optional, default to new LeaderboardOrder())</param>
|
||||
pplx::task<std::vector<std::shared_ptr<LeaderboardItem>>> getLeaderboard(
|
||||
boost::optional<std::shared_ptr<LeaderboardOrder>> order
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<LeaderboardOrder>> order) const;
|
||||
/// <summary>
|
||||
/// Get current user information.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
pplx::task<std::shared_ptr<UserInfo>> getMe(
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<UserInfo>> getMe() const;
|
||||
/// <summary>
|
||||
/// Get a package by id.
|
||||
/// </summary>
|
||||
@ -517,9 +454,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<Package>> getPackageById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Package>> getPackageById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of packages.
|
||||
/// </summary>
|
||||
@ -528,18 +463,15 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<Package>>> getPackages(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<Package>>> getPackages(boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get the public keys for the client.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.keys</code>
|
||||
/// </remarks>
|
||||
pplx::task<void> getPublicKeys(
|
||||
) const;
|
||||
pplx::task<void> getPublicKeys() const;
|
||||
/// <summary>
|
||||
/// Get a subscription by id.
|
||||
/// </summary>
|
||||
@ -547,9 +479,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.store.subscription.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<Subscription>> getSubscriptionById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Subscription>> getSubscriptionById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of subscriptions.
|
||||
/// </summary>
|
||||
@ -559,9 +489,7 @@ public:
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<Subscription>>> getSubscriptions(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of connected accounts of the user.
|
||||
/// </summary>
|
||||
@ -569,9 +497,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<Account>>> getUserAccounts(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<Account>>> getUserAccounts(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a user profile by id.
|
||||
/// </summary>
|
||||
@ -579,9 +505,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::shared_ptr<Profile>> getUserById(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Profile>> getUserById(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a user profile by name.
|
||||
/// </summary>
|
||||
@ -589,9 +513,7 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code>
|
||||
/// </remarks>
|
||||
/// <param name="name"></param>
|
||||
pplx::task<std::shared_ptr<Profile>> getUserByName(
|
||||
utility::string_t name
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Profile>> getUserByName(utility::string_t name) const;
|
||||
/// <summary>
|
||||
/// Get a user profile by uuid.
|
||||
/// </summary>
|
||||
@ -599,19 +521,16 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code>
|
||||
/// </remarks>
|
||||
/// <param name="uuid"></param>
|
||||
pplx::task<std::shared_ptr<Profile>> getUserByUuid(
|
||||
utility::string_t uuid
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<Profile>> getUserByUuid(utility::string_t uuid) const;
|
||||
/// <summary>
|
||||
/// Get a list of friends of the user.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.profile.friend.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserFriends(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserFriends(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of games the user has played.
|
||||
/// </summary>
|
||||
@ -619,51 +538,45 @@ public:
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<ProfileGame>>> getUserGames(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<ProfileGame>>> getUserGames(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of groups the user is a member of.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.profile.group.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<ProfileGroup>>> getUserGroups(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<ProfileGroup>>> getUserGroups(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get current user information.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code>
|
||||
/// </remarks>
|
||||
pplx::task<std::shared_ptr<UserInfo>> getUserInfo(
|
||||
) const;
|
||||
pplx::task<std::shared_ptr<UserInfo>> getUserInfo() const;
|
||||
/// <summary>
|
||||
/// Get a list of punishments the user has received.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.punishment.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.profile.punishment.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserPunishments(
|
||||
utility::string_t id
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserPunishments(utility::string_t id) const;
|
||||
/// <summary>
|
||||
/// Get a list of servers the user is owner of.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.profile.game.server.list</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getUserServers(
|
||||
utility::string_t id,
|
||||
pplx::task<std::vector<std::shared_ptr<GameServer>>> getUserServers(utility::string_t id,
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Get a list of user profiles.
|
||||
/// </summary>
|
||||
@ -672,10 +585,8 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="page"> (optional, default to 0)</param>
|
||||
/// <param name="limit"> (optional, default to 0)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<Profile>>> getUsers(
|
||||
boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit
|
||||
) const;
|
||||
pplx::task<std::vector<std::shared_ptr<Profile>>> getUsers(boost::optional<int32_t> page,
|
||||
boost::optional<int32_t> limit) const;
|
||||
/// <summary>
|
||||
/// Hash a string using argon2.
|
||||
/// </summary>
|
||||
@ -684,8 +595,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="hashViewModel"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<HashViewModel>> hashArgon2(
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
|
||||
/// <summary>
|
||||
/// Hash a string using bcrypt.
|
||||
/// </summary>
|
||||
@ -694,8 +604,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="hashViewModel"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<HashViewModel>> hashBcrypt(
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
|
||||
/// <summary>
|
||||
/// Hash a string using md5.
|
||||
/// </summary>
|
||||
@ -704,8 +613,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="hashViewModel"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<HashViewModel>> hashMd5(
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
|
||||
/// <summary>
|
||||
/// Hash a string using sha256.
|
||||
/// </summary>
|
||||
@ -714,18 +622,17 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="hashViewModel"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<HashViewModel>> hashSha256(
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
|
||||
/// <summary>
|
||||
/// Introspect a token.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.introspect</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.identity.oauth2.token.introspect</code>
|
||||
/// </remarks>
|
||||
/// <param name="introspectRequest"> (optional)</param>
|
||||
pplx::task<void> introspectToken(
|
||||
boost::optional<std::shared_ptr<IntrospectRequest>> introspectRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<IntrospectRequest>> introspectRequest) const;
|
||||
/// <summary>
|
||||
/// Login with name or email and password.
|
||||
/// </summary>
|
||||
@ -734,16 +641,14 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="loginRequest"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<LoginResponse>> login(
|
||||
boost::optional<std::shared_ptr<LoginRequest>> loginRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<LoginRequest>> loginRequest) const;
|
||||
/// <summary>
|
||||
/// Invalidate credentials.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.token.revoke</code>
|
||||
/// </remarks>
|
||||
pplx::task<void> logout(
|
||||
) const;
|
||||
pplx::task<void> logout() const;
|
||||
/// <summary>
|
||||
/// Create a new user.
|
||||
/// </summary>
|
||||
@ -752,8 +657,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="registerRequest"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<LoginResponse>> r_register(
|
||||
boost::optional<std::shared_ptr<RegisterRequest>> registerRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<RegisterRequest>> registerRequest) const;
|
||||
/// <summary>
|
||||
/// Refresh credentials.
|
||||
/// </summary>
|
||||
@ -762,18 +666,16 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="refreshRequest"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<LoginResponse>> refresh(
|
||||
boost::optional<std::shared_ptr<RefreshRequest>> refreshRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<RefreshRequest>> refreshRequest) const;
|
||||
/// <summary>
|
||||
/// Revoke a token.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.token.revoke</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.identity.oauth2.token.revoke</code>
|
||||
/// </remarks>
|
||||
/// <param name="revokeRequest"> (optional)</param>
|
||||
pplx::task<void> revokeToken(
|
||||
boost::optional<std::shared_ptr<RevokeRequest>> revokeRequest
|
||||
) const;
|
||||
pplx::task<void> revokeToken(boost::optional<std::shared_ptr<RevokeRequest>> revokeRequest) const;
|
||||
/// <summary>
|
||||
/// Advanced search for servers or players.
|
||||
/// </summary>
|
||||
@ -782,32 +684,29 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="searchRequest"> (optional)</param>
|
||||
pplx::task<std::vector<std::shared_ptr<AnyType>>> search(
|
||||
boost::optional<std::shared_ptr<SearchRequest>> searchRequest
|
||||
) const;
|
||||
boost::optional<std::shared_ptr<SearchRequest>> searchRequest) const;
|
||||
/// <summary>
|
||||
/// Update a game server.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.update</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.update</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> updateGameServer(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> updateGameServer(utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Update a game server cluster.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <b>🔒 Required permissions:</b> <code>tribufu.community.game.server.cluster.update</code>
|
||||
/// <b>🔒 Required permissions:</b>
|
||||
/// <code>tribufu.community.game.server.cluster.update</code>
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> updateGameServerCluster(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> updateGameServerCluster(utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Update a group.
|
||||
/// </summary>
|
||||
@ -816,10 +715,7 @@ public:
|
||||
/// </remarks>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="body"> (optional)</param>
|
||||
pplx::task<void> updateGroup(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<AnyType>> body
|
||||
) const;
|
||||
pplx::task<void> updateGroup(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
|
||||
/// <summary>
|
||||
/// Update a user profile.
|
||||
/// </summary>
|
||||
@ -829,9 +725,7 @@ public:
|
||||
/// <param name="id"></param>
|
||||
/// <param name="updateProfile"> (optional)</param>
|
||||
pplx::task<std::shared_ptr<Profile>> updateUserProfile(
|
||||
utility::string_t id,
|
||||
boost::optional<std::shared_ptr<UpdateProfile>> updateProfile
|
||||
) const;
|
||||
utility::string_t id, boost::optional<std::shared_ptr<UpdateProfile>> updateProfile) const;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<const ApiClient> m_ApiClient;
|
||||
@ -841,4 +735,3 @@ protected:
|
||||
}
|
||||
|
||||
#endif /* TRIBUFU_API_TribufuGeneratedApi_H_ */
|
||||
|
||||
|
@ -23,17 +23,16 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/AnyType.h"
|
||||
#include "tribufu++/model/LoginProvider.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Account
|
||||
: public ModelBase
|
||||
class Account : public ModelBase
|
||||
{
|
||||
public:
|
||||
Account();
|
||||
@ -47,14 +46,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Account members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -95,7 +94,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -120,10 +118,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/ApplicationType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Application
|
||||
: public ModelBase
|
||||
class Application : public ModelBase
|
||||
{
|
||||
public:
|
||||
Application();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Application members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -154,7 +153,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -215,10 +213,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_ApplicationType_H_
|
||||
#define TRIBUFU_MODELS_ApplicationType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class ApplicationType
|
||||
: public ModelBase
|
||||
class ApplicationType : public ModelBase
|
||||
{
|
||||
public:
|
||||
ApplicationType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eApplicationType
|
||||
{
|
||||
|
@ -23,17 +23,16 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include "tribufu++/model/CodeChallengeMethod.h"
|
||||
#include "tribufu++/model/ResponseType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/CodeChallengeMethod.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class AuthorizeRequest
|
||||
: public ModelBase
|
||||
class AuthorizeRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
AuthorizeRequest();
|
||||
@ -47,14 +46,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// AuthorizeRequest members
|
||||
|
||||
|
||||
std::shared_ptr<ResponseType> getResponseType() const;
|
||||
bool responseTypeIsSet() const;
|
||||
void unsetResponse_type();
|
||||
@ -90,7 +89,6 @@ public:
|
||||
void unsetState();
|
||||
void setState(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
std::shared_ptr<ResponseType> m_Response_type;
|
||||
bool m_Response_typeIsSet;
|
||||
@ -112,10 +110,8 @@ protected:
|
||||
|
||||
utility::string_t m_State;
|
||||
bool m_StateIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_CodeChallengeMethod_H_
|
||||
#define TRIBUFU_MODELS_CodeChallengeMethod_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class CodeChallengeMethod
|
||||
: public ModelBase
|
||||
class CodeChallengeMethod : public ModelBase
|
||||
{
|
||||
public:
|
||||
CodeChallengeMethod();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eCodeChallengeMethod
|
||||
{
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_CryptoViewModel_H_
|
||||
#define TRIBUFU_MODELS_CryptoViewModel_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class CryptoViewModel
|
||||
: public ModelBase
|
||||
class CryptoViewModel : public ModelBase
|
||||
{
|
||||
public:
|
||||
CryptoViewModel();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// CryptoViewModel members
|
||||
|
||||
|
||||
utility::string_t getEncoded() const;
|
||||
bool encodedIsSet() const;
|
||||
void unsetEncoded();
|
||||
@ -62,17 +60,14 @@ public:
|
||||
void unsetDecoded();
|
||||
void setDecoded(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Encoded;
|
||||
bool m_EncodedIsSet;
|
||||
|
||||
utility::string_t m_Decoded;
|
||||
bool m_DecodedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/ApplicationType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Game
|
||||
: public ModelBase
|
||||
class Game : public ModelBase
|
||||
{
|
||||
public:
|
||||
Game();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Game members
|
||||
|
||||
|
||||
int32_t getGamePort() const;
|
||||
bool gamePortIsSet() const;
|
||||
void unsetGame_port();
|
||||
@ -209,7 +208,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
int32_t m_Game_port;
|
||||
bool m_Game_portIsSet;
|
||||
@ -303,10 +301,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/ServerStatus.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class GameServer
|
||||
: public ModelBase
|
||||
class GameServer : public ModelBase
|
||||
{
|
||||
public:
|
||||
GameServer();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// GameServer members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -209,7 +208,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -303,10 +301,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_GameServerCluster_H_
|
||||
#define TRIBUFU_MODELS_GameServerCluster_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class GameServerCluster
|
||||
: public ModelBase
|
||||
class GameServerCluster : public ModelBase
|
||||
{
|
||||
public:
|
||||
GameServerCluster();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// GameServerCluster members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -122,7 +120,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -165,10 +162,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_GrantType_H_
|
||||
#define TRIBUFU_MODELS_GrantType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class GrantType
|
||||
: public ModelBase
|
||||
class GrantType : public ModelBase
|
||||
{
|
||||
public:
|
||||
GrantType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eGrantType
|
||||
{
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_Group_H_
|
||||
#define TRIBUFU_MODELS_Group_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Group
|
||||
: public ModelBase
|
||||
class Group : public ModelBase
|
||||
{
|
||||
public:
|
||||
Group();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Group members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -132,7 +130,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -181,10 +178,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,23 +19,22 @@
|
||||
#ifndef TRIBUFU_MODELS_GroupGame_H_
|
||||
#define TRIBUFU_MODELS_GroupGame_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include "tribufu++/model/Application.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/Group.h"
|
||||
#include "tribufu++/AnyType.h"
|
||||
#include "tribufu++/model/Application.h"
|
||||
#include "tribufu++/model/Group.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class Group;
|
||||
class Application;
|
||||
|
||||
|
||||
class GroupGame
|
||||
: public ModelBase
|
||||
class GroupGame : public ModelBase
|
||||
{
|
||||
public:
|
||||
GroupGame();
|
||||
@ -49,14 +48,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// GroupGame members
|
||||
|
||||
|
||||
utility::string_t getGroupId() const;
|
||||
bool groupIdIsSet() const;
|
||||
void unsetGroup_id();
|
||||
@ -92,7 +91,6 @@ public:
|
||||
void unsetLast_used();
|
||||
void setLastUsed(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Group_id;
|
||||
bool m_Group_idIsSet;
|
||||
@ -114,10 +112,8 @@ protected:
|
||||
|
||||
utility::datetime m_Last_used;
|
||||
bool m_Last_usedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/GroupRank.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class GroupMember
|
||||
: public ModelBase
|
||||
class GroupMember : public ModelBase
|
||||
{
|
||||
public:
|
||||
GroupMember();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// GroupMember members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -99,7 +98,6 @@ public:
|
||||
void unsetSince();
|
||||
void setSince(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -127,10 +125,8 @@ protected:
|
||||
|
||||
utility::datetime m_Since;
|
||||
bool m_SinceIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_GroupRank_H_
|
||||
#define TRIBUFU_MODELS_GroupRank_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class GroupRank
|
||||
: public ModelBase
|
||||
class GroupRank : public ModelBase
|
||||
{
|
||||
public:
|
||||
GroupRank();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eGroupRank
|
||||
{
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_HashViewModel_H_
|
||||
#define TRIBUFU_MODELS_HashViewModel_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class HashViewModel
|
||||
: public ModelBase
|
||||
class HashViewModel : public ModelBase
|
||||
{
|
||||
public:
|
||||
HashViewModel();
|
||||
@ -44,27 +42,24 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// HashViewModel members
|
||||
|
||||
|
||||
utility::string_t getValue() const;
|
||||
bool valueIsSet() const;
|
||||
void unsetValue();
|
||||
void setValue(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Value;
|
||||
bool m_ValueIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/TokenHintType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class IntrospectRequest
|
||||
: public ModelBase
|
||||
class IntrospectRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
IntrospectRequest();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// IntrospectRequest members
|
||||
|
||||
|
||||
utility::string_t getToken() const;
|
||||
bool tokenIsSet() const;
|
||||
void unsetToken();
|
||||
@ -64,17 +63,14 @@ public:
|
||||
void unsetToken_type_hint();
|
||||
void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Token;
|
||||
bool m_TokenIsSet;
|
||||
|
||||
std::shared_ptr<TokenHintType> m_Token_type_hint;
|
||||
bool m_Token_type_hintIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_IpAddress_H_
|
||||
#define TRIBUFU_MODELS_IpAddress_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class IpAddress
|
||||
: public ModelBase
|
||||
class IpAddress : public ModelBase
|
||||
{
|
||||
public:
|
||||
IpAddress();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// IpAddress members
|
||||
|
||||
|
||||
utility::string_t getAddress() const;
|
||||
bool addressIsSet() const;
|
||||
void unsetAddress();
|
||||
@ -142,7 +140,6 @@ public:
|
||||
void unsetLongitude();
|
||||
void setLongitude(float value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Address;
|
||||
bool m_AddressIsSet;
|
||||
@ -197,10 +194,8 @@ protected:
|
||||
|
||||
float m_Longitude;
|
||||
bool m_LongitudeIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_LeaderboardItem_H_
|
||||
#define TRIBUFU_MODELS_LeaderboardItem_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class LeaderboardItem
|
||||
: public ModelBase
|
||||
class LeaderboardItem : public ModelBase
|
||||
{
|
||||
public:
|
||||
LeaderboardItem();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// LeaderboardItem members
|
||||
|
||||
|
||||
utility::string_t getName() const;
|
||||
bool nameIsSet() const;
|
||||
void unsetName();
|
||||
@ -82,7 +80,6 @@ public:
|
||||
void unsetPoints();
|
||||
void setPoints(double value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Name;
|
||||
bool m_NameIsSet;
|
||||
@ -101,10 +98,8 @@ protected:
|
||||
|
||||
double m_Points;
|
||||
bool m_PointsIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_LeaderboardOrder_H_
|
||||
#define TRIBUFU_MODELS_LeaderboardOrder_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class LeaderboardOrder
|
||||
: public ModelBase
|
||||
class LeaderboardOrder : public ModelBase
|
||||
{
|
||||
public:
|
||||
LeaderboardOrder();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eLeaderboardOrder
|
||||
{
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_LoginProvider_H_
|
||||
#define TRIBUFU_MODELS_LoginProvider_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class LoginProvider
|
||||
: public ModelBase
|
||||
class LoginProvider : public ModelBase
|
||||
{
|
||||
public:
|
||||
LoginProvider();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eLoginProvider
|
||||
{
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_LoginRequest_H_
|
||||
#define TRIBUFU_MODELS_LoginRequest_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class LoginRequest
|
||||
: public ModelBase
|
||||
class LoginRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
LoginRequest();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// LoginRequest members
|
||||
|
||||
|
||||
utility::string_t getLogin() const;
|
||||
bool loginIsSet() const;
|
||||
void unsetLogin();
|
||||
@ -62,17 +60,14 @@ public:
|
||||
void unsetPassword();
|
||||
void setPassword(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Login;
|
||||
bool m_LoginIsSet;
|
||||
|
||||
utility::string_t m_Password;
|
||||
bool m_PasswordIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,20 +19,19 @@
|
||||
#ifndef TRIBUFU_MODELS_LoginResponse_H_
|
||||
#define TRIBUFU_MODELS_LoginResponse_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include "tribufu++/model/UserInfo.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
class UserInfo;
|
||||
|
||||
|
||||
class LoginResponse
|
||||
: public ModelBase
|
||||
class LoginResponse : public ModelBase
|
||||
{
|
||||
public:
|
||||
LoginResponse();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// LoginResponse members
|
||||
|
||||
|
||||
std::shared_ptr<UserInfo> getUser() const;
|
||||
bool userIsSet() const;
|
||||
void unsetUser();
|
||||
@ -74,7 +73,6 @@ public:
|
||||
void unsetExpires_in();
|
||||
void setExpiresIn(int64_t value);
|
||||
|
||||
|
||||
protected:
|
||||
std::shared_ptr<UserInfo> m_User;
|
||||
bool m_UserIsSet;
|
||||
@ -87,10 +85,8 @@ protected:
|
||||
|
||||
int64_t m_Expires_in;
|
||||
bool m_Expires_inIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_Package_H_
|
||||
#define TRIBUFU_MODELS_Package_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Package
|
||||
: public ModelBase
|
||||
class Package : public ModelBase
|
||||
{
|
||||
public:
|
||||
Package();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Package members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -112,7 +110,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -149,10 +146,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_Profile_H_
|
||||
#define TRIBUFU_MODELS_Profile_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Profile
|
||||
: public ModelBase
|
||||
class Profile : public ModelBase
|
||||
{
|
||||
public:
|
||||
Profile();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Profile members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -142,7 +140,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -197,10 +194,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,19 +19,17 @@
|
||||
#ifndef TRIBUFU_MODELS_ProfileGame_H_
|
||||
#define TRIBUFU_MODELS_ProfileGame_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/AnyType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class ProfileGame
|
||||
: public ModelBase
|
||||
class ProfileGame : public ModelBase
|
||||
{
|
||||
public:
|
||||
ProfileGame();
|
||||
@ -45,14 +43,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// ProfileGame members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -108,7 +106,6 @@ public:
|
||||
void unsetLast_used();
|
||||
void setLastUsed(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -142,10 +139,8 @@ protected:
|
||||
|
||||
utility::datetime m_Last_used;
|
||||
bool m_Last_usedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/GroupRank.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class ProfileGroup
|
||||
: public ModelBase
|
||||
class ProfileGroup : public ModelBase
|
||||
{
|
||||
public:
|
||||
ProfileGroup();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// ProfileGroup members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -104,7 +103,6 @@ public:
|
||||
void unsetSince();
|
||||
void setSince(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -135,10 +133,8 @@ protected:
|
||||
|
||||
utility::datetime m_Since;
|
||||
bool m_SinceIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_RefreshRequest_H_
|
||||
#define TRIBUFU_MODELS_RefreshRequest_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class RefreshRequest
|
||||
: public ModelBase
|
||||
class RefreshRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
RefreshRequest();
|
||||
@ -44,27 +42,24 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// RefreshRequest members
|
||||
|
||||
|
||||
utility::string_t getRefreshToken() const;
|
||||
bool refreshTokenIsSet() const;
|
||||
void unsetRefresh_token();
|
||||
void setRefreshToken(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Refresh_token;
|
||||
bool m_Refresh_tokenIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_RegisterRequest_H_
|
||||
#define TRIBUFU_MODELS_RegisterRequest_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class RegisterRequest
|
||||
: public ModelBase
|
||||
class RegisterRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
RegisterRequest();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// RegisterRequest members
|
||||
|
||||
|
||||
utility::string_t getUuid() const;
|
||||
bool uuidIsSet() const;
|
||||
void unsetUuid();
|
||||
@ -72,7 +70,6 @@ public:
|
||||
void unsetPassword();
|
||||
void setPassword(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Uuid;
|
||||
bool m_UuidIsSet;
|
||||
@ -85,10 +82,8 @@ protected:
|
||||
|
||||
utility::string_t m_Password;
|
||||
bool m_PasswordIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_ResponseType_H_
|
||||
#define TRIBUFU_MODELS_ResponseType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class ResponseType
|
||||
: public ModelBase
|
||||
class ResponseType : public ModelBase
|
||||
{
|
||||
public:
|
||||
ResponseType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eResponseType
|
||||
{
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/TokenHintType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class RevokeRequest
|
||||
: public ModelBase
|
||||
class RevokeRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
RevokeRequest();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// RevokeRequest members
|
||||
|
||||
|
||||
utility::string_t getToken() const;
|
||||
bool tokenIsSet() const;
|
||||
void unsetToken();
|
||||
@ -64,17 +63,14 @@ public:
|
||||
void unsetToken_type_hint();
|
||||
void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Token;
|
||||
bool m_TokenIsSet;
|
||||
|
||||
std::shared_ptr<TokenHintType> m_Token_type_hint;
|
||||
bool m_Token_type_hintIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,12 @@
|
||||
#include "tribufu++/model/SearchType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class SearchRequest
|
||||
: public ModelBase
|
||||
class SearchRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
SearchRequest();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// SearchRequest members
|
||||
|
||||
|
||||
std::shared_ptr<SearchType> getType() const;
|
||||
bool typeIsSet() const;
|
||||
void unsetType();
|
||||
@ -74,7 +73,6 @@ public:
|
||||
void unsetGame_id();
|
||||
void setGameId(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
std::shared_ptr<SearchType> m_Type;
|
||||
bool m_TypeIsSet;
|
||||
@ -87,10 +85,8 @@ protected:
|
||||
|
||||
utility::string_t m_Game_id;
|
||||
bool m_Game_idIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_SearchType_H_
|
||||
#define TRIBUFU_MODELS_SearchType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class SearchType
|
||||
: public ModelBase
|
||||
class SearchType : public ModelBase
|
||||
{
|
||||
public:
|
||||
SearchType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eSearchType
|
||||
{
|
||||
|
@ -19,17 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_ServerMetrics_H_
|
||||
#define TRIBUFU_MODELS_ServerMetrics_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
|
||||
class ServerMetrics
|
||||
: public ModelBase
|
||||
class ServerMetrics : public ModelBase
|
||||
{
|
||||
public:
|
||||
ServerMetrics();
|
||||
@ -43,14 +40,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// ServerMetrics members
|
||||
|
||||
|
||||
int32_t getServerCount() const;
|
||||
bool serverCountIsSet() const;
|
||||
void unsetServer_count();
|
||||
@ -66,7 +63,6 @@ public:
|
||||
void unsetCountry_count();
|
||||
void setCountryCount(int32_t value);
|
||||
|
||||
|
||||
protected:
|
||||
int32_t m_Server_count;
|
||||
bool m_Server_countIsSet;
|
||||
@ -76,10 +72,8 @@ protected:
|
||||
|
||||
int32_t m_Country_count;
|
||||
bool m_Country_countIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_ServerStatus_H_
|
||||
#define TRIBUFU_MODELS_ServerStatus_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class ServerStatus
|
||||
: public ModelBase
|
||||
class ServerStatus : public ModelBase
|
||||
{
|
||||
public:
|
||||
ServerStatus();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eServerStatus
|
||||
{
|
||||
|
@ -19,19 +19,17 @@
|
||||
#ifndef TRIBUFU_MODELS_Subscription_H_
|
||||
#define TRIBUFU_MODELS_Subscription_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include <map>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class Subscription
|
||||
: public ModelBase
|
||||
class Subscription : public ModelBase
|
||||
{
|
||||
public:
|
||||
Subscription();
|
||||
@ -45,14 +43,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// Subscription members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -88,7 +86,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -110,10 +107,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_TokenHintType_H_
|
||||
#define TRIBUFU_MODELS_TokenHintType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class TokenHintType
|
||||
: public ModelBase
|
||||
class TokenHintType : public ModelBase
|
||||
{
|
||||
public:
|
||||
TokenHintType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eTokenHintType
|
||||
{
|
||||
|
@ -23,16 +23,15 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
#include "tribufu++/model/GrantType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class TokenRequest
|
||||
: public ModelBase
|
||||
class TokenRequest : public ModelBase
|
||||
{
|
||||
public:
|
||||
TokenRequest();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// TokenRequest members
|
||||
|
||||
|
||||
std::shared_ptr<GrantType> getGrantType() const;
|
||||
bool grantTypeIsSet() const;
|
||||
void unsetGrant_type();
|
||||
@ -94,7 +93,6 @@ public:
|
||||
void unsetCode_verifier();
|
||||
void setCodeVerifier(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
std::shared_ptr<GrantType> m_Grant_type;
|
||||
bool m_Grant_typeIsSet;
|
||||
@ -119,10 +117,8 @@ protected:
|
||||
|
||||
utility::string_t m_Code_verifier;
|
||||
bool m_Code_verifierIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,12 @@
|
||||
#include "tribufu++/model/TokenType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class TokenResponse
|
||||
: public ModelBase
|
||||
class TokenResponse : public ModelBase
|
||||
{
|
||||
public:
|
||||
TokenResponse();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// TokenResponse members
|
||||
|
||||
|
||||
std::shared_ptr<TokenType> getTokenType() const;
|
||||
bool tokenTypeIsSet() const;
|
||||
void unsetToken_type();
|
||||
@ -84,7 +83,6 @@ public:
|
||||
void unsetExpires_in();
|
||||
void setExpiresIn(int64_t value);
|
||||
|
||||
|
||||
protected:
|
||||
std::shared_ptr<TokenType> m_Token_type;
|
||||
bool m_Token_typeIsSet;
|
||||
@ -103,10 +101,8 @@ protected:
|
||||
|
||||
int64_t m_Expires_in;
|
||||
bool m_Expires_inIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_TokenType_H_
|
||||
#define TRIBUFU_MODELS_TokenType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class TokenType
|
||||
: public ModelBase
|
||||
class TokenType : public ModelBase
|
||||
{
|
||||
public:
|
||||
TokenType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eTokenType
|
||||
{
|
||||
|
@ -19,18 +19,16 @@
|
||||
#ifndef TRIBUFU_MODELS_UpdateProfile_H_
|
||||
#define TRIBUFU_MODELS_UpdateProfile_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class UpdateProfile
|
||||
: public ModelBase
|
||||
class UpdateProfile : public ModelBase
|
||||
{
|
||||
public:
|
||||
UpdateProfile();
|
||||
@ -44,14 +42,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// UpdateProfile members
|
||||
|
||||
|
||||
utility::string_t getDisplayName() const;
|
||||
bool displayNameIsSet() const;
|
||||
void unsetDisplay_name();
|
||||
@ -62,17 +60,14 @@ public:
|
||||
void unsetBiography();
|
||||
void setBiography(const utility::string_t &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Display_name;
|
||||
bool m_Display_nameIsSet;
|
||||
|
||||
utility::string_t m_Biography;
|
||||
bool m_BiographyIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -26,13 +26,12 @@
|
||||
#include "tribufu++/model/UserType.h"
|
||||
#include <cpprest/details/basic_types.h>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
|
||||
|
||||
class UserInfo
|
||||
: public ModelBase
|
||||
class UserInfo : public ModelBase
|
||||
{
|
||||
public:
|
||||
UserInfo();
|
||||
@ -46,14 +45,14 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
/////////////////////////////////////////////
|
||||
/// UserInfo members
|
||||
|
||||
|
||||
utility::string_t getId() const;
|
||||
bool idIsSet() const;
|
||||
void unsetId();
|
||||
@ -179,7 +178,6 @@ public:
|
||||
void unsetUpdated();
|
||||
void setUpdated(const utility::datetime &value);
|
||||
|
||||
|
||||
protected:
|
||||
utility::string_t m_Id;
|
||||
bool m_IdIsSet;
|
||||
@ -255,10 +253,8 @@ protected:
|
||||
|
||||
utility::datetime m_Updated;
|
||||
bool m_UpdatedIsSet;
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,16 +19,14 @@
|
||||
#ifndef TRIBUFU_MODELS_UserType_H_
|
||||
#define TRIBUFU_MODELS_UserType_H_
|
||||
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
|
||||
|
||||
class UserType
|
||||
: public ModelBase
|
||||
class UserType : public ModelBase
|
||||
{
|
||||
public:
|
||||
UserType();
|
||||
@ -42,8 +40,10 @@ public:
|
||||
web::json::value toJson() const override;
|
||||
bool fromJson(const web::json::value &json) override;
|
||||
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
||||
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) const override;
|
||||
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &namePrefix) override;
|
||||
|
||||
enum class eUserType
|
||||
{
|
||||
|
@ -1,9 +1,12 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
$env:CPP_POST_PROCESS_FILE = "clang-format -i"
|
||||
|
||||
java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate `
|
||||
-i https://api.tribufu.com/openapi.json `
|
||||
-g cpp-restsdk `
|
||||
-o . `
|
||||
--enable-post-process-file `
|
||||
--global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false `
|
||||
--additional-properties=packageName=tribufu++,apiPackage=tribufu.api,modelPackage=tribufu.models `
|
||||
--openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated `
|
||||
|
@ -12,34 +12,49 @@
|
||||
|
||||
#include "tribufu++/AnyType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
AnyType::AnyType() { m_value = web::json::value::null(); }
|
||||
AnyType::AnyType()
|
||||
{
|
||||
m_value = web::json::value::null();
|
||||
}
|
||||
|
||||
AnyType::~AnyType() {}
|
||||
AnyType::~AnyType()
|
||||
{
|
||||
}
|
||||
|
||||
void AnyType::validate() {}
|
||||
void AnyType::validate()
|
||||
{
|
||||
}
|
||||
|
||||
web::json::value AnyType::toJson() const { return m_value; }
|
||||
web::json::value AnyType::toJson() const
|
||||
{
|
||||
return m_value;
|
||||
}
|
||||
|
||||
bool AnyType::fromJson(const web::json::value &val) {
|
||||
bool AnyType::fromJson(const web::json::value &val)
|
||||
{
|
||||
m_value = val;
|
||||
m_IsSet = true;
|
||||
return isSet();
|
||||
}
|
||||
|
||||
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const {
|
||||
if (m_value.is_object()) {
|
||||
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
if (m_value.is_object())
|
||||
{
|
||||
return Object::toMultipart(multipart, prefix);
|
||||
}
|
||||
throw std::runtime_error("AnyType::toMultipart: unsupported type");
|
||||
}
|
||||
|
||||
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) {
|
||||
if (m_value.is_object()) {
|
||||
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
|
||||
{
|
||||
if (m_value.is_object())
|
||||
{
|
||||
return Object::fromMultiPart(multipart, prefix);
|
||||
}
|
||||
return false;
|
||||
|
@ -11,39 +11,41 @@
|
||||
*/
|
||||
|
||||
#include "tribufu++/ApiClient.h"
|
||||
#include "tribufu++/MultipartFormData.h"
|
||||
#include "tribufu++/ModelBase.h"
|
||||
#include "tribufu++/MultipartFormData.h"
|
||||
|
||||
#include <sstream>
|
||||
#include <limits>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
#include <sstream>
|
||||
|
||||
template <typename T>
|
||||
utility::string_t toString(const T value)
|
||||
template <typename T> utility::string_t toString(const T value)
|
||||
{
|
||||
utility::ostringstream_t out;
|
||||
out << std::setprecision(std::numeric_limits<T>::digits10) << std::fixed << value;
|
||||
return out.str();
|
||||
}
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
using namespace tribufu::models;
|
||||
|
||||
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration )
|
||||
: m_Configuration(configuration)
|
||||
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration) : m_Configuration(configuration)
|
||||
{
|
||||
}
|
||||
ApiClient::~ApiClient()
|
||||
{
|
||||
}
|
||||
|
||||
const ApiClient::ResponseHandlerType& ApiClient::getResponseHandler() const {
|
||||
const ApiClient::ResponseHandlerType &ApiClient::getResponseHandler() const
|
||||
{
|
||||
return m_ResponseHandler;
|
||||
}
|
||||
|
||||
void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) {
|
||||
void ApiClient::setResponseHandler(const ResponseHandlerType &responseHandler)
|
||||
{
|
||||
m_ResponseHandler = responseHandler;
|
||||
}
|
||||
|
||||
@ -56,7 +58,6 @@ void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configu
|
||||
m_Configuration = configuration;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t ApiClient::parameterToString(utility::string_t value)
|
||||
{
|
||||
return value;
|
||||
@ -97,15 +98,13 @@ utility::string_t ApiClient::parameterToString(bool value)
|
||||
}
|
||||
|
||||
pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
const utility::string_t& path,
|
||||
const utility::string_t& method,
|
||||
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
|
||||
const utility::string_t &contentType) const
|
||||
{
|
||||
if (postBody != nullptr && formParams.size() != 0)
|
||||
{
|
||||
@ -119,7 +118,8 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
|
||||
if (fileParams.size() > 0 && contentType != utility::conversions::to_string_t("multipart/form-data"))
|
||||
{
|
||||
throw ApiException(400, utility::conversions::to_string_t("Operations with file parameters must be called with multipart/form-data"));
|
||||
throw ApiException(400, utility::conversions::to_string_t(
|
||||
"Operations with file parameters must be called with multipart/form-data"));
|
||||
}
|
||||
|
||||
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
|
||||
@ -145,7 +145,9 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
uploadData.writeTo(data);
|
||||
auto bodyString = data.str();
|
||||
const auto length = bodyString.size();
|
||||
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary());
|
||||
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length,
|
||||
utility::conversions::to_string_t("multipart/form-data; boundary=") +
|
||||
uploadData.getBoundary());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -155,7 +157,8 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
postBody->writeTo(data);
|
||||
auto bodyString = data.str();
|
||||
const auto length = bodyString.size();
|
||||
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType);
|
||||
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length,
|
||||
contentType);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -180,7 +183,8 @@ pplx::task<web::http::http_response> ApiClient::callApi(
|
||||
}
|
||||
if (!formParams.empty())
|
||||
{
|
||||
request.set_body(formData.query(), utility::conversions::to_string_t("application/x-www-form-urlencoded"));
|
||||
request.set_body(formData.query(),
|
||||
utility::conversions::to_string_t("application/x-www-form-urlencoded"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "tribufu++/ApiConfiguration.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
ApiConfiguration::ApiConfiguration()
|
||||
{
|
||||
|
@ -12,23 +12,20 @@
|
||||
|
||||
#include "tribufu++/ApiException.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace api {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace api
|
||||
{
|
||||
|
||||
ApiException::ApiException( int errorCode
|
||||
, const utility::string_t& message
|
||||
, std::shared_ptr<std::istream> content /*= nullptr*/ )
|
||||
: web::http::http_exception( errorCode, message )
|
||||
, m_Content(content)
|
||||
ApiException::ApiException(int errorCode, const utility::string_t &message,
|
||||
std::shared_ptr<std::istream> content /*= nullptr*/)
|
||||
: web::http::http_exception(errorCode, message), m_Content(content)
|
||||
{
|
||||
}
|
||||
ApiException::ApiException( int errorCode
|
||||
, const utility::string_t& message
|
||||
, std::map<utility::string_t, utility::string_t>& headers
|
||||
, std::shared_ptr<std::istream> content /*= nullptr*/ )
|
||||
: web::http::http_exception( errorCode, message )
|
||||
, m_Content(content)
|
||||
, m_Headers(headers)
|
||||
ApiException::ApiException(int errorCode, const utility::string_t &message,
|
||||
std::map<utility::string_t, utility::string_t> &headers,
|
||||
std::shared_ptr<std::istream> content /*= nullptr*/)
|
||||
: web::http::http_exception(errorCode, message), m_Content(content), m_Headers(headers)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "tribufu++/HttpContent.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
HttpContent::HttpContent()
|
||||
{
|
||||
|
@ -12,11 +12,12 @@
|
||||
|
||||
#include "tribufu++/JsonBody.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
JsonBody::JsonBody( const web::json::value& json)
|
||||
: m_Json(json)
|
||||
JsonBody::JsonBody(const web::json::value &json) : m_Json(json)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "tribufu++/ModelBase.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
ModelBase::ModelBase() : m_IsSet(false)
|
||||
{
|
||||
@ -115,10 +117,12 @@ web::json::value ModelBase::toJson( const std::shared_ptr<HttpContent>& content
|
||||
web::json::value value;
|
||||
if (content != nullptr)
|
||||
{
|
||||
value[utility::conversions::to_string_t("ContentDisposition")] = ModelBase::toJson(content->getContentDisposition());
|
||||
value[utility::conversions::to_string_t("ContentDisposition")] =
|
||||
ModelBase::toJson(content->getContentDisposition());
|
||||
value[utility::conversions::to_string_t("ContentType")] = ModelBase::toJson(content->getContentType());
|
||||
value[utility::conversions::to_string_t("FileName")] = ModelBase::toJson(content->getFileName());
|
||||
value[utility::conversions::to_string_t("InputStream")] = web::json::value::string( ModelBase::toBase64(content->getData()) );
|
||||
value[utility::conversions::to_string_t("InputStream")] =
|
||||
web::json::value::string(ModelBase::toBase64(content->getData()));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
@ -253,7 +257,8 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<HttpCo
|
||||
}
|
||||
if (outVal != nullptr)
|
||||
{
|
||||
outVal->setData(std::shared_ptr<std::istream>(new std::stringstream(utility::conversions::to_utf8string(val))));
|
||||
outVal->setData(
|
||||
std::shared_ptr<std::istream>(new std::stringstream(utility::conversions::to_utf8string(val))));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -281,12 +286,14 @@ bool ModelBase::fromJson( const web::json::value& val, bool & outVal )
|
||||
}
|
||||
bool ModelBase::fromJson(const web::json::value &val, float &outVal)
|
||||
{
|
||||
outVal = (!val.is_double() && !val.is_integer()) ? std::numeric_limits<float>::quiet_NaN(): static_cast<float>(val.as_double());
|
||||
outVal = (!val.is_double() && !val.is_integer()) ? std::numeric_limits<float>::quiet_NaN()
|
||||
: static_cast<float>(val.as_double());
|
||||
return val.is_double() || val.is_integer();
|
||||
}
|
||||
bool ModelBase::fromJson(const web::json::value &val, double &outVal)
|
||||
{
|
||||
outVal = (!val.is_double() && !val.is_integer()) ? std::numeric_limits<double>::quiet_NaN(): val.as_double();
|
||||
outVal =
|
||||
(!val.is_double() && !val.is_integer()) ? std::numeric_limits<double>::quiet_NaN() : val.as_double();
|
||||
return val.is_double() || val.is_integer();
|
||||
}
|
||||
bool ModelBase::fromJson(const web::json::value &val, int32_t &outVal)
|
||||
@ -306,7 +313,9 @@ bool ModelBase::fromJson( const web::json::value& val, utility::string_t & outVa
|
||||
}
|
||||
bool ModelBase::fromJson(const web::json::value &val, utility::datetime &outVal)
|
||||
{
|
||||
outVal = val.is_null() ? utility::datetime::from_string(utility::conversions::to_string_t("NULL"), utility::datetime::ISO_8601) : utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601);
|
||||
outVal = val.is_null() ? utility::datetime::from_string(utility::conversions::to_string_t("NULL"),
|
||||
utility::datetime::ISO_8601)
|
||||
: utility::datetime::from_string(val.as_string(), utility::datetime::ISO_8601);
|
||||
return outVal.is_initialized();
|
||||
}
|
||||
bool ModelBase::fromJson(const web::json::value &val, web::json::value &outVal)
|
||||
@ -327,25 +336,29 @@ bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<HttpConte
|
||||
if (val.has_field(utility::conversions::to_string_t("ContentDisposition")))
|
||||
{
|
||||
utility::string_t value;
|
||||
result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("ContentDisposition")), value);
|
||||
result = result && ModelBase::fromJson(
|
||||
val.at(utility::conversions::to_string_t("ContentDisposition")), value);
|
||||
content->setContentDisposition(value);
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t("ContentType")))
|
||||
{
|
||||
utility::string_t value;
|
||||
result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("ContentType")), value);
|
||||
result =
|
||||
result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("ContentType")), value);
|
||||
content->setContentType(value);
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t("FileName")))
|
||||
{
|
||||
utility::string_t value;
|
||||
result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("FileName")), value);
|
||||
result =
|
||||
result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("FileName")), value);
|
||||
content->setFileName(value);
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t("InputStream")))
|
||||
{
|
||||
utility::string_t value;
|
||||
result = result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("InputStream")), value);
|
||||
result =
|
||||
result && ModelBase::fromJson(val.at(utility::conversions::to_string_t("InputStream")), value);
|
||||
content->setData(ModelBase::fromBase64(value));
|
||||
}
|
||||
}
|
||||
@ -364,7 +377,8 @@ bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<utility::
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, bool value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, bool value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
@ -375,7 +389,8 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, float value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
@ -386,7 +401,8 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, double value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, double value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
@ -397,7 +413,8 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, int32_t value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
@ -408,7 +425,8 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, int64_t value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
@ -419,34 +437,44 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType)
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const utility::string_t &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::shared_ptr<std::istream>( new std::stringstream( utility::conversions::to_utf8string(value) ) ) );
|
||||
content->setData(
|
||||
std::shared_ptr<std::istream>(new std::stringstream(utility::conversions::to_utf8string(value))));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const utility::datetime &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::shared_ptr<std::istream>( new std::stringstream( utility::conversions::to_utf8string(value.to_string(utility::datetime::ISO_8601) ) ) ) );
|
||||
content->setData(std::shared_ptr<std::istream>(new std::stringstream(
|
||||
utility::conversions::to_utf8string(value.to_string(utility::datetime::ISO_8601)))));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const web::json::value& value, const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const web::json::value &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::shared_ptr<std::istream>( new std::stringstream( utility::conversions::to_utf8string(value.serialize()) ) ) );
|
||||
content->setData(std::shared_ptr<std::istream>(
|
||||
new std::stringstream(utility::conversions::to_utf8string(value.serialize()))));
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::shared_ptr<HttpContent>& value )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const std::shared_ptr<HttpContent> &value)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
if (value != nullptr)
|
||||
@ -459,7 +487,9 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
|
||||
}
|
||||
return content;
|
||||
}
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& name, const std::shared_ptr<utility::datetime>& value , const utility::string_t& contentType )
|
||||
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
|
||||
const std::shared_ptr<utility::datetime> &value,
|
||||
const utility::string_t &contentType)
|
||||
{
|
||||
std::shared_ptr<HttpContent> content(new HttpContent);
|
||||
if (value != nullptr)
|
||||
@ -467,60 +497,67 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& n
|
||||
content->setName(name);
|
||||
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
|
||||
content->setContentType(contentType);
|
||||
content->setData( std::shared_ptr<std::istream>( new std::stringstream( utility::conversions::to_utf8string( toJson(*value).serialize() ) ) ) );
|
||||
content->setData(std::shared_ptr<std::istream>(
|
||||
new std::stringstream(utility::conversions::to_utf8string(toJson(*value).serialize()))));
|
||||
}
|
||||
return content;
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, bool &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, float &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, double &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int32_t &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int64_t &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::string_t &outVal)
|
||||
{
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
std::shared_ptr<std::istream> data = val->getData();
|
||||
data->seekg(0, data->beg);
|
||||
|
||||
std::string str((std::istreambuf_iterator<char>(*data.get())),
|
||||
std::istreambuf_iterator<char>());
|
||||
std::string str((std::istreambuf_iterator<char>(*data.get())), std::istreambuf_iterator<char>());
|
||||
outVal = utility::conversions::to_string_t(str);
|
||||
return true;
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::datetime &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
outVal = utility::datetime::from_string(str, utility::datetime::ISO_8601);
|
||||
return true;
|
||||
@ -528,14 +565,16 @@ bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::datet
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &outVal)
|
||||
{
|
||||
utility::string_t str;
|
||||
if( val == nullptr ) return false;
|
||||
if (val == nullptr)
|
||||
return false;
|
||||
if (outVal == nullptr)
|
||||
{
|
||||
outVal = std::shared_ptr<HttpContent>(new HttpContent());
|
||||
@ -543,7 +582,8 @@ bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_p
|
||||
ModelBase::fromHttpContent(val, str);
|
||||
return fromString(str, outVal);
|
||||
}
|
||||
// base64 encoding/decoding based on : https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64#C.2B.2B
|
||||
// base64 encoding/decoding based on :
|
||||
// https://en.wikibooks.org/wiki/Algorithm_Implementation/Miscellaneous/Base64#C.2B.2B
|
||||
const static char Base64Chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||
const static char Base64PadChar = '=';
|
||||
utility::string_t ModelBase::toBase64(utility::string_t value)
|
||||
@ -639,12 +679,14 @@ std::shared_ptr<std::istream> ModelBase::fromBase64( const utility::string_t& en
|
||||
result->write(outBuf, 1);
|
||||
return result;
|
||||
default:
|
||||
throw web::json::json_exception( utility::conversions::to_string_t( "Invalid Padding in Base 64!" ).c_str() );
|
||||
throw web::json::json_exception(
|
||||
utility::conversions::to_string_t("Invalid Padding in Base 64!").c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
throw web::json::json_exception( utility::conversions::to_string_t( "Non-Valid Character in Base 64!" ).c_str() );
|
||||
throw web::json::json_exception(
|
||||
utility::conversions::to_string_t("Non-Valid Character in Base 64!").c_str());
|
||||
}
|
||||
++cursor;
|
||||
}
|
||||
|
@ -16,8 +16,10 @@
|
||||
#include <boost/uuid/random_generator.hpp>
|
||||
#include <boost/uuid/uuid_io.hpp>
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
MultipartFormData::MultipartFormData()
|
||||
{
|
||||
@ -26,10 +28,8 @@ MultipartFormData::MultipartFormData()
|
||||
m_Boundary = uuidString.str();
|
||||
}
|
||||
|
||||
MultipartFormData::MultipartFormData(const utility::string_t& boundary)
|
||||
: m_Boundary(boundary)
|
||||
MultipartFormData::MultipartFormData(const utility::string_t &boundary) : m_Boundary(boundary)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
MultipartFormData::~MultipartFormData()
|
||||
@ -69,10 +69,12 @@ void MultipartFormData::writeTo( std::ostream& target )
|
||||
std::shared_ptr<HttpContent> content = m_Contents[i];
|
||||
|
||||
// boundary
|
||||
target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n";
|
||||
target << "\r\n"
|
||||
<< "--" << utility::conversions::to_utf8string(m_Boundary) << "\r\n";
|
||||
|
||||
// headers
|
||||
target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() );
|
||||
target << "Content-Disposition: "
|
||||
<< utility::conversions::to_utf8string(content->getContentDisposition());
|
||||
if (content->getName().size() > 0)
|
||||
{
|
||||
target << "; name=\"" << utility::conversions::to_utf8string(content->getName()) << "\"";
|
||||
@ -85,7 +87,8 @@ void MultipartFormData::writeTo( std::ostream& target )
|
||||
|
||||
if (content->getContentType().size() > 0)
|
||||
{
|
||||
target << "Content-Type: " << utility::conversions::to_utf8string( content->getContentType() ) << "\r\n";
|
||||
target << "Content-Type: " << utility::conversions::to_utf8string(content->getContentType())
|
||||
<< "\r\n";
|
||||
}
|
||||
|
||||
target << "\r\n";
|
||||
|
@ -12,8 +12,10 @@
|
||||
|
||||
#include "tribufu++/Object.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Object::Object()
|
||||
{
|
||||
@ -26,7 +28,6 @@ Object::~Object()
|
||||
|
||||
void Object::validate()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
web::json::value Object::toJson() const
|
||||
@ -47,22 +48,26 @@ bool Object::fromJson(const web::json::value& val)
|
||||
void Object::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(".");
|
||||
}
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object));
|
||||
}
|
||||
|
||||
bool Object::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(".");
|
||||
}
|
||||
|
||||
if( ModelBase::fromHttpContent(multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object ) )
|
||||
if (ModelBase::fromHttpContent(
|
||||
multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object))
|
||||
{
|
||||
m_IsSet = true;
|
||||
}
|
||||
@ -74,7 +79,6 @@ web::json::value Object::getValue(const utility::string_t& key) const
|
||||
return m_object.at(key);
|
||||
}
|
||||
|
||||
|
||||
void Object::setValue(const utility::string_t &key, const web::json::value &value)
|
||||
{
|
||||
if (!value.is_null())
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Account.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Account::Account()
|
||||
{
|
||||
@ -102,7 +102,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -113,7 +112,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("provider"))))
|
||||
@ -124,7 +122,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<LoginProvider> refVal_setProvider;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setProvider);
|
||||
setProvider(refVal_setProvider);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("user_id"))))
|
||||
@ -135,7 +132,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUserId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUserId);
|
||||
setUserId(refVal_setUserId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("authorized"))))
|
||||
@ -146,7 +142,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
bool refVal_setAuthorized;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorized);
|
||||
setAuthorized(refVal_setAuthorized);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("fields"))))
|
||||
@ -157,7 +152,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<AnyType> refVal_setFields;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setFields);
|
||||
setFields(refVal_setFields);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -168,7 +162,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -179,7 +172,6 @@ bool Account::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -188,7 +180,8 @@ bool Account::fromJson(const web::json::value& val)
|
||||
void Account::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -198,31 +191,38 @@ void Account::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_ProviderIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("provider")), m_Provider));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("provider")),
|
||||
m_Provider));
|
||||
}
|
||||
if (m_User_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_id")), m_User_id));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_id")), m_User_id));
|
||||
}
|
||||
if (m_AuthorizedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("authorized")), m_Authorized));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("authorized")),
|
||||
m_Authorized));
|
||||
}
|
||||
if (m_FieldsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("fields")), m_Fields));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("fields")), m_Fields));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +230,8 @@ bool Account::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -238,61 +239,67 @@ bool Account::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("provider"))))
|
||||
{
|
||||
std::shared_ptr<LoginProvider> refVal_setProvider;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("provider"))), refVal_setProvider );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("provider"))), refVal_setProvider);
|
||||
setProvider(refVal_setProvider);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("user_id"))))
|
||||
{
|
||||
utility::string_t refVal_setUserId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_id"))), refVal_setUserId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_id"))),
|
||||
refVal_setUserId);
|
||||
setUserId(refVal_setUserId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("authorized"))))
|
||||
{
|
||||
bool refVal_setAuthorized;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("authorized"))), refVal_setAuthorized );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("authorized"))), refVal_setAuthorized);
|
||||
setAuthorized(refVal_setAuthorized);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("fields"))))
|
||||
{
|
||||
std::shared_ptr<AnyType> refVal_setFields;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fields"))), refVal_setFields );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fields"))),
|
||||
refVal_setFields);
|
||||
setFields(refVal_setFields);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Account::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Account::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -313,7 +320,6 @@ utility::string_t Account::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Account::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -334,7 +340,6 @@ std::shared_ptr<LoginProvider> Account::getProvider() const
|
||||
return m_Provider;
|
||||
}
|
||||
|
||||
|
||||
void Account::setProvider(const std::shared_ptr<LoginProvider> &value)
|
||||
{
|
||||
m_Provider = value;
|
||||
@ -355,7 +360,6 @@ utility::string_t Account::getUserId() const
|
||||
return m_User_id;
|
||||
}
|
||||
|
||||
|
||||
void Account::setUserId(const utility::string_t &value)
|
||||
{
|
||||
m_User_id = value;
|
||||
@ -396,7 +400,6 @@ std::shared_ptr<AnyType> Account::getFields() const
|
||||
return m_Fields;
|
||||
}
|
||||
|
||||
|
||||
void Account::setFields(const std::shared_ptr<AnyType> &value)
|
||||
{
|
||||
m_Fields = value;
|
||||
@ -417,7 +420,6 @@ utility::datetime Account::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Account::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -438,7 +440,6 @@ utility::datetime Account::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Account::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -457,5 +458,3 @@ void Account::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Application.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Application::Application()
|
||||
{
|
||||
@ -187,7 +187,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -198,7 +197,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -209,7 +207,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("type"))))
|
||||
@ -220,7 +217,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<ApplicationType> refVal_setType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
|
||||
setType(refVal_setType);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("organization_id"))))
|
||||
@ -231,7 +227,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setOrganizationId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId);
|
||||
setOrganizationId(refVal_setOrganizationId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("icon_url"))))
|
||||
@ -242,7 +237,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setIconUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl);
|
||||
setIconUrl(refVal_setIconUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -253,7 +247,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
@ -264,7 +257,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
@ -275,7 +267,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("parent_id"))))
|
||||
@ -286,7 +277,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setParentId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setParentId);
|
||||
setParentId(refVal_setParentId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("slug"))))
|
||||
@ -297,7 +287,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("visibility"))))
|
||||
@ -308,7 +297,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setVisibility;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility);
|
||||
setVisibility(refVal_setVisibility);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("password"))))
|
||||
@ -319,7 +307,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("primary"))))
|
||||
@ -330,7 +317,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPrimary;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary);
|
||||
setPrimary(refVal_setPrimary);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("user_count"))))
|
||||
@ -341,7 +327,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setUserCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount);
|
||||
setUserCount(refVal_setUserCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("achievement_count"))))
|
||||
@ -352,7 +337,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setAchievementCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount);
|
||||
setAchievementCount(refVal_setAchievementCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("badge_count"))))
|
||||
@ -363,7 +347,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setBadgeCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount);
|
||||
setBadgeCount(refVal_setBadgeCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("download_count"))))
|
||||
@ -374,7 +357,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -385,7 +367,6 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -396,16 +377,17 @@ bool Application::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void Application::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void Application::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -415,79 +397,98 @@ void Application::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_TypeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
}
|
||||
if (m_Organization_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("organization_id")), m_Organization_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("organization_id")), m_Organization_id));
|
||||
}
|
||||
if (m_Icon_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("icon_url")), m_Icon_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("icon_url")),
|
||||
m_Icon_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Capsule_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
}
|
||||
if (m_Library_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
}
|
||||
if (m_Parent_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("parent_id")), m_Parent_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("parent_id")),
|
||||
m_Parent_id));
|
||||
}
|
||||
if (m_SlugIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
}
|
||||
if (m_VisibilityIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("visibility")), m_Visibility));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("visibility")),
|
||||
m_Visibility));
|
||||
}
|
||||
if (m_PasswordIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")), m_Password));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")),
|
||||
m_Password));
|
||||
}
|
||||
if (m_PrimaryIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("primary")), m_Primary));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("primary")), m_Primary));
|
||||
}
|
||||
if (m_User_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_count")), m_User_count));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_count")),
|
||||
m_User_count));
|
||||
}
|
||||
if (m_Achievement_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("achievement_count")), m_Achievement_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("achievement_count")), m_Achievement_count));
|
||||
}
|
||||
if (m_Badge_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("badge_count")), m_Badge_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("badge_count")), m_Badge_count));
|
||||
}
|
||||
if (m_Download_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -495,7 +496,8 @@ bool Application::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -503,133 +505,156 @@ bool Application::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
|
||||
{
|
||||
std::shared_ptr<ApplicationType> refVal_setType;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))),
|
||||
refVal_setType);
|
||||
setType(refVal_setType);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id"))))
|
||||
{
|
||||
utility::string_t refVal_setOrganizationId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("organization_id"))), refVal_setOrganizationId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("organization_id"))),
|
||||
refVal_setOrganizationId);
|
||||
setOrganizationId(refVal_setOrganizationId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url"))))
|
||||
{
|
||||
utility::string_t refVal_setIconUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("icon_url"))), refVal_setIconUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("icon_url"))), refVal_setIconUrl);
|
||||
setIconUrl(refVal_setIconUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))), refVal_setCapsuleImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))),
|
||||
refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))), refVal_setLibraryImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))),
|
||||
refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id"))))
|
||||
{
|
||||
utility::string_t refVal_setParentId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("parent_id"))), refVal_setParentId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("parent_id"))), refVal_setParentId);
|
||||
setParentId(refVal_setParentId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
|
||||
{
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))), refVal_setSlug );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))),
|
||||
refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("visibility"))))
|
||||
{
|
||||
int32_t refVal_setVisibility;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("visibility"))), refVal_setVisibility );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("visibility"))), refVal_setVisibility);
|
||||
setVisibility(refVal_setVisibility);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
|
||||
{
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("primary"))))
|
||||
{
|
||||
int32_t refVal_setPrimary;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("primary"))), refVal_setPrimary );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("primary"))),
|
||||
refVal_setPrimary);
|
||||
setPrimary(refVal_setPrimary);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("user_count"))))
|
||||
{
|
||||
int32_t refVal_setUserCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_count"))), refVal_setUserCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("user_count"))), refVal_setUserCount);
|
||||
setUserCount(refVal_setUserCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count"))))
|
||||
{
|
||||
int32_t refVal_setAchievementCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("achievement_count"))), refVal_setAchievementCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("achievement_count"))),
|
||||
refVal_setAchievementCount);
|
||||
setAchievementCount(refVal_setAchievementCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count"))))
|
||||
{
|
||||
int32_t refVal_setBadgeCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("badge_count"))), refVal_setBadgeCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("badge_count"))), refVal_setBadgeCount);
|
||||
setBadgeCount(refVal_setBadgeCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
|
||||
{
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("download_count"))), refVal_setDownloadCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("download_count"))),
|
||||
refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Application::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Application::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -650,7 +675,6 @@ utility::string_t Application::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Application::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -671,7 +695,6 @@ utility::string_t Application::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void Application::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -692,7 +715,6 @@ std::shared_ptr<ApplicationType> Application::getType() const
|
||||
return m_Type;
|
||||
}
|
||||
|
||||
|
||||
void Application::setType(const std::shared_ptr<ApplicationType> &value)
|
||||
{
|
||||
m_Type = value;
|
||||
@ -713,7 +735,6 @@ utility::string_t Application::getOrganizationId() const
|
||||
return m_Organization_id;
|
||||
}
|
||||
|
||||
|
||||
void Application::setOrganizationId(const utility::string_t &value)
|
||||
{
|
||||
m_Organization_id = value;
|
||||
@ -734,7 +755,6 @@ utility::string_t Application::getIconUrl() const
|
||||
return m_Icon_url;
|
||||
}
|
||||
|
||||
|
||||
void Application::setIconUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Icon_url = value;
|
||||
@ -755,7 +775,6 @@ utility::string_t Application::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void Application::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -776,7 +795,6 @@ utility::string_t Application::getCapsuleImageUrl() const
|
||||
return m_Capsule_image_url;
|
||||
}
|
||||
|
||||
|
||||
void Application::setCapsuleImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Capsule_image_url = value;
|
||||
@ -797,7 +815,6 @@ utility::string_t Application::getLibraryImageUrl() const
|
||||
return m_Library_image_url;
|
||||
}
|
||||
|
||||
|
||||
void Application::setLibraryImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Library_image_url = value;
|
||||
@ -818,7 +835,6 @@ utility::string_t Application::getParentId() const
|
||||
return m_Parent_id;
|
||||
}
|
||||
|
||||
|
||||
void Application::setParentId(const utility::string_t &value)
|
||||
{
|
||||
m_Parent_id = value;
|
||||
@ -839,7 +855,6 @@ utility::string_t Application::getSlug() const
|
||||
return m_Slug;
|
||||
}
|
||||
|
||||
|
||||
void Application::setSlug(const utility::string_t &value)
|
||||
{
|
||||
m_Slug = value;
|
||||
@ -880,7 +895,6 @@ utility::string_t Application::getPassword() const
|
||||
return m_Password;
|
||||
}
|
||||
|
||||
|
||||
void Application::setPassword(const utility::string_t &value)
|
||||
{
|
||||
m_Password = value;
|
||||
@ -1001,7 +1015,6 @@ utility::datetime Application::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Application::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -1022,7 +1035,6 @@ utility::datetime Application::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Application::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -1041,5 +1053,3 @@ void Application::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ApplicationType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -70,7 +70,8 @@ bool ApplicationType::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -82,7 +83,8 @@ void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix, e));
|
||||
}
|
||||
|
||||
bool ApplicationType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool ApplicationType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
@ -114,5 +116,3 @@ void ApplicationType::setValue(ApplicationType::eApplicationType const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/AuthorizeRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
AuthorizeRequest::AuthorizeRequest()
|
||||
{
|
||||
@ -63,7 +63,8 @@ web::json::value AuthorizeRequest::toJson() const
|
||||
if (m_Code_challenge_methodIsSet)
|
||||
{
|
||||
|
||||
val[utility::conversions::to_string_t(U("code_challenge_method"))] = ModelBase::toJson(m_Code_challenge_method);
|
||||
val[utility::conversions::to_string_t(U("code_challenge_method"))] =
|
||||
ModelBase::toJson(m_Code_challenge_method);
|
||||
}
|
||||
if (m_Redirect_uriIsSet)
|
||||
{
|
||||
@ -95,7 +96,6 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<ResponseType> refVal_setResponseType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setResponseType);
|
||||
setResponseType(refVal_setResponseType);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("client_id"))))
|
||||
@ -106,7 +106,6 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setClientId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setClientId);
|
||||
setClientId(refVal_setClientId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("code_challenge"))))
|
||||
@ -117,18 +116,17 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCodeChallenge;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallenge);
|
||||
setCodeChallenge(refVal_setCodeChallenge);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("code_challenge_method"))))
|
||||
{
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("code_challenge_method")));
|
||||
const web::json::value &fieldValue =
|
||||
val.at(utility::conversions::to_string_t(U("code_challenge_method")));
|
||||
if (!fieldValue.is_null())
|
||||
{
|
||||
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallengeMethod);
|
||||
setCodeChallengeMethod(refVal_setCodeChallengeMethod);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("redirect_uri"))))
|
||||
@ -139,7 +137,6 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setRedirectUri;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRedirectUri);
|
||||
setRedirectUri(refVal_setRedirectUri);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("scope"))))
|
||||
@ -150,7 +147,6 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setScope;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setScope);
|
||||
setScope(refVal_setScope);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("state"))))
|
||||
@ -161,54 +157,65 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setState;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setState);
|
||||
setState(refVal_setState);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void AuthorizeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void AuthorizeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_Response_typeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("response_type")), m_Response_type));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("response_type")), m_Response_type));
|
||||
}
|
||||
if (m_Client_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("client_id")), m_Client_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("client_id")),
|
||||
m_Client_id));
|
||||
}
|
||||
if (m_Code_challengeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("code_challenge")), m_Code_challenge));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("code_challenge")), m_Code_challenge));
|
||||
}
|
||||
if (m_Code_challenge_methodIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("code_challenge_method")), m_Code_challenge_method));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("code_challenge_method")),
|
||||
m_Code_challenge_method));
|
||||
}
|
||||
if (m_Redirect_uriIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("redirect_uri")), m_Redirect_uri));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("redirect_uri")), m_Redirect_uri));
|
||||
}
|
||||
if (m_ScopeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("scope")), m_Scope));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("scope")), m_Scope));
|
||||
}
|
||||
if (m_StateIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("state")), m_State));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("state")), m_State));
|
||||
}
|
||||
}
|
||||
|
||||
bool AuthorizeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool AuthorizeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -216,55 +223,63 @@ bool AuthorizeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipar
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("response_type"))))
|
||||
{
|
||||
std::shared_ptr<ResponseType> refVal_setResponseType;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("response_type"))), refVal_setResponseType );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("response_type"))),
|
||||
refVal_setResponseType);
|
||||
setResponseType(refVal_setResponseType);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("client_id"))))
|
||||
{
|
||||
utility::string_t refVal_setClientId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("client_id"))), refVal_setClientId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("client_id"))), refVal_setClientId);
|
||||
setClientId(refVal_setClientId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge"))))
|
||||
{
|
||||
utility::string_t refVal_setCodeChallenge;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code_challenge"))), refVal_setCodeChallenge );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("code_challenge"))),
|
||||
refVal_setCodeChallenge);
|
||||
setCodeChallenge(refVal_setCodeChallenge);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge_method"))))
|
||||
{
|
||||
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code_challenge_method"))), refVal_setCodeChallengeMethod );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("code_challenge_method"))),
|
||||
refVal_setCodeChallengeMethod);
|
||||
setCodeChallengeMethod(refVal_setCodeChallengeMethod);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("redirect_uri"))))
|
||||
{
|
||||
utility::string_t refVal_setRedirectUri;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("redirect_uri"))), refVal_setRedirectUri );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("redirect_uri"))), refVal_setRedirectUri);
|
||||
setRedirectUri(refVal_setRedirectUri);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("scope"))))
|
||||
{
|
||||
utility::string_t refVal_setScope;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("scope"))), refVal_setScope );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("scope"))),
|
||||
refVal_setScope);
|
||||
setScope(refVal_setScope);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("state"))))
|
||||
{
|
||||
utility::string_t refVal_setState;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("state"))), refVal_setState );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("state"))),
|
||||
refVal_setState);
|
||||
setState(refVal_setState);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<ResponseType> AuthorizeRequest::getResponseType() const
|
||||
{
|
||||
return m_Response_type;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setResponseType(const std::shared_ptr<ResponseType> &value)
|
||||
{
|
||||
m_Response_type = value;
|
||||
@ -285,7 +300,6 @@ utility::string_t AuthorizeRequest::getClientId() const
|
||||
return m_Client_id;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setClientId(const utility::string_t &value)
|
||||
{
|
||||
m_Client_id = value;
|
||||
@ -306,7 +320,6 @@ utility::string_t AuthorizeRequest::getCodeChallenge() const
|
||||
return m_Code_challenge;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setCodeChallenge(const utility::string_t &value)
|
||||
{
|
||||
m_Code_challenge = value;
|
||||
@ -327,7 +340,6 @@ std::shared_ptr<CodeChallengeMethod> AuthorizeRequest::getCodeChallengeMethod()
|
||||
return m_Code_challenge_method;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setCodeChallengeMethod(const std::shared_ptr<CodeChallengeMethod> &value)
|
||||
{
|
||||
m_Code_challenge_method = value;
|
||||
@ -348,7 +360,6 @@ utility::string_t AuthorizeRequest::getRedirectUri() const
|
||||
return m_Redirect_uri;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setRedirectUri(const utility::string_t &value)
|
||||
{
|
||||
m_Redirect_uri = value;
|
||||
@ -369,7 +380,6 @@ utility::string_t AuthorizeRequest::getScope() const
|
||||
return m_Scope;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setScope(const utility::string_t &value)
|
||||
{
|
||||
m_Scope = value;
|
||||
@ -390,7 +400,6 @@ utility::string_t AuthorizeRequest::getState() const
|
||||
return m_State;
|
||||
}
|
||||
|
||||
|
||||
void AuthorizeRequest::setState(const utility::string_t &value)
|
||||
{
|
||||
m_State = value;
|
||||
@ -409,5 +418,3 @@ void AuthorizeRequest::unsetState()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/CodeChallengeMethod.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -70,7 +70,8 @@ bool CodeChallengeMethod::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -82,7 +83,8 @@ void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipa
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix, e));
|
||||
}
|
||||
|
||||
bool CodeChallengeMethod::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool CodeChallengeMethod::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
@ -114,5 +116,3 @@ void CodeChallengeMethod::setValue(CodeChallengeMethod::eCodeChallengeMethod con
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/CryptoViewModel.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
CryptoViewModel::CryptoViewModel()
|
||||
{
|
||||
@ -62,7 +62,6 @@ bool CryptoViewModel::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setEncoded;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setEncoded);
|
||||
setEncoded(refVal_setEncoded);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("decoded"))))
|
||||
@ -73,34 +72,39 @@ bool CryptoViewModel::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDecoded;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDecoded);
|
||||
setDecoded(refVal_setDecoded);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void CryptoViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void CryptoViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_EncodedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("encoded")), m_Encoded));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("encoded")), m_Encoded));
|
||||
}
|
||||
if (m_DecodedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("decoded")), m_Decoded));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("decoded")), m_Decoded));
|
||||
}
|
||||
}
|
||||
|
||||
bool CryptoViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool CryptoViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -108,25 +112,25 @@ bool CryptoViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("encoded"))))
|
||||
{
|
||||
utility::string_t refVal_setEncoded;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("encoded"))), refVal_setEncoded );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("encoded"))),
|
||||
refVal_setEncoded);
|
||||
setEncoded(refVal_setEncoded);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("decoded"))))
|
||||
{
|
||||
utility::string_t refVal_setDecoded;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("decoded"))), refVal_setDecoded );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("decoded"))),
|
||||
refVal_setDecoded);
|
||||
setDecoded(refVal_setDecoded);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t CryptoViewModel::getEncoded() const
|
||||
{
|
||||
return m_Encoded;
|
||||
}
|
||||
|
||||
|
||||
void CryptoViewModel::setEncoded(const utility::string_t &value)
|
||||
{
|
||||
m_Encoded = value;
|
||||
@ -147,7 +151,6 @@ utility::string_t CryptoViewModel::getDecoded() const
|
||||
return m_Decoded;
|
||||
}
|
||||
|
||||
|
||||
void CryptoViewModel::setDecoded(const utility::string_t &value)
|
||||
{
|
||||
m_Decoded = value;
|
||||
@ -166,5 +169,3 @@ void CryptoViewModel::unsetDecoded()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Game.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Game::Game()
|
||||
{
|
||||
@ -122,7 +122,8 @@ web::json::value Game::toJson() const
|
||||
if (m_Steam_server_app_idIsSet)
|
||||
{
|
||||
|
||||
val[utility::conversions::to_string_t(U("steam_server_app_id"))] = ModelBase::toJson(m_Steam_server_app_id);
|
||||
val[utility::conversions::to_string_t(U("steam_server_app_id"))] =
|
||||
ModelBase::toJson(m_Steam_server_app_id);
|
||||
}
|
||||
if (m_Enable_serversIsSet)
|
||||
{
|
||||
@ -142,7 +143,8 @@ web::json::value Game::toJson() const
|
||||
if (m_Server_connect_urlIsSet)
|
||||
{
|
||||
|
||||
val[utility::conversions::to_string_t(U("server_connect_url"))] = ModelBase::toJson(m_Server_connect_url);
|
||||
val[utility::conversions::to_string_t(U("server_connect_url"))] =
|
||||
ModelBase::toJson(m_Server_connect_url);
|
||||
}
|
||||
if (m_Server_tagsIsSet)
|
||||
{
|
||||
@ -264,7 +266,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setGamePort;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort);
|
||||
setGamePort(refVal_setGamePort);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("query_port"))))
|
||||
@ -275,7 +276,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setQueryPort;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort);
|
||||
setQueryPort(refVal_setQueryPort);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("rcon_port"))))
|
||||
@ -286,7 +286,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setRconPort;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRconPort);
|
||||
setRconPort(refVal_setRconPort);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("server_count"))))
|
||||
@ -297,7 +296,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("steam_app_id"))))
|
||||
@ -308,18 +306,17 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setSteamAppId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSteamAppId);
|
||||
setSteamAppId(refVal_setSteamAppId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("steam_server_app_id"))))
|
||||
{
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("steam_server_app_id")));
|
||||
const web::json::value &fieldValue =
|
||||
val.at(utility::conversions::to_string_t(U("steam_server_app_id")));
|
||||
if (!fieldValue.is_null())
|
||||
{
|
||||
int32_t refVal_setSteamServerAppId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSteamServerAppId);
|
||||
setSteamServerAppId(refVal_setSteamServerAppId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("enable_servers"))))
|
||||
@ -330,7 +327,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
bool refVal_setEnableServers;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setEnableServers);
|
||||
setEnableServers(refVal_setEnableServers);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("rust_gamedig_id"))))
|
||||
@ -341,7 +337,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setRustGamedigId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRustGamedigId);
|
||||
setRustGamedigId(refVal_setRustGamedigId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("node_gamedig_id"))))
|
||||
@ -352,7 +347,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setNodeGamedigId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setNodeGamedigId);
|
||||
setNodeGamedigId(refVal_setNodeGamedigId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("server_connect_url"))))
|
||||
@ -363,7 +357,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setServerConnectUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setServerConnectUrl);
|
||||
setServerConnectUrl(refVal_setServerConnectUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("server_tags"))))
|
||||
@ -374,7 +367,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setServerTags;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setServerTags);
|
||||
setServerTags(refVal_setServerTags);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("id"))))
|
||||
@ -385,7 +377,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -396,7 +387,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -407,7 +397,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("type"))))
|
||||
@ -418,7 +407,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<ApplicationType> refVal_setType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
|
||||
setType(refVal_setType);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("organization_id"))))
|
||||
@ -429,7 +417,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setOrganizationId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId);
|
||||
setOrganizationId(refVal_setOrganizationId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("icon_url"))))
|
||||
@ -440,7 +427,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setIconUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl);
|
||||
setIconUrl(refVal_setIconUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -451,7 +437,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
@ -462,7 +447,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
@ -473,7 +457,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("parent_id"))))
|
||||
@ -484,7 +467,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setParentId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setParentId);
|
||||
setParentId(refVal_setParentId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("slug"))))
|
||||
@ -495,7 +477,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("visibility"))))
|
||||
@ -506,7 +487,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setVisibility;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility);
|
||||
setVisibility(refVal_setVisibility);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("password"))))
|
||||
@ -517,7 +497,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("primary"))))
|
||||
@ -528,7 +507,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPrimary;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary);
|
||||
setPrimary(refVal_setPrimary);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("user_count"))))
|
||||
@ -539,7 +517,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setUserCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount);
|
||||
setUserCount(refVal_setUserCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("achievement_count"))))
|
||||
@ -550,7 +527,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setAchievementCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount);
|
||||
setAchievementCount(refVal_setAchievementCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("badge_count"))))
|
||||
@ -561,7 +537,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setBadgeCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount);
|
||||
setBadgeCount(refVal_setBadgeCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("download_count"))))
|
||||
@ -572,7 +547,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -583,7 +557,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -594,7 +567,6 @@ bool Game::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -603,53 +575,65 @@ bool Game::fromJson(const web::json::value& val)
|
||||
void Game::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_Game_portIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_port")), m_Game_port));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_port")),
|
||||
m_Game_port));
|
||||
}
|
||||
if (m_Query_portIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query_port")), m_Query_port));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query_port")),
|
||||
m_Query_port));
|
||||
}
|
||||
if (m_Rcon_portIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rcon_port")), m_Rcon_port));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rcon_port")),
|
||||
m_Rcon_port));
|
||||
}
|
||||
if (m_Server_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
}
|
||||
if (m_Steam_app_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("steam_app_id")), m_Steam_app_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("steam_app_id")), m_Steam_app_id));
|
||||
}
|
||||
if (m_Steam_server_app_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("steam_server_app_id")), m_Steam_server_app_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("steam_server_app_id")), m_Steam_server_app_id));
|
||||
}
|
||||
if (m_Enable_serversIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("enable_servers")), m_Enable_servers));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("enable_servers")), m_Enable_servers));
|
||||
}
|
||||
if (m_Rust_gamedig_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rust_gamedig_id")), m_Rust_gamedig_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("rust_gamedig_id")), m_Rust_gamedig_id));
|
||||
}
|
||||
if (m_Node_gamedig_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("node_gamedig_id")), m_Node_gamedig_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("node_gamedig_id")), m_Node_gamedig_id));
|
||||
}
|
||||
if (m_Server_connect_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("server_connect_url")), m_Server_connect_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("server_connect_url")), m_Server_connect_url));
|
||||
}
|
||||
if (m_Server_tagsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("server_tags")), m_Server_tags));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("server_tags")), m_Server_tags));
|
||||
}
|
||||
if (m_IdIsSet)
|
||||
{
|
||||
@ -657,79 +641,98 @@ void Game::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utili
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_TypeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
}
|
||||
if (m_Organization_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("organization_id")), m_Organization_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("organization_id")), m_Organization_id));
|
||||
}
|
||||
if (m_Icon_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("icon_url")), m_Icon_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("icon_url")),
|
||||
m_Icon_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Capsule_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
}
|
||||
if (m_Library_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
}
|
||||
if (m_Parent_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("parent_id")), m_Parent_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("parent_id")),
|
||||
m_Parent_id));
|
||||
}
|
||||
if (m_SlugIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
}
|
||||
if (m_VisibilityIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("visibility")), m_Visibility));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("visibility")),
|
||||
m_Visibility));
|
||||
}
|
||||
if (m_PasswordIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")), m_Password));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")),
|
||||
m_Password));
|
||||
}
|
||||
if (m_PrimaryIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("primary")), m_Primary));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("primary")), m_Primary));
|
||||
}
|
||||
if (m_User_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_count")), m_User_count));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user_count")),
|
||||
m_User_count));
|
||||
}
|
||||
if (m_Achievement_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("achievement_count")), m_Achievement_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("achievement_count")), m_Achievement_count));
|
||||
}
|
||||
if (m_Badge_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("badge_count")), m_Badge_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("badge_count")), m_Badge_count));
|
||||
}
|
||||
if (m_Download_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -737,7 +740,8 @@ bool Game::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const uti
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -745,193 +749,233 @@ bool Game::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const uti
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_port"))))
|
||||
{
|
||||
int32_t refVal_setGamePort;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_port"))), refVal_setGamePort );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("game_port"))), refVal_setGamePort);
|
||||
setGamePort(refVal_setGamePort);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("query_port"))))
|
||||
{
|
||||
int32_t refVal_setQueryPort;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query_port"))), refVal_setQueryPort );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("query_port"))), refVal_setQueryPort);
|
||||
setQueryPort(refVal_setQueryPort);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("rcon_port"))))
|
||||
{
|
||||
int32_t refVal_setRconPort;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rcon_port"))), refVal_setRconPort );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("rcon_port"))), refVal_setRconPort);
|
||||
setRconPort(refVal_setRconPort);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
|
||||
{
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("steam_app_id"))))
|
||||
{
|
||||
int32_t refVal_setSteamAppId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("steam_app_id"))), refVal_setSteamAppId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("steam_app_id"))), refVal_setSteamAppId);
|
||||
setSteamAppId(refVal_setSteamAppId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("steam_server_app_id"))))
|
||||
{
|
||||
int32_t refVal_setSteamServerAppId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("steam_server_app_id"))), refVal_setSteamServerAppId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("steam_server_app_id"))),
|
||||
refVal_setSteamServerAppId);
|
||||
setSteamServerAppId(refVal_setSteamServerAppId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("enable_servers"))))
|
||||
{
|
||||
bool refVal_setEnableServers;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("enable_servers"))), refVal_setEnableServers );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("enable_servers"))),
|
||||
refVal_setEnableServers);
|
||||
setEnableServers(refVal_setEnableServers);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("rust_gamedig_id"))))
|
||||
{
|
||||
utility::string_t refVal_setRustGamedigId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rust_gamedig_id"))), refVal_setRustGamedigId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("rust_gamedig_id"))),
|
||||
refVal_setRustGamedigId);
|
||||
setRustGamedigId(refVal_setRustGamedigId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("node_gamedig_id"))))
|
||||
{
|
||||
utility::string_t refVal_setNodeGamedigId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("node_gamedig_id"))), refVal_setNodeGamedigId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("node_gamedig_id"))),
|
||||
refVal_setNodeGamedigId);
|
||||
setNodeGamedigId(refVal_setNodeGamedigId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("server_connect_url"))))
|
||||
{
|
||||
utility::string_t refVal_setServerConnectUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_connect_url"))), refVal_setServerConnectUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("server_connect_url"))),
|
||||
refVal_setServerConnectUrl);
|
||||
setServerConnectUrl(refVal_setServerConnectUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("server_tags"))))
|
||||
{
|
||||
utility::string_t refVal_setServerTags;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_tags"))), refVal_setServerTags );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("server_tags"))), refVal_setServerTags);
|
||||
setServerTags(refVal_setServerTags);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
|
||||
{
|
||||
std::shared_ptr<ApplicationType> refVal_setType;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))),
|
||||
refVal_setType);
|
||||
setType(refVal_setType);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id"))))
|
||||
{
|
||||
utility::string_t refVal_setOrganizationId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("organization_id"))), refVal_setOrganizationId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("organization_id"))),
|
||||
refVal_setOrganizationId);
|
||||
setOrganizationId(refVal_setOrganizationId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url"))))
|
||||
{
|
||||
utility::string_t refVal_setIconUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("icon_url"))), refVal_setIconUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("icon_url"))), refVal_setIconUrl);
|
||||
setIconUrl(refVal_setIconUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))), refVal_setCapsuleImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))),
|
||||
refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))), refVal_setLibraryImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))),
|
||||
refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id"))))
|
||||
{
|
||||
utility::string_t refVal_setParentId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("parent_id"))), refVal_setParentId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("parent_id"))), refVal_setParentId);
|
||||
setParentId(refVal_setParentId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
|
||||
{
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))), refVal_setSlug );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))),
|
||||
refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("visibility"))))
|
||||
{
|
||||
int32_t refVal_setVisibility;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("visibility"))), refVal_setVisibility );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("visibility"))), refVal_setVisibility);
|
||||
setVisibility(refVal_setVisibility);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
|
||||
{
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("primary"))))
|
||||
{
|
||||
int32_t refVal_setPrimary;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("primary"))), refVal_setPrimary );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("primary"))),
|
||||
refVal_setPrimary);
|
||||
setPrimary(refVal_setPrimary);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("user_count"))))
|
||||
{
|
||||
int32_t refVal_setUserCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_count"))), refVal_setUserCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("user_count"))), refVal_setUserCount);
|
||||
setUserCount(refVal_setUserCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count"))))
|
||||
{
|
||||
int32_t refVal_setAchievementCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("achievement_count"))), refVal_setAchievementCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("achievement_count"))),
|
||||
refVal_setAchievementCount);
|
||||
setAchievementCount(refVal_setAchievementCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count"))))
|
||||
{
|
||||
int32_t refVal_setBadgeCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("badge_count"))), refVal_setBadgeCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("badge_count"))), refVal_setBadgeCount);
|
||||
setBadgeCount(refVal_setBadgeCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
|
||||
{
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("download_count"))), refVal_setDownloadCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("download_count"))),
|
||||
refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
int32_t Game::getGamePort() const
|
||||
{
|
||||
return m_Game_port;
|
||||
@ -1077,7 +1121,6 @@ utility::string_t Game::getRustGamedigId() const
|
||||
return m_Rust_gamedig_id;
|
||||
}
|
||||
|
||||
|
||||
void Game::setRustGamedigId(const utility::string_t &value)
|
||||
{
|
||||
m_Rust_gamedig_id = value;
|
||||
@ -1098,7 +1141,6 @@ utility::string_t Game::getNodeGamedigId() const
|
||||
return m_Node_gamedig_id;
|
||||
}
|
||||
|
||||
|
||||
void Game::setNodeGamedigId(const utility::string_t &value)
|
||||
{
|
||||
m_Node_gamedig_id = value;
|
||||
@ -1119,7 +1161,6 @@ utility::string_t Game::getServerConnectUrl() const
|
||||
return m_Server_connect_url;
|
||||
}
|
||||
|
||||
|
||||
void Game::setServerConnectUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Server_connect_url = value;
|
||||
@ -1140,7 +1181,6 @@ utility::string_t Game::getServerTags() const
|
||||
return m_Server_tags;
|
||||
}
|
||||
|
||||
|
||||
void Game::setServerTags(const utility::string_t &value)
|
||||
{
|
||||
m_Server_tags = value;
|
||||
@ -1161,7 +1201,6 @@ utility::string_t Game::getId() const
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Game::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -1182,7 +1221,6 @@ utility::string_t Game::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Game::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -1203,7 +1241,6 @@ utility::string_t Game::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void Game::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -1224,7 +1261,6 @@ std::shared_ptr<ApplicationType> Game::getType() const
|
||||
return m_Type;
|
||||
}
|
||||
|
||||
|
||||
void Game::setType(const std::shared_ptr<ApplicationType> &value)
|
||||
{
|
||||
m_Type = value;
|
||||
@ -1245,7 +1281,6 @@ utility::string_t Game::getOrganizationId() const
|
||||
return m_Organization_id;
|
||||
}
|
||||
|
||||
|
||||
void Game::setOrganizationId(const utility::string_t &value)
|
||||
{
|
||||
m_Organization_id = value;
|
||||
@ -1266,7 +1301,6 @@ utility::string_t Game::getIconUrl() const
|
||||
return m_Icon_url;
|
||||
}
|
||||
|
||||
|
||||
void Game::setIconUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Icon_url = value;
|
||||
@ -1287,7 +1321,6 @@ utility::string_t Game::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void Game::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -1308,7 +1341,6 @@ utility::string_t Game::getCapsuleImageUrl() const
|
||||
return m_Capsule_image_url;
|
||||
}
|
||||
|
||||
|
||||
void Game::setCapsuleImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Capsule_image_url = value;
|
||||
@ -1329,7 +1361,6 @@ utility::string_t Game::getLibraryImageUrl() const
|
||||
return m_Library_image_url;
|
||||
}
|
||||
|
||||
|
||||
void Game::setLibraryImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Library_image_url = value;
|
||||
@ -1350,7 +1381,6 @@ utility::string_t Game::getParentId() const
|
||||
return m_Parent_id;
|
||||
}
|
||||
|
||||
|
||||
void Game::setParentId(const utility::string_t &value)
|
||||
{
|
||||
m_Parent_id = value;
|
||||
@ -1371,7 +1401,6 @@ utility::string_t Game::getSlug() const
|
||||
return m_Slug;
|
||||
}
|
||||
|
||||
|
||||
void Game::setSlug(const utility::string_t &value)
|
||||
{
|
||||
m_Slug = value;
|
||||
@ -1412,7 +1441,6 @@ utility::string_t Game::getPassword() const
|
||||
return m_Password;
|
||||
}
|
||||
|
||||
|
||||
void Game::setPassword(const utility::string_t &value)
|
||||
{
|
||||
m_Password = value;
|
||||
@ -1533,7 +1561,6 @@ utility::datetime Game::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Game::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -1554,7 +1581,6 @@ utility::datetime Game::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Game::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -1573,5 +1599,3 @@ void Game::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GameServer.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
GameServer::GameServer()
|
||||
{
|
||||
@ -264,7 +264,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -275,7 +274,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -286,7 +284,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("address"))))
|
||||
@ -297,7 +294,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setAddress;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAddress);
|
||||
setAddress(refVal_setAddress);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("game_port"))))
|
||||
@ -308,7 +304,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setGamePort;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort);
|
||||
setGamePort(refVal_setGamePort);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("query_port"))))
|
||||
@ -319,7 +314,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setQueryPort;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort);
|
||||
setQueryPort(refVal_setQueryPort);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("game_id"))))
|
||||
@ -330,7 +324,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("game_icon_url"))))
|
||||
@ -341,7 +334,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setGameIconUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGameIconUrl);
|
||||
setGameIconUrl(refVal_setGameIconUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("version"))))
|
||||
@ -352,7 +344,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setVersion;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("featured"))))
|
||||
@ -363,7 +354,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
bool refVal_setFeatured;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setFeatured);
|
||||
setFeatured(refVal_setFeatured);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("cluster_id"))))
|
||||
@ -374,7 +364,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setClusterId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setClusterId);
|
||||
setClusterId(refVal_setClusterId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("website_url"))))
|
||||
@ -385,7 +374,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setWebsiteUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl);
|
||||
setWebsiteUrl(refVal_setWebsiteUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -396,7 +384,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("owner_id"))))
|
||||
@ -407,7 +394,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("uptime"))))
|
||||
@ -418,7 +404,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
double refVal_setUptime;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUptime);
|
||||
setUptime(refVal_setUptime);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("status"))))
|
||||
@ -429,7 +414,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<ServerStatus> refVal_setStatus;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setStatus);
|
||||
setStatus(refVal_setStatus);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("ping"))))
|
||||
@ -440,7 +424,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPing;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPing);
|
||||
setPing(refVal_setPing);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("map"))))
|
||||
@ -451,7 +434,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setMap;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMap);
|
||||
setMap(refVal_setMap);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("used_slots"))))
|
||||
@ -462,7 +444,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setUsedSlots;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUsedSlots);
|
||||
setUsedSlots(refVal_setUsedSlots);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("max_slots"))))
|
||||
@ -473,7 +454,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setMaxSlots;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMaxSlots);
|
||||
setMaxSlots(refVal_setMaxSlots);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("motd"))))
|
||||
@ -484,7 +464,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setMotd;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMotd);
|
||||
setMotd(refVal_setMotd);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("players"))))
|
||||
@ -495,7 +474,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPlayers;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPlayers);
|
||||
setPlayers(refVal_setPlayers);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_online"))))
|
||||
@ -506,7 +484,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("country"))))
|
||||
@ -517,7 +494,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCountry;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCountry);
|
||||
setCountry(refVal_setCountry);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("steam"))))
|
||||
@ -528,7 +504,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
bool refVal_setSteam;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSteam);
|
||||
setSteam(refVal_setSteam);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("discord_server_id"))))
|
||||
@ -539,7 +514,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDiscordServerId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId);
|
||||
setDiscordServerId(refVal_setDiscordServerId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("youtube_video_url"))))
|
||||
@ -550,7 +524,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setYoutubeVideoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl);
|
||||
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("tags"))))
|
||||
@ -561,7 +534,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTags;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTags);
|
||||
setTags(refVal_setTags);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("comment_count"))))
|
||||
@ -572,7 +544,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setCommentCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount);
|
||||
setCommentCount(refVal_setCommentCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -583,7 +554,6 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -594,16 +564,17 @@ bool GameServer::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void GameServer::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void GameServer::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -613,123 +584,153 @@ void GameServer::toMultipart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_AddressIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address));
|
||||
}
|
||||
if (m_Game_portIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_port")), m_Game_port));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_port")),
|
||||
m_Game_port));
|
||||
}
|
||||
if (m_Query_portIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query_port")), m_Query_port));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query_port")),
|
||||
m_Query_port));
|
||||
}
|
||||
if (m_Game_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
}
|
||||
if (m_Game_icon_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_icon_url")), m_Game_icon_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("game_icon_url")), m_Game_icon_url));
|
||||
}
|
||||
if (m_VersionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
}
|
||||
if (m_FeaturedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("featured")), m_Featured));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("featured")),
|
||||
m_Featured));
|
||||
}
|
||||
if (m_Cluster_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("cluster_id")), m_Cluster_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("cluster_id")),
|
||||
m_Cluster_id));
|
||||
}
|
||||
if (m_Website_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("website_url")), m_Website_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("website_url")), m_Website_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Owner_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")), m_Owner_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")),
|
||||
m_Owner_id));
|
||||
}
|
||||
if (m_UptimeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uptime")), m_Uptime));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uptime")), m_Uptime));
|
||||
}
|
||||
if (m_StatusIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("status")), m_Status));
|
||||
}
|
||||
if (m_PingIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ping")), m_Ping));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("ping")), m_Ping));
|
||||
}
|
||||
if (m_mapIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("map")), m_map));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("map")), m_map));
|
||||
}
|
||||
if (m_Used_slotsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("used_slots")), m_Used_slots));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("used_slots")),
|
||||
m_Used_slots));
|
||||
}
|
||||
if (m_Max_slotsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("max_slots")), m_Max_slots));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("max_slots")),
|
||||
m_Max_slots));
|
||||
}
|
||||
if (m_MotdIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("motd")), m_Motd));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("motd")), m_Motd));
|
||||
}
|
||||
if (m_PlayersIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("players")), m_Players));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("players")), m_Players));
|
||||
}
|
||||
if (m_Last_onlineIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
}
|
||||
if (m_CountryIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country")), m_Country));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country")), m_Country));
|
||||
}
|
||||
if (m_SteamIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("steam")), m_Steam));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("steam")), m_Steam));
|
||||
}
|
||||
if (m_Discord_server_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("discord_server_id")), m_Discord_server_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("discord_server_id")), m_Discord_server_id));
|
||||
}
|
||||
if (m_Youtube_video_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("youtube_video_url")), m_Youtube_video_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("youtube_video_url")), m_Youtube_video_url));
|
||||
}
|
||||
if (m_TagsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags));
|
||||
}
|
||||
if (m_Comment_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("comment_count")), m_Comment_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("comment_count")), m_Comment_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -737,7 +738,8 @@ bool GameServer::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, con
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -745,199 +747,232 @@ bool GameServer::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, con
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("address"))))
|
||||
{
|
||||
utility::string_t refVal_setAddress;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))),
|
||||
refVal_setAddress);
|
||||
setAddress(refVal_setAddress);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_port"))))
|
||||
{
|
||||
int32_t refVal_setGamePort;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_port"))), refVal_setGamePort );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("game_port"))), refVal_setGamePort);
|
||||
setGamePort(refVal_setGamePort);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("query_port"))))
|
||||
{
|
||||
int32_t refVal_setQueryPort;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query_port"))), refVal_setQueryPort );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("query_port"))), refVal_setQueryPort);
|
||||
setQueryPort(refVal_setQueryPort);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
|
||||
{
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))), refVal_setGameId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))),
|
||||
refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_icon_url"))))
|
||||
{
|
||||
utility::string_t refVal_setGameIconUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_icon_url"))), refVal_setGameIconUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("game_icon_url"))),
|
||||
refVal_setGameIconUrl);
|
||||
setGameIconUrl(refVal_setGameIconUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
|
||||
{
|
||||
utility::string_t refVal_setVersion;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))), refVal_setVersion );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))),
|
||||
refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("featured"))))
|
||||
{
|
||||
bool refVal_setFeatured;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("featured"))), refVal_setFeatured );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("featured"))), refVal_setFeatured);
|
||||
setFeatured(refVal_setFeatured);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("cluster_id"))))
|
||||
{
|
||||
utility::string_t refVal_setClusterId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("cluster_id"))), refVal_setClusterId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("cluster_id"))), refVal_setClusterId);
|
||||
setClusterId(refVal_setClusterId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("website_url"))))
|
||||
{
|
||||
utility::string_t refVal_setWebsiteUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("website_url"))), refVal_setWebsiteUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("website_url"))), refVal_setWebsiteUrl);
|
||||
setWebsiteUrl(refVal_setWebsiteUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
|
||||
{
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uptime"))))
|
||||
{
|
||||
double refVal_setUptime;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uptime"))), refVal_setUptime );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uptime"))),
|
||||
refVal_setUptime);
|
||||
setUptime(refVal_setUptime);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("status"))))
|
||||
{
|
||||
std::shared_ptr<ServerStatus> refVal_setStatus;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))),
|
||||
refVal_setStatus);
|
||||
setStatus(refVal_setStatus);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("ping"))))
|
||||
{
|
||||
int32_t refVal_setPing;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ping"))), refVal_setPing );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("ping"))),
|
||||
refVal_setPing);
|
||||
setPing(refVal_setPing);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("map"))))
|
||||
{
|
||||
utility::string_t refVal_setMap;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("map"))), refVal_setMap );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("map"))),
|
||||
refVal_setMap);
|
||||
setMap(refVal_setMap);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("used_slots"))))
|
||||
{
|
||||
int32_t refVal_setUsedSlots;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("used_slots"))), refVal_setUsedSlots );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("used_slots"))), refVal_setUsedSlots);
|
||||
setUsedSlots(refVal_setUsedSlots);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("max_slots"))))
|
||||
{
|
||||
int32_t refVal_setMaxSlots;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("max_slots"))), refVal_setMaxSlots );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("max_slots"))), refVal_setMaxSlots);
|
||||
setMaxSlots(refVal_setMaxSlots);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("motd"))))
|
||||
{
|
||||
utility::string_t refVal_setMotd;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("motd"))), refVal_setMotd );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("motd"))),
|
||||
refVal_setMotd);
|
||||
setMotd(refVal_setMotd);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("players"))))
|
||||
{
|
||||
utility::string_t refVal_setPlayers;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("players"))), refVal_setPlayers );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("players"))),
|
||||
refVal_setPlayers);
|
||||
setPlayers(refVal_setPlayers);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
|
||||
{
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("country"))))
|
||||
{
|
||||
utility::string_t refVal_setCountry;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country"))), refVal_setCountry );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country"))),
|
||||
refVal_setCountry);
|
||||
setCountry(refVal_setCountry);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("steam"))))
|
||||
{
|
||||
bool refVal_setSteam;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("steam"))), refVal_setSteam );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("steam"))),
|
||||
refVal_setSteam);
|
||||
setSteam(refVal_setSteam);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id"))))
|
||||
{
|
||||
utility::string_t refVal_setDiscordServerId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("discord_server_id"))), refVal_setDiscordServerId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("discord_server_id"))),
|
||||
refVal_setDiscordServerId);
|
||||
setDiscordServerId(refVal_setDiscordServerId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url"))))
|
||||
{
|
||||
utility::string_t refVal_setYoutubeVideoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("youtube_video_url"))), refVal_setYoutubeVideoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("youtube_video_url"))),
|
||||
refVal_setYoutubeVideoUrl);
|
||||
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("tags"))))
|
||||
{
|
||||
utility::string_t refVal_setTags;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_setTags );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))),
|
||||
refVal_setTags);
|
||||
setTags(refVal_setTags);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count"))))
|
||||
{
|
||||
int32_t refVal_setCommentCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("comment_count"))), refVal_setCommentCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("comment_count"))),
|
||||
refVal_setCommentCount);
|
||||
setCommentCount(refVal_setCommentCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t GameServer::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -958,7 +993,6 @@ utility::string_t GameServer::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -979,7 +1013,6 @@ utility::string_t GameServer::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -1000,7 +1033,6 @@ utility::string_t GameServer::getAddress() const
|
||||
return m_Address;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setAddress(const utility::string_t &value)
|
||||
{
|
||||
m_Address = value;
|
||||
@ -1061,7 +1093,6 @@ utility::string_t GameServer::getGameId() const
|
||||
return m_Game_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setGameId(const utility::string_t &value)
|
||||
{
|
||||
m_Game_id = value;
|
||||
@ -1082,7 +1113,6 @@ utility::string_t GameServer::getGameIconUrl() const
|
||||
return m_Game_icon_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setGameIconUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Game_icon_url = value;
|
||||
@ -1103,7 +1133,6 @@ utility::string_t GameServer::getVersion() const
|
||||
return m_Version;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setVersion(const utility::string_t &value)
|
||||
{
|
||||
m_Version = value;
|
||||
@ -1144,7 +1173,6 @@ utility::string_t GameServer::getClusterId() const
|
||||
return m_Cluster_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setClusterId(const utility::string_t &value)
|
||||
{
|
||||
m_Cluster_id = value;
|
||||
@ -1165,7 +1193,6 @@ utility::string_t GameServer::getWebsiteUrl() const
|
||||
return m_Website_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setWebsiteUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Website_url = value;
|
||||
@ -1186,7 +1213,6 @@ utility::string_t GameServer::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -1207,7 +1233,6 @@ utility::string_t GameServer::getOwnerId() const
|
||||
return m_Owner_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setOwnerId(const utility::string_t &value)
|
||||
{
|
||||
m_Owner_id = value;
|
||||
@ -1248,7 +1273,6 @@ std::shared_ptr<ServerStatus> GameServer::getStatus() const
|
||||
return m_Status;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setStatus(const std::shared_ptr<ServerStatus> &value)
|
||||
{
|
||||
m_Status = value;
|
||||
@ -1289,7 +1313,6 @@ utility::string_t GameServer::getMap() const
|
||||
return m_map;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setMap(const utility::string_t &value)
|
||||
{
|
||||
m_map = value;
|
||||
@ -1350,7 +1373,6 @@ utility::string_t GameServer::getMotd() const
|
||||
return m_Motd;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setMotd(const utility::string_t &value)
|
||||
{
|
||||
m_Motd = value;
|
||||
@ -1371,7 +1393,6 @@ utility::string_t GameServer::getPlayers() const
|
||||
return m_Players;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setPlayers(const utility::string_t &value)
|
||||
{
|
||||
m_Players = value;
|
||||
@ -1392,7 +1413,6 @@ utility::datetime GameServer::getLastOnline() const
|
||||
return m_Last_online;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setLastOnline(const utility::datetime &value)
|
||||
{
|
||||
m_Last_online = value;
|
||||
@ -1413,7 +1433,6 @@ utility::string_t GameServer::getCountry() const
|
||||
return m_Country;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setCountry(const utility::string_t &value)
|
||||
{
|
||||
m_Country = value;
|
||||
@ -1454,7 +1473,6 @@ utility::string_t GameServer::getDiscordServerId() const
|
||||
return m_Discord_server_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setDiscordServerId(const utility::string_t &value)
|
||||
{
|
||||
m_Discord_server_id = value;
|
||||
@ -1475,7 +1493,6 @@ utility::string_t GameServer::getYoutubeVideoUrl() const
|
||||
return m_Youtube_video_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setYoutubeVideoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Youtube_video_url = value;
|
||||
@ -1496,7 +1513,6 @@ utility::string_t GameServer::getTags() const
|
||||
return m_Tags;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setTags(const utility::string_t &value)
|
||||
{
|
||||
m_Tags = value;
|
||||
@ -1537,7 +1553,6 @@ utility::datetime GameServer::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -1558,7 +1573,6 @@ utility::datetime GameServer::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void GameServer::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -1577,5 +1591,3 @@ void GameServer::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GameServerCluster.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
GameServerCluster::GameServerCluster()
|
||||
{
|
||||
@ -146,7 +146,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -157,7 +156,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -168,7 +166,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("game_id"))))
|
||||
@ -179,7 +176,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("website_url"))))
|
||||
@ -190,7 +186,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setWebsiteUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl);
|
||||
setWebsiteUrl(refVal_setWebsiteUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -201,7 +196,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("owner_id"))))
|
||||
@ -212,7 +206,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("discord_server_id"))))
|
||||
@ -223,7 +216,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDiscordServerId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId);
|
||||
setDiscordServerId(refVal_setDiscordServerId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("youtube_video_url"))))
|
||||
@ -234,7 +226,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setYoutubeVideoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl);
|
||||
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("tags"))))
|
||||
@ -245,7 +236,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTags;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTags);
|
||||
setTags(refVal_setTags);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("comment_count"))))
|
||||
@ -256,7 +246,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setCommentCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount);
|
||||
setCommentCount(refVal_setCommentCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("server_count"))))
|
||||
@ -267,7 +256,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -278,7 +266,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -289,16 +276,17 @@ bool GameServerCluster::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void GameServerCluster::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void GameServerCluster::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -308,63 +296,78 @@ void GameServerCluster::toMultipart(std::shared_ptr<MultipartFormData> multipart
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_Game_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
}
|
||||
if (m_Website_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("website_url")), m_Website_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("website_url")), m_Website_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Owner_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")), m_Owner_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")),
|
||||
m_Owner_id));
|
||||
}
|
||||
if (m_Discord_server_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("discord_server_id")), m_Discord_server_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("discord_server_id")), m_Discord_server_id));
|
||||
}
|
||||
if (m_Youtube_video_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("youtube_video_url")), m_Youtube_video_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("youtube_video_url")), m_Youtube_video_url));
|
||||
}
|
||||
if (m_TagsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tags")), m_Tags));
|
||||
}
|
||||
if (m_Comment_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("comment_count")), m_Comment_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("comment_count")), m_Comment_count));
|
||||
}
|
||||
if (m_Server_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
bool GameServerCluster::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool GameServerCluster::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -372,97 +375,112 @@ bool GameServerCluster::fromMultiPart(std::shared_ptr<MultipartFormData> multipa
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
|
||||
{
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))), refVal_setGameId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))),
|
||||
refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("website_url"))))
|
||||
{
|
||||
utility::string_t refVal_setWebsiteUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("website_url"))), refVal_setWebsiteUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("website_url"))), refVal_setWebsiteUrl);
|
||||
setWebsiteUrl(refVal_setWebsiteUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
|
||||
{
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id"))))
|
||||
{
|
||||
utility::string_t refVal_setDiscordServerId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("discord_server_id"))), refVal_setDiscordServerId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("discord_server_id"))),
|
||||
refVal_setDiscordServerId);
|
||||
setDiscordServerId(refVal_setDiscordServerId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url"))))
|
||||
{
|
||||
utility::string_t refVal_setYoutubeVideoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("youtube_video_url"))), refVal_setYoutubeVideoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("youtube_video_url"))),
|
||||
refVal_setYoutubeVideoUrl);
|
||||
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("tags"))))
|
||||
{
|
||||
utility::string_t refVal_setTags;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_setTags );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))),
|
||||
refVal_setTags);
|
||||
setTags(refVal_setTags);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count"))))
|
||||
{
|
||||
int32_t refVal_setCommentCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("comment_count"))), refVal_setCommentCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("comment_count"))),
|
||||
refVal_setCommentCount);
|
||||
setCommentCount(refVal_setCommentCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
|
||||
{
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t GameServerCluster::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -483,7 +501,6 @@ utility::string_t GameServerCluster::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -504,7 +521,6 @@ utility::string_t GameServerCluster::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -525,7 +541,6 @@ utility::string_t GameServerCluster::getGameId() const
|
||||
return m_Game_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setGameId(const utility::string_t &value)
|
||||
{
|
||||
m_Game_id = value;
|
||||
@ -546,7 +561,6 @@ utility::string_t GameServerCluster::getWebsiteUrl() const
|
||||
return m_Website_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setWebsiteUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Website_url = value;
|
||||
@ -567,7 +581,6 @@ utility::string_t GameServerCluster::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -588,7 +601,6 @@ utility::string_t GameServerCluster::getOwnerId() const
|
||||
return m_Owner_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setOwnerId(const utility::string_t &value)
|
||||
{
|
||||
m_Owner_id = value;
|
||||
@ -609,7 +621,6 @@ utility::string_t GameServerCluster::getDiscordServerId() const
|
||||
return m_Discord_server_id;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setDiscordServerId(const utility::string_t &value)
|
||||
{
|
||||
m_Discord_server_id = value;
|
||||
@ -630,7 +641,6 @@ utility::string_t GameServerCluster::getYoutubeVideoUrl() const
|
||||
return m_Youtube_video_url;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setYoutubeVideoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Youtube_video_url = value;
|
||||
@ -651,7 +661,6 @@ utility::string_t GameServerCluster::getTags() const
|
||||
return m_Tags;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setTags(const utility::string_t &value)
|
||||
{
|
||||
m_Tags = value;
|
||||
@ -712,7 +721,6 @@ utility::datetime GameServerCluster::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -733,7 +741,6 @@ utility::datetime GameServerCluster::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void GameServerCluster::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -752,5 +759,3 @@ void GameServerCluster::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GrantType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -122,5 +122,3 @@ void GrantType::setValue(GrantType::eGrantType const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Group.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Group::Group()
|
||||
{
|
||||
@ -160,7 +160,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
|
||||
@ -171,7 +170,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -182,7 +180,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("tag"))))
|
||||
@ -193,7 +190,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTag;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTag);
|
||||
setTag(refVal_setTag);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -204,7 +200,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("type"))))
|
||||
@ -215,7 +210,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
|
||||
setType(refVal_setType);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("privacy"))))
|
||||
@ -226,7 +220,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPrivacy;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy);
|
||||
setPrivacy(refVal_setPrivacy);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("owner_id"))))
|
||||
@ -237,7 +230,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("verified"))))
|
||||
@ -248,7 +240,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
|
||||
@ -259,7 +250,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -270,7 +260,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("member_count"))))
|
||||
@ -281,7 +270,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setMemberCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount);
|
||||
setMemberCount(refVal_setMemberCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("follower_count"))))
|
||||
@ -292,7 +280,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setFollowerCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setFollowerCount);
|
||||
setFollowerCount(refVal_setFollowerCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("view_count"))))
|
||||
@ -303,7 +290,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setViewCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount);
|
||||
setViewCount(refVal_setViewCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -314,7 +300,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -325,7 +310,6 @@ bool Group::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -334,7 +318,8 @@ bool Group::fromJson(const web::json::value& val)
|
||||
void Group::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -344,63 +329,78 @@ void Group::toMultipart(std::shared_ptr<MultipartFormData> multipart, const util
|
||||
}
|
||||
if (m_UuidIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_TagIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tag")), m_Tag));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tag")), m_Tag));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_TypeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
}
|
||||
if (m_PrivacyIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("privacy")), m_Privacy));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("privacy")), m_Privacy));
|
||||
}
|
||||
if (m_Owner_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")), m_Owner_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("owner_id")),
|
||||
m_Owner_id));
|
||||
}
|
||||
if (m_VerifiedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")), m_Verified));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")),
|
||||
m_Verified));
|
||||
}
|
||||
if (m_Photo_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")), m_Photo_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")),
|
||||
m_Photo_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Member_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("member_count")), m_Member_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("member_count")), m_Member_count));
|
||||
}
|
||||
if (m_Follower_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("follower_count")), m_Follower_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("follower_count")), m_Follower_count));
|
||||
}
|
||||
if (m_View_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("view_count")), m_View_count));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("view_count")),
|
||||
m_View_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -408,7 +408,8 @@ bool Group::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -416,109 +417,124 @@ bool Group::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
|
||||
{
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
|
||||
refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
|
||||
{
|
||||
utility::string_t refVal_setTag;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))), refVal_setTag );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))),
|
||||
refVal_setTag);
|
||||
setTag(refVal_setTag);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
|
||||
{
|
||||
int32_t refVal_setType;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))),
|
||||
refVal_setType);
|
||||
setType(refVal_setType);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
|
||||
{
|
||||
int32_t refVal_setPrivacy;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))), refVal_setPrivacy );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))),
|
||||
refVal_setPrivacy);
|
||||
setPrivacy(refVal_setPrivacy);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
|
||||
{
|
||||
utility::string_t refVal_setOwnerId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("owner_id"))), refVal_setOwnerId);
|
||||
setOwnerId(refVal_setOwnerId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
|
||||
{
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
|
||||
{
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
|
||||
{
|
||||
int32_t refVal_setMemberCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount);
|
||||
setMemberCount(refVal_setMemberCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("follower_count"))))
|
||||
{
|
||||
int32_t refVal_setFollowerCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("follower_count"))), refVal_setFollowerCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("follower_count"))),
|
||||
refVal_setFollowerCount);
|
||||
setFollowerCount(refVal_setFollowerCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("view_count"))))
|
||||
{
|
||||
int32_t refVal_setViewCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("view_count"))), refVal_setViewCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("view_count"))), refVal_setViewCount);
|
||||
setViewCount(refVal_setViewCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Group::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Group::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -539,7 +555,6 @@ utility::string_t Group::getUuid() const
|
||||
return m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
void Group::setUuid(const utility::string_t &value)
|
||||
{
|
||||
m_Uuid = value;
|
||||
@ -560,7 +575,6 @@ utility::string_t Group::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Group::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -581,7 +595,6 @@ utility::string_t Group::getTag() const
|
||||
return m_Tag;
|
||||
}
|
||||
|
||||
|
||||
void Group::setTag(const utility::string_t &value)
|
||||
{
|
||||
m_Tag = value;
|
||||
@ -602,7 +615,6 @@ utility::string_t Group::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void Group::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -663,7 +675,6 @@ utility::string_t Group::getOwnerId() const
|
||||
return m_Owner_id;
|
||||
}
|
||||
|
||||
|
||||
void Group::setOwnerId(const utility::string_t &value)
|
||||
{
|
||||
m_Owner_id = value;
|
||||
@ -704,7 +715,6 @@ utility::string_t Group::getPhotoUrl() const
|
||||
return m_Photo_url;
|
||||
}
|
||||
|
||||
|
||||
void Group::setPhotoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Photo_url = value;
|
||||
@ -725,7 +735,6 @@ utility::string_t Group::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void Group::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -806,7 +815,6 @@ utility::datetime Group::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Group::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -827,7 +835,6 @@ utility::datetime Group::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Group::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -846,5 +853,3 @@ void Group::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GroupGame.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
GroupGame::GroupGame()
|
||||
{
|
||||
@ -94,7 +94,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setGroupId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGroupId);
|
||||
setGroupId(refVal_setGroupId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("group"))))
|
||||
@ -105,7 +104,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<Group> refVal_setGroup;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGroup);
|
||||
setGroup(refVal_setGroup);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("application_id"))))
|
||||
@ -116,7 +114,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setApplicationId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setApplicationId);
|
||||
setApplicationId(refVal_setApplicationId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("application"))))
|
||||
@ -127,7 +124,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<Application> refVal_setApplication;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setApplication);
|
||||
setApplication(refVal_setApplication);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("stats"))))
|
||||
@ -138,7 +134,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<AnyType> refVal_setStats;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
|
||||
setStats(refVal_setStats);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("acquired"))))
|
||||
@ -149,7 +144,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setAcquired;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
|
||||
setAcquired(refVal_setAcquired);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_used"))))
|
||||
@ -160,7 +154,6 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastUsed;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
|
||||
setLastUsed(refVal_setLastUsed);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -169,37 +162,45 @@ bool GroupGame::fromJson(const web::json::value& val)
|
||||
void GroupGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_Group_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("group_id")), m_Group_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("group_id")),
|
||||
m_Group_id));
|
||||
}
|
||||
if (m_GroupIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("group")), m_Group));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("group")), m_Group));
|
||||
}
|
||||
if (m_Application_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("application_id")), m_Application_id));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("application_id")), m_Application_id));
|
||||
}
|
||||
if (m_ApplicationIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("application")), m_Application));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("application")), m_Application));
|
||||
}
|
||||
if (m_StatsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("stats")), m_Stats));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("stats")), m_Stats));
|
||||
}
|
||||
if (m_AcquiredIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("acquired")), m_Acquired));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("acquired")),
|
||||
m_Acquired));
|
||||
}
|
||||
if (m_Last_usedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_used")), m_Last_used));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_used")),
|
||||
m_Last_used));
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,7 +208,8 @@ bool GroupGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -215,55 +217,61 @@ bool GroupGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("group_id"))))
|
||||
{
|
||||
utility::string_t refVal_setGroupId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group_id"))), refVal_setGroupId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("group_id"))), refVal_setGroupId);
|
||||
setGroupId(refVal_setGroupId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("group"))))
|
||||
{
|
||||
std::shared_ptr<Group> refVal_setGroup;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group"))), refVal_setGroup );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group"))),
|
||||
refVal_setGroup);
|
||||
setGroup(refVal_setGroup);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("application_id"))))
|
||||
{
|
||||
utility::string_t refVal_setApplicationId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("application_id"))), refVal_setApplicationId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("application_id"))),
|
||||
refVal_setApplicationId);
|
||||
setApplicationId(refVal_setApplicationId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("application"))))
|
||||
{
|
||||
std::shared_ptr<Application> refVal_setApplication;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("application"))), refVal_setApplication );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("application"))), refVal_setApplication);
|
||||
setApplication(refVal_setApplication);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
|
||||
{
|
||||
std::shared_ptr<AnyType> refVal_setStats;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))), refVal_setStats );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))),
|
||||
refVal_setStats);
|
||||
setStats(refVal_setStats);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
|
||||
{
|
||||
utility::datetime refVal_setAcquired;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired);
|
||||
setAcquired(refVal_setAcquired);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
|
||||
{
|
||||
utility::datetime refVal_setLastUsed;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed);
|
||||
setLastUsed(refVal_setLastUsed);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t GroupGame::getGroupId() const
|
||||
{
|
||||
return m_Group_id;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setGroupId(const utility::string_t &value)
|
||||
{
|
||||
m_Group_id = value;
|
||||
@ -284,7 +292,6 @@ std::shared_ptr<Group> GroupGame::getGroup() const
|
||||
return m_Group;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setGroup(const std::shared_ptr<Group> &value)
|
||||
{
|
||||
m_Group = value;
|
||||
@ -305,7 +312,6 @@ utility::string_t GroupGame::getApplicationId() const
|
||||
return m_Application_id;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setApplicationId(const utility::string_t &value)
|
||||
{
|
||||
m_Application_id = value;
|
||||
@ -326,7 +332,6 @@ std::shared_ptr<Application> GroupGame::getApplication() const
|
||||
return m_Application;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setApplication(const std::shared_ptr<Application> &value)
|
||||
{
|
||||
m_Application = value;
|
||||
@ -347,7 +352,6 @@ std::shared_ptr<AnyType> GroupGame::getStats() const
|
||||
return m_Stats;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setStats(const std::shared_ptr<AnyType> &value)
|
||||
{
|
||||
m_Stats = value;
|
||||
@ -368,7 +372,6 @@ utility::datetime GroupGame::getAcquired() const
|
||||
return m_Acquired;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setAcquired(const utility::datetime &value)
|
||||
{
|
||||
m_Acquired = value;
|
||||
@ -389,7 +392,6 @@ utility::datetime GroupGame::getLastUsed() const
|
||||
return m_Last_used;
|
||||
}
|
||||
|
||||
|
||||
void GroupGame::setLastUsed(const utility::datetime &value)
|
||||
{
|
||||
m_Last_used = value;
|
||||
@ -408,5 +410,3 @@ void GroupGame::unsetLast_used()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GroupMember.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
GroupMember::GroupMember()
|
||||
{
|
||||
@ -110,7 +110,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
|
||||
@ -121,7 +120,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -132,7 +130,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("display_name"))))
|
||||
@ -143,7 +140,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("verified"))))
|
||||
@ -154,7 +150,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
|
||||
@ -165,7 +160,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_online"))))
|
||||
@ -176,7 +170,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("rank"))))
|
||||
@ -187,7 +180,6 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<GroupRank> refVal_setRank;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
|
||||
setRank(refVal_setRank);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("since"))))
|
||||
@ -198,16 +190,17 @@ bool GroupMember::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setSince;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
|
||||
setSince(refVal_setSince);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -217,35 +210,43 @@ void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
}
|
||||
if (m_UuidIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_Display_nameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
}
|
||||
if (m_VerifiedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")), m_Verified));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")),
|
||||
m_Verified));
|
||||
}
|
||||
if (m_Photo_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")), m_Photo_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")),
|
||||
m_Photo_url));
|
||||
}
|
||||
if (m_Last_onlineIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
}
|
||||
if (m_RankIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rank")), m_Rank));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rank")), m_Rank));
|
||||
}
|
||||
if (m_SinceIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("since")), m_Since));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("since")), m_Since));
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,7 +254,8 @@ bool GroupMember::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -261,67 +263,74 @@ bool GroupMember::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
|
||||
{
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
|
||||
refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
|
||||
{
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
|
||||
{
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
|
||||
{
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
|
||||
{
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
|
||||
{
|
||||
std::shared_ptr<GroupRank> refVal_setRank;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))), refVal_setRank );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))),
|
||||
refVal_setRank);
|
||||
setRank(refVal_setRank);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
|
||||
{
|
||||
utility::datetime refVal_setSince;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))), refVal_setSince );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))),
|
||||
refVal_setSince);
|
||||
setSince(refVal_setSince);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t GroupMember::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -342,7 +351,6 @@ utility::string_t GroupMember::getUuid() const
|
||||
return m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setUuid(const utility::string_t &value)
|
||||
{
|
||||
m_Uuid = value;
|
||||
@ -363,7 +371,6 @@ utility::string_t GroupMember::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -384,7 +391,6 @@ utility::string_t GroupMember::getDisplayName() const
|
||||
return m_Display_name;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setDisplayName(const utility::string_t &value)
|
||||
{
|
||||
m_Display_name = value;
|
||||
@ -425,7 +431,6 @@ utility::string_t GroupMember::getPhotoUrl() const
|
||||
return m_Photo_url;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setPhotoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Photo_url = value;
|
||||
@ -446,7 +451,6 @@ utility::datetime GroupMember::getLastOnline() const
|
||||
return m_Last_online;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setLastOnline(const utility::datetime &value)
|
||||
{
|
||||
m_Last_online = value;
|
||||
@ -467,7 +471,6 @@ std::shared_ptr<GroupRank> GroupMember::getRank() const
|
||||
return m_Rank;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setRank(const std::shared_ptr<GroupRank> &value)
|
||||
{
|
||||
m_Rank = value;
|
||||
@ -488,7 +491,6 @@ utility::datetime GroupMember::getSince() const
|
||||
return m_Since;
|
||||
}
|
||||
|
||||
|
||||
void GroupMember::setSince(const utility::datetime &value)
|
||||
{
|
||||
m_Since = value;
|
||||
@ -507,5 +509,3 @@ void GroupMember::unsetSince()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/GroupRank.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -118,5 +118,3 @@ void GroupRank::setValue(GroupRank::eGroupRank const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/HashViewModel.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
HashViewModel::HashViewModel()
|
||||
{
|
||||
@ -55,22 +55,24 @@ bool HashViewModel::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setValue;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setValue);
|
||||
setValue(refVal_setValue);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void HashViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void HashViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_ValueIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("value")), m_Value));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("value")), m_Value));
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,7 +80,8 @@ bool HashViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -86,19 +89,18 @@ bool HashViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("value"))))
|
||||
{
|
||||
utility::string_t refVal_setValue;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))), refVal_setValue );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))),
|
||||
refVal_setValue);
|
||||
setValue(refVal_setValue);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t HashViewModel::getValue() const
|
||||
{
|
||||
return m_Value;
|
||||
}
|
||||
|
||||
|
||||
void HashViewModel::setValue(const utility::string_t &value)
|
||||
{
|
||||
m_Value = value;
|
||||
@ -117,5 +119,3 @@ void HashViewModel::unsetValue()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/IntrospectRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
IntrospectRequest::IntrospectRequest()
|
||||
{
|
||||
@ -61,7 +61,6 @@ bool IntrospectRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setToken;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
|
||||
setToken(refVal_setToken);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
|
||||
@ -72,34 +71,39 @@ bool IntrospectRequest::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
|
||||
setTokenTypeHint(refVal_setTokenTypeHint);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void IntrospectRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void IntrospectRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_TokenIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token")), m_Token));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token")), m_Token));
|
||||
}
|
||||
if (m_Token_type_hintIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token_type_hint")), m_Token_type_hint));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("token_type_hint")), m_Token_type_hint));
|
||||
}
|
||||
}
|
||||
|
||||
bool IntrospectRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool IntrospectRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -107,25 +111,26 @@ bool IntrospectRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipa
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("token"))))
|
||||
{
|
||||
utility::string_t refVal_setToken;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))), refVal_setToken );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))),
|
||||
refVal_setToken);
|
||||
setToken(refVal_setToken);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
|
||||
{
|
||||
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))), refVal_setTokenTypeHint );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))),
|
||||
refVal_setTokenTypeHint);
|
||||
setTokenTypeHint(refVal_setTokenTypeHint);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t IntrospectRequest::getToken() const
|
||||
{
|
||||
return m_Token;
|
||||
}
|
||||
|
||||
|
||||
void IntrospectRequest::setToken(const utility::string_t &value)
|
||||
{
|
||||
m_Token = value;
|
||||
@ -146,7 +151,6 @@ std::shared_ptr<TokenHintType> IntrospectRequest::getTokenTypeHint() const
|
||||
return m_Token_type_hint;
|
||||
}
|
||||
|
||||
|
||||
void IntrospectRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value)
|
||||
{
|
||||
m_Token_type_hint = value;
|
||||
@ -165,5 +169,3 @@ void IntrospectRequest::unsetToken_type_hint()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/IpAddress.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
IpAddress::IpAddress()
|
||||
{
|
||||
@ -174,7 +174,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setAddress;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAddress);
|
||||
setAddress(refVal_setAddress);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("version"))))
|
||||
@ -185,7 +184,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setVersion;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("network"))))
|
||||
@ -196,7 +194,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setNetwork;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setNetwork);
|
||||
setNetwork(refVal_setNetwork);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("reserved"))))
|
||||
@ -207,7 +204,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
bool refVal_setReserved;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setReserved);
|
||||
setReserved(refVal_setReserved);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("asn"))))
|
||||
@ -218,7 +214,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setAsn;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAsn);
|
||||
setAsn(refVal_setAsn);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("isp"))))
|
||||
@ -229,7 +224,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setIsp;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setIsp);
|
||||
setIsp(refVal_setIsp);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("continent"))))
|
||||
@ -240,7 +234,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setContinent;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setContinent);
|
||||
setContinent(refVal_setContinent);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("country"))))
|
||||
@ -251,7 +244,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCountry;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCountry);
|
||||
setCountry(refVal_setCountry);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("region"))))
|
||||
@ -262,7 +254,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setRegion;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRegion);
|
||||
setRegion(refVal_setRegion);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("city"))))
|
||||
@ -273,7 +264,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCity;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCity);
|
||||
setCity(refVal_setCity);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("postal_code"))))
|
||||
@ -284,7 +274,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPostalCode;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPostalCode);
|
||||
setPostalCode(refVal_setPostalCode);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("calling_code"))))
|
||||
@ -295,7 +284,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCallingCode;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCallingCode);
|
||||
setCallingCode(refVal_setCallingCode);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("tld"))))
|
||||
@ -306,7 +294,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTld;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTld);
|
||||
setTld(refVal_setTld);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("language"))))
|
||||
@ -317,7 +304,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLanguage;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage);
|
||||
setLanguage(refVal_setLanguage);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("timezone"))))
|
||||
@ -328,7 +314,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTimezone;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTimezone);
|
||||
setTimezone(refVal_setTimezone);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("currency"))))
|
||||
@ -339,7 +324,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCurrency;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCurrency);
|
||||
setCurrency(refVal_setCurrency);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("latitude"))))
|
||||
@ -350,7 +334,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
float refVal_setLatitude;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLatitude);
|
||||
setLatitude(refVal_setLatitude);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("longitude"))))
|
||||
@ -361,7 +344,6 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
float refVal_setLongitude;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLongitude);
|
||||
setLongitude(refVal_setLongitude);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -370,81 +352,100 @@ bool IpAddress::fromJson(const web::json::value& val)
|
||||
void IpAddress::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_AddressIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("address")), m_Address));
|
||||
}
|
||||
if (m_VersionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
}
|
||||
if (m_NetworkIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("network")), m_Network));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("network")), m_Network));
|
||||
}
|
||||
if (m_ReservedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("reserved")), m_Reserved));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("reserved")),
|
||||
m_Reserved));
|
||||
}
|
||||
if (m_AsnIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("asn")), m_Asn));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("asn")), m_Asn));
|
||||
}
|
||||
if (m_IspIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isp")), m_Isp));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("isp")), m_Isp));
|
||||
}
|
||||
if (m_ContinentIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("continent")), m_Continent));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("continent")),
|
||||
m_Continent));
|
||||
}
|
||||
if (m_CountryIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country")), m_Country));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country")), m_Country));
|
||||
}
|
||||
if (m_RegionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("region")), m_Region));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("region")), m_Region));
|
||||
}
|
||||
if (m_CityIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("city")), m_City));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("city")), m_City));
|
||||
}
|
||||
if (m_Postal_codeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("postal_code")), m_Postal_code));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("postal_code")), m_Postal_code));
|
||||
}
|
||||
if (m_Calling_codeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("calling_code")), m_Calling_code));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("calling_code")), m_Calling_code));
|
||||
}
|
||||
if (m_TldIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tld")), m_Tld));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tld")), m_Tld));
|
||||
}
|
||||
if (m_LanguageIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")), m_Language));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("language")),
|
||||
m_Language));
|
||||
}
|
||||
if (m_TimezoneIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("timezone")), m_Timezone));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("timezone")),
|
||||
m_Timezone));
|
||||
}
|
||||
if (m_CurrencyIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("currency")), m_Currency));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("currency")),
|
||||
m_Currency));
|
||||
}
|
||||
if (m_LatitudeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("latitude")), m_Latitude));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("latitude")),
|
||||
m_Latitude));
|
||||
}
|
||||
if (m_LongitudeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("longitude")), m_Longitude));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("longitude")),
|
||||
m_Longitude));
|
||||
}
|
||||
}
|
||||
|
||||
@ -452,7 +453,8 @@ bool IpAddress::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -460,121 +462,137 @@ bool IpAddress::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("address"))))
|
||||
{
|
||||
utility::string_t refVal_setAddress;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))), refVal_setAddress );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("address"))),
|
||||
refVal_setAddress);
|
||||
setAddress(refVal_setAddress);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
|
||||
{
|
||||
int32_t refVal_setVersion;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))), refVal_setVersion );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))),
|
||||
refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("network"))))
|
||||
{
|
||||
utility::string_t refVal_setNetwork;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("network"))), refVal_setNetwork );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("network"))),
|
||||
refVal_setNetwork);
|
||||
setNetwork(refVal_setNetwork);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("reserved"))))
|
||||
{
|
||||
bool refVal_setReserved;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("reserved"))), refVal_setReserved );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("reserved"))), refVal_setReserved);
|
||||
setReserved(refVal_setReserved);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("asn"))))
|
||||
{
|
||||
utility::string_t refVal_setAsn;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("asn"))), refVal_setAsn );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("asn"))),
|
||||
refVal_setAsn);
|
||||
setAsn(refVal_setAsn);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("isp"))))
|
||||
{
|
||||
utility::string_t refVal_setIsp;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isp"))), refVal_setIsp );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("isp"))),
|
||||
refVal_setIsp);
|
||||
setIsp(refVal_setIsp);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("continent"))))
|
||||
{
|
||||
utility::string_t refVal_setContinent;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("continent"))), refVal_setContinent );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("continent"))), refVal_setContinent);
|
||||
setContinent(refVal_setContinent);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("country"))))
|
||||
{
|
||||
utility::string_t refVal_setCountry;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country"))), refVal_setCountry );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country"))),
|
||||
refVal_setCountry);
|
||||
setCountry(refVal_setCountry);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("region"))))
|
||||
{
|
||||
utility::string_t refVal_setRegion;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("region"))), refVal_setRegion );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("region"))),
|
||||
refVal_setRegion);
|
||||
setRegion(refVal_setRegion);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("city"))))
|
||||
{
|
||||
utility::string_t refVal_setCity;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("city"))), refVal_setCity );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("city"))),
|
||||
refVal_setCity);
|
||||
setCity(refVal_setCity);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("postal_code"))))
|
||||
{
|
||||
utility::string_t refVal_setPostalCode;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("postal_code"))), refVal_setPostalCode );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("postal_code"))), refVal_setPostalCode);
|
||||
setPostalCode(refVal_setPostalCode);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("calling_code"))))
|
||||
{
|
||||
utility::string_t refVal_setCallingCode;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("calling_code"))), refVal_setCallingCode );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("calling_code"))), refVal_setCallingCode);
|
||||
setCallingCode(refVal_setCallingCode);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("tld"))))
|
||||
{
|
||||
utility::string_t refVal_setTld;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tld"))), refVal_setTld );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tld"))),
|
||||
refVal_setTld);
|
||||
setTld(refVal_setTld);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("language"))))
|
||||
{
|
||||
utility::string_t refVal_setLanguage;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("language"))), refVal_setLanguage);
|
||||
setLanguage(refVal_setLanguage);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("timezone"))))
|
||||
{
|
||||
utility::string_t refVal_setTimezone;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("timezone"))), refVal_setTimezone );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("timezone"))), refVal_setTimezone);
|
||||
setTimezone(refVal_setTimezone);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("currency"))))
|
||||
{
|
||||
utility::string_t refVal_setCurrency;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("currency"))), refVal_setCurrency );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("currency"))), refVal_setCurrency);
|
||||
setCurrency(refVal_setCurrency);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("latitude"))))
|
||||
{
|
||||
float refVal_setLatitude;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("latitude"))), refVal_setLatitude );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("latitude"))), refVal_setLatitude);
|
||||
setLatitude(refVal_setLatitude);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("longitude"))))
|
||||
{
|
||||
float refVal_setLongitude;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("longitude"))), refVal_setLongitude );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("longitude"))), refVal_setLongitude);
|
||||
setLongitude(refVal_setLongitude);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t IpAddress::getAddress() const
|
||||
{
|
||||
return m_Address;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setAddress(const utility::string_t &value)
|
||||
{
|
||||
m_Address = value;
|
||||
@ -615,7 +633,6 @@ utility::string_t IpAddress::getNetwork() const
|
||||
return m_Network;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setNetwork(const utility::string_t &value)
|
||||
{
|
||||
m_Network = value;
|
||||
@ -656,7 +673,6 @@ utility::string_t IpAddress::getAsn() const
|
||||
return m_Asn;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setAsn(const utility::string_t &value)
|
||||
{
|
||||
m_Asn = value;
|
||||
@ -677,7 +693,6 @@ utility::string_t IpAddress::getIsp() const
|
||||
return m_Isp;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setIsp(const utility::string_t &value)
|
||||
{
|
||||
m_Isp = value;
|
||||
@ -698,7 +713,6 @@ utility::string_t IpAddress::getContinent() const
|
||||
return m_Continent;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setContinent(const utility::string_t &value)
|
||||
{
|
||||
m_Continent = value;
|
||||
@ -719,7 +733,6 @@ utility::string_t IpAddress::getCountry() const
|
||||
return m_Country;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setCountry(const utility::string_t &value)
|
||||
{
|
||||
m_Country = value;
|
||||
@ -740,7 +753,6 @@ utility::string_t IpAddress::getRegion() const
|
||||
return m_Region;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setRegion(const utility::string_t &value)
|
||||
{
|
||||
m_Region = value;
|
||||
@ -761,7 +773,6 @@ utility::string_t IpAddress::getCity() const
|
||||
return m_City;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setCity(const utility::string_t &value)
|
||||
{
|
||||
m_City = value;
|
||||
@ -782,7 +793,6 @@ utility::string_t IpAddress::getPostalCode() const
|
||||
return m_Postal_code;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setPostalCode(const utility::string_t &value)
|
||||
{
|
||||
m_Postal_code = value;
|
||||
@ -803,7 +813,6 @@ utility::string_t IpAddress::getCallingCode() const
|
||||
return m_Calling_code;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setCallingCode(const utility::string_t &value)
|
||||
{
|
||||
m_Calling_code = value;
|
||||
@ -824,7 +833,6 @@ utility::string_t IpAddress::getTld() const
|
||||
return m_Tld;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setTld(const utility::string_t &value)
|
||||
{
|
||||
m_Tld = value;
|
||||
@ -845,7 +853,6 @@ utility::string_t IpAddress::getLanguage() const
|
||||
return m_Language;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setLanguage(const utility::string_t &value)
|
||||
{
|
||||
m_Language = value;
|
||||
@ -866,7 +873,6 @@ utility::string_t IpAddress::getTimezone() const
|
||||
return m_Timezone;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setTimezone(const utility::string_t &value)
|
||||
{
|
||||
m_Timezone = value;
|
||||
@ -887,7 +893,6 @@ utility::string_t IpAddress::getCurrency() const
|
||||
return m_Currency;
|
||||
}
|
||||
|
||||
|
||||
void IpAddress::setCurrency(const utility::string_t &value)
|
||||
{
|
||||
m_Currency = value;
|
||||
@ -946,5 +951,3 @@ void IpAddress::unsetLongitude()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/LeaderboardItem.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
LeaderboardItem::LeaderboardItem()
|
||||
{
|
||||
@ -90,7 +90,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("display_name"))))
|
||||
@ -101,7 +100,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
|
||||
@ -112,7 +110,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("level"))))
|
||||
@ -123,7 +120,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setLevel;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLevel);
|
||||
setLevel(refVal_setLevel);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("experience"))))
|
||||
@ -134,7 +130,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
double refVal_setExperience;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setExperience);
|
||||
setExperience(refVal_setExperience);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("points"))))
|
||||
@ -145,50 +140,59 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
|
||||
double refVal_setPoints;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPoints);
|
||||
setPoints(refVal_setPoints);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void LeaderboardItem::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void LeaderboardItem::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_Display_nameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
}
|
||||
if (m_Photo_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")), m_Photo_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")),
|
||||
m_Photo_url));
|
||||
}
|
||||
if (m_LevelIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("level")), m_Level));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("level")), m_Level));
|
||||
}
|
||||
if (m_ExperienceIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("experience")), m_Experience));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("experience")),
|
||||
m_Experience));
|
||||
}
|
||||
if (m_PointsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("points")), m_Points));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("points")), m_Points));
|
||||
}
|
||||
}
|
||||
|
||||
bool LeaderboardItem::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool LeaderboardItem::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -196,49 +200,53 @@ bool LeaderboardItem::fromMultiPart(std::shared_ptr<MultipartFormData> multipart
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
|
||||
{
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
|
||||
{
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("level"))))
|
||||
{
|
||||
int32_t refVal_setLevel;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))), refVal_setLevel );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))),
|
||||
refVal_setLevel);
|
||||
setLevel(refVal_setLevel);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
|
||||
{
|
||||
double refVal_setExperience;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience);
|
||||
setExperience(refVal_setExperience);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("points"))))
|
||||
{
|
||||
double refVal_setPoints;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))), refVal_setPoints );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))),
|
||||
refVal_setPoints);
|
||||
setPoints(refVal_setPoints);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t LeaderboardItem::getName() const
|
||||
{
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void LeaderboardItem::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -259,7 +267,6 @@ utility::string_t LeaderboardItem::getDisplayName() const
|
||||
return m_Display_name;
|
||||
}
|
||||
|
||||
|
||||
void LeaderboardItem::setDisplayName(const utility::string_t &value)
|
||||
{
|
||||
m_Display_name = value;
|
||||
@ -280,7 +287,6 @@ utility::string_t LeaderboardItem::getPhotoUrl() const
|
||||
return m_Photo_url;
|
||||
}
|
||||
|
||||
|
||||
void LeaderboardItem::setPhotoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Photo_url = value;
|
||||
@ -359,5 +365,3 @@ void LeaderboardItem::unsetPoints()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/LeaderboardOrder.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -70,7 +70,8 @@ bool LeaderboardOrder::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -82,7 +83,8 @@ void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix, e));
|
||||
}
|
||||
|
||||
bool LeaderboardOrder::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool LeaderboardOrder::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
@ -114,5 +116,3 @@ void LeaderboardOrder::setValue(LeaderboardOrder::eLeaderboardOrder const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/LoginProvider.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -90,7 +90,8 @@ bool LoginProvider::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void LoginProvider::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void LoginProvider::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -134,5 +135,3 @@ void LoginProvider::setValue(LoginProvider::eLoginProvider const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/LoginRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
LoginRequest::LoginRequest()
|
||||
{
|
||||
@ -62,7 +62,6 @@ bool LoginRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLogin;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLogin);
|
||||
setLogin(refVal_setLogin);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("password"))))
|
||||
@ -73,26 +72,29 @@ bool LoginRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void LoginRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void LoginRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_LoginIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("login")), m_Login));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("login")), m_Login));
|
||||
}
|
||||
if (m_PasswordIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")), m_Password));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")),
|
||||
m_Password));
|
||||
}
|
||||
}
|
||||
|
||||
@ -100,7 +102,8 @@ bool LoginRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -108,25 +111,25 @@ bool LoginRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("login"))))
|
||||
{
|
||||
utility::string_t refVal_setLogin;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("login"))), refVal_setLogin );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("login"))),
|
||||
refVal_setLogin);
|
||||
setLogin(refVal_setLogin);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
|
||||
{
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t LoginRequest::getLogin() const
|
||||
{
|
||||
return m_Login;
|
||||
}
|
||||
|
||||
|
||||
void LoginRequest::setLogin(const utility::string_t &value)
|
||||
{
|
||||
m_Login = value;
|
||||
@ -147,7 +150,6 @@ utility::string_t LoginRequest::getPassword() const
|
||||
return m_Password;
|
||||
}
|
||||
|
||||
|
||||
void LoginRequest::setPassword(const utility::string_t &value)
|
||||
{
|
||||
m_Password = value;
|
||||
@ -166,5 +168,3 @@ void LoginRequest::unsetPassword()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/LoginResponse.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
LoginResponse::LoginResponse()
|
||||
{
|
||||
@ -75,7 +75,6 @@ bool LoginResponse::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<UserInfo> refVal_setUser;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUser);
|
||||
setUser(refVal_setUser);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("access_token"))))
|
||||
@ -86,7 +85,6 @@ bool LoginResponse::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setAccessToken;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAccessToken);
|
||||
setAccessToken(refVal_setAccessToken);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("refresh_token"))))
|
||||
@ -97,7 +95,6 @@ bool LoginResponse::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setRefreshToken;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
|
||||
setRefreshToken(refVal_setRefreshToken);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("expires_in"))))
|
||||
@ -108,34 +105,39 @@ bool LoginResponse::fromJson(const web::json::value& val)
|
||||
int64_t refVal_setExpiresIn;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setExpiresIn);
|
||||
setExpiresIn(refVal_setExpiresIn);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void LoginResponse::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void LoginResponse::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_UserIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user")), m_User));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("user")), m_User));
|
||||
}
|
||||
if (m_Access_tokenIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("access_token")), m_Access_token));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("access_token")), m_Access_token));
|
||||
}
|
||||
if (m_Refresh_tokenIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
|
||||
}
|
||||
if (m_Expires_inIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("expires_in")), m_Expires_in));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("expires_in")),
|
||||
m_Expires_in));
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +145,8 @@ bool LoginResponse::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -151,37 +154,40 @@ bool LoginResponse::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("user"))))
|
||||
{
|
||||
std::shared_ptr<UserInfo> refVal_setUser;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user"))), refVal_setUser );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user"))),
|
||||
refVal_setUser);
|
||||
setUser(refVal_setUser);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("access_token"))))
|
||||
{
|
||||
utility::string_t refVal_setAccessToken;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("access_token"))), refVal_setAccessToken );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("access_token"))), refVal_setAccessToken);
|
||||
setAccessToken(refVal_setAccessToken);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
|
||||
{
|
||||
utility::string_t refVal_setRefreshToken;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))), refVal_setRefreshToken );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))),
|
||||
refVal_setRefreshToken);
|
||||
setRefreshToken(refVal_setRefreshToken);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("expires_in"))))
|
||||
{
|
||||
int64_t refVal_setExpiresIn;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("expires_in"))), refVal_setExpiresIn );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("expires_in"))), refVal_setExpiresIn);
|
||||
setExpiresIn(refVal_setExpiresIn);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<UserInfo> LoginResponse::getUser() const
|
||||
{
|
||||
return m_User;
|
||||
}
|
||||
|
||||
|
||||
void LoginResponse::setUser(const std::shared_ptr<UserInfo> &value)
|
||||
{
|
||||
m_User = value;
|
||||
@ -202,7 +208,6 @@ utility::string_t LoginResponse::getAccessToken() const
|
||||
return m_Access_token;
|
||||
}
|
||||
|
||||
|
||||
void LoginResponse::setAccessToken(const utility::string_t &value)
|
||||
{
|
||||
m_Access_token = value;
|
||||
@ -223,7 +228,6 @@ utility::string_t LoginResponse::getRefreshToken() const
|
||||
return m_Refresh_token;
|
||||
}
|
||||
|
||||
|
||||
void LoginResponse::setRefreshToken(const utility::string_t &value)
|
||||
{
|
||||
m_Refresh_token = value;
|
||||
@ -262,5 +266,3 @@ void LoginResponse::unsetExpires_in()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Package.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Package::Package()
|
||||
{
|
||||
@ -132,7 +132,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -143,7 +142,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -154,7 +152,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("image_url"))))
|
||||
@ -165,7 +162,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
|
||||
setImageUrl(refVal_setImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("author_id"))))
|
||||
@ -176,7 +172,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setAuthorId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorId);
|
||||
setAuthorId(refVal_setAuthorId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("version"))))
|
||||
@ -187,7 +182,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setVersion;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("file_url"))))
|
||||
@ -198,7 +192,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setFileUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setFileUrl);
|
||||
setFileUrl(refVal_setFileUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("raw_size"))))
|
||||
@ -209,7 +202,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
double refVal_setRawSize;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRawSize);
|
||||
setRawSize(refVal_setRawSize);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("download_count"))))
|
||||
@ -220,7 +212,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_download"))))
|
||||
@ -231,7 +222,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastDownload;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastDownload);
|
||||
setLastDownload(refVal_setLastDownload);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -242,7 +232,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -253,7 +242,6 @@ bool Package::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -262,7 +250,8 @@ bool Package::fromJson(const web::json::value& val)
|
||||
void Package::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -272,47 +261,58 @@ void Package::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_Image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("image_url")), m_Image_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("image_url")),
|
||||
m_Image_url));
|
||||
}
|
||||
if (m_Author_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("author_id")), m_Author_id));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("author_id")),
|
||||
m_Author_id));
|
||||
}
|
||||
if (m_VersionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("version")), m_Version));
|
||||
}
|
||||
if (m_File_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("file_url")), m_File_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("file_url")),
|
||||
m_File_url));
|
||||
}
|
||||
if (m_Raw_sizeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("raw_size")), m_Raw_size));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("raw_size")),
|
||||
m_Raw_size));
|
||||
}
|
||||
if (m_Download_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("download_count")), m_Download_count));
|
||||
}
|
||||
if (m_Last_downloadIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_download")), m_Last_download));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("last_download")), m_Last_download));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -320,7 +320,8 @@ bool Package::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -328,85 +329,97 @@ bool Package::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl);
|
||||
setImageUrl(refVal_setImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("author_id"))))
|
||||
{
|
||||
utility::string_t refVal_setAuthorId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("author_id"))), refVal_setAuthorId );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("author_id"))), refVal_setAuthorId);
|
||||
setAuthorId(refVal_setAuthorId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
|
||||
{
|
||||
utility::string_t refVal_setVersion;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))), refVal_setVersion );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))),
|
||||
refVal_setVersion);
|
||||
setVersion(refVal_setVersion);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("file_url"))))
|
||||
{
|
||||
utility::string_t refVal_setFileUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("file_url"))), refVal_setFileUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("file_url"))), refVal_setFileUrl);
|
||||
setFileUrl(refVal_setFileUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("raw_size"))))
|
||||
{
|
||||
double refVal_setRawSize;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("raw_size"))), refVal_setRawSize );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("raw_size"))), refVal_setRawSize);
|
||||
setRawSize(refVal_setRawSize);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
|
||||
{
|
||||
int32_t refVal_setDownloadCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("download_count"))), refVal_setDownloadCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("download_count"))),
|
||||
refVal_setDownloadCount);
|
||||
setDownloadCount(refVal_setDownloadCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_download"))))
|
||||
{
|
||||
utility::datetime refVal_setLastDownload;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_download"))), refVal_setLastDownload );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_download"))),
|
||||
refVal_setLastDownload);
|
||||
setLastDownload(refVal_setLastDownload);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Package::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Package::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -427,7 +440,6 @@ utility::string_t Package::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Package::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -448,7 +460,6 @@ utility::string_t Package::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void Package::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -469,7 +480,6 @@ utility::string_t Package::getImageUrl() const
|
||||
return m_Image_url;
|
||||
}
|
||||
|
||||
|
||||
void Package::setImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Image_url = value;
|
||||
@ -490,7 +500,6 @@ utility::string_t Package::getAuthorId() const
|
||||
return m_Author_id;
|
||||
}
|
||||
|
||||
|
||||
void Package::setAuthorId(const utility::string_t &value)
|
||||
{
|
||||
m_Author_id = value;
|
||||
@ -511,7 +520,6 @@ utility::string_t Package::getVersion() const
|
||||
return m_Version;
|
||||
}
|
||||
|
||||
|
||||
void Package::setVersion(const utility::string_t &value)
|
||||
{
|
||||
m_Version = value;
|
||||
@ -532,7 +540,6 @@ utility::string_t Package::getFileUrl() const
|
||||
return m_File_url;
|
||||
}
|
||||
|
||||
|
||||
void Package::setFileUrl(const utility::string_t &value)
|
||||
{
|
||||
m_File_url = value;
|
||||
@ -593,7 +600,6 @@ utility::datetime Package::getLastDownload() const
|
||||
return m_Last_download;
|
||||
}
|
||||
|
||||
|
||||
void Package::setLastDownload(const utility::datetime &value)
|
||||
{
|
||||
m_Last_download = value;
|
||||
@ -614,7 +620,6 @@ utility::datetime Package::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Package::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -635,7 +640,6 @@ utility::datetime Package::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Package::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -654,5 +658,3 @@ void Package::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Profile.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Profile::Profile()
|
||||
{
|
||||
@ -173,7 +173,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
|
||||
@ -184,7 +183,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -195,7 +193,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("display_name"))))
|
||||
@ -206,7 +203,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("verified"))))
|
||||
@ -217,7 +213,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("level"))))
|
||||
@ -228,7 +223,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setLevel;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLevel);
|
||||
setLevel(refVal_setLevel);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("experience"))))
|
||||
@ -239,7 +233,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
double refVal_setExperience;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setExperience);
|
||||
setExperience(refVal_setExperience);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("public_birthday"))))
|
||||
@ -250,7 +243,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
bool refVal_setPublicBirthday;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPublicBirthday);
|
||||
setPublicBirthday(refVal_setPublicBirthday);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("birthday"))))
|
||||
@ -261,7 +253,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setBirthday;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBirthday);
|
||||
setBirthday(refVal_setBirthday);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("points"))))
|
||||
@ -272,7 +263,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
double refVal_setPoints;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPoints);
|
||||
setPoints(refVal_setPoints);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("location"))))
|
||||
@ -283,7 +273,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLocation;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLocation);
|
||||
setLocation(refVal_setLocation);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
|
||||
@ -294,7 +283,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("banner_url"))))
|
||||
@ -305,7 +293,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_online"))))
|
||||
@ -316,7 +303,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("biography"))))
|
||||
@ -327,7 +313,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setBiography;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setBiography);
|
||||
setBiography(refVal_setBiography);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("view_count"))))
|
||||
@ -338,7 +323,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setViewCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount);
|
||||
setViewCount(refVal_setViewCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -349,7 +333,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -360,7 +343,6 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -369,7 +351,8 @@ bool Profile::fromJson(const web::json::value& val)
|
||||
void Profile::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -379,71 +362,88 @@ void Profile::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
}
|
||||
if (m_UuidIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_Display_nameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("display_name")), m_Display_name));
|
||||
}
|
||||
if (m_VerifiedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")), m_Verified));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")),
|
||||
m_Verified));
|
||||
}
|
||||
if (m_LevelIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("level")), m_Level));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("level")), m_Level));
|
||||
}
|
||||
if (m_ExperienceIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("experience")), m_Experience));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("experience")),
|
||||
m_Experience));
|
||||
}
|
||||
if (m_Public_birthdayIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("public_birthday")), m_Public_birthday));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("public_birthday")), m_Public_birthday));
|
||||
}
|
||||
if (m_BirthdayIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("birthday")), m_Birthday));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("birthday")),
|
||||
m_Birthday));
|
||||
}
|
||||
if (m_PointsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("points")), m_Points));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("points")), m_Points));
|
||||
}
|
||||
if (m_LocationIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("location")), m_Location));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("location")),
|
||||
m_Location));
|
||||
}
|
||||
if (m_Photo_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")), m_Photo_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")),
|
||||
m_Photo_url));
|
||||
}
|
||||
if (m_Banner_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")), m_Banner_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("banner_url")),
|
||||
m_Banner_url));
|
||||
}
|
||||
if (m_Last_onlineIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("last_online")), m_Last_online));
|
||||
}
|
||||
if (m_BiographyIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("biography")), m_Biography));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("biography")),
|
||||
m_Biography));
|
||||
}
|
||||
if (m_View_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("view_count")), m_View_count));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("view_count")),
|
||||
m_View_count));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -451,7 +451,8 @@ bool Profile::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -459,121 +460,138 @@ bool Profile::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
|
||||
{
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
|
||||
refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
|
||||
{
|
||||
utility::string_t refVal_setDisplayName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName);
|
||||
setDisplayName(refVal_setDisplayName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
|
||||
{
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("level"))))
|
||||
{
|
||||
int32_t refVal_setLevel;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))), refVal_setLevel );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))),
|
||||
refVal_setLevel);
|
||||
setLevel(refVal_setLevel);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
|
||||
{
|
||||
double refVal_setExperience;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience);
|
||||
setExperience(refVal_setExperience);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("public_birthday"))))
|
||||
{
|
||||
bool refVal_setPublicBirthday;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("public_birthday"))), refVal_setPublicBirthday );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("public_birthday"))),
|
||||
refVal_setPublicBirthday);
|
||||
setPublicBirthday(refVal_setPublicBirthday);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("birthday"))))
|
||||
{
|
||||
utility::datetime refVal_setBirthday;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("birthday"))), refVal_setBirthday );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("birthday"))), refVal_setBirthday);
|
||||
setBirthday(refVal_setBirthday);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("points"))))
|
||||
{
|
||||
double refVal_setPoints;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))), refVal_setPoints );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))),
|
||||
refVal_setPoints);
|
||||
setPoints(refVal_setPoints);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("location"))))
|
||||
{
|
||||
utility::string_t refVal_setLocation;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("location"))), refVal_setLocation );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("location"))), refVal_setLocation);
|
||||
setLocation(refVal_setLocation);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
|
||||
{
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
|
||||
{
|
||||
utility::string_t refVal_setBannerUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("banner_url"))), refVal_setBannerUrl);
|
||||
setBannerUrl(refVal_setBannerUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
|
||||
{
|
||||
utility::datetime refVal_setLastOnline;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline);
|
||||
setLastOnline(refVal_setLastOnline);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("biography"))))
|
||||
{
|
||||
utility::string_t refVal_setBiography;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("biography"))), refVal_setBiography );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("biography"))), refVal_setBiography);
|
||||
setBiography(refVal_setBiography);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("view_count"))))
|
||||
{
|
||||
int32_t refVal_setViewCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("view_count"))), refVal_setViewCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("view_count"))), refVal_setViewCount);
|
||||
setViewCount(refVal_setViewCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Profile::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -594,7 +612,6 @@ utility::string_t Profile::getUuid() const
|
||||
return m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setUuid(const utility::string_t &value)
|
||||
{
|
||||
m_Uuid = value;
|
||||
@ -615,7 +632,6 @@ utility::string_t Profile::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -636,7 +652,6 @@ utility::string_t Profile::getDisplayName() const
|
||||
return m_Display_name;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setDisplayName(const utility::string_t &value)
|
||||
{
|
||||
m_Display_name = value;
|
||||
@ -737,7 +752,6 @@ utility::datetime Profile::getBirthday() const
|
||||
return m_Birthday;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setBirthday(const utility::datetime &value)
|
||||
{
|
||||
m_Birthday = value;
|
||||
@ -778,7 +792,6 @@ utility::string_t Profile::getLocation() const
|
||||
return m_Location;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setLocation(const utility::string_t &value)
|
||||
{
|
||||
m_Location = value;
|
||||
@ -799,7 +812,6 @@ utility::string_t Profile::getPhotoUrl() const
|
||||
return m_Photo_url;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setPhotoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Photo_url = value;
|
||||
@ -820,7 +832,6 @@ utility::string_t Profile::getBannerUrl() const
|
||||
return m_Banner_url;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setBannerUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Banner_url = value;
|
||||
@ -841,7 +852,6 @@ utility::datetime Profile::getLastOnline() const
|
||||
return m_Last_online;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setLastOnline(const utility::datetime &value)
|
||||
{
|
||||
m_Last_online = value;
|
||||
@ -862,7 +872,6 @@ utility::string_t Profile::getBiography() const
|
||||
return m_Biography;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setBiography(const utility::string_t &value)
|
||||
{
|
||||
m_Biography = value;
|
||||
@ -903,7 +912,6 @@ utility::datetime Profile::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -924,7 +932,6 @@ utility::datetime Profile::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Profile::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -943,5 +950,3 @@ void Profile::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ProfileGame.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
ProfileGame::ProfileGame()
|
||||
{
|
||||
@ -87,12 +87,14 @@ web::json::value ProfileGame::toJson() const
|
||||
if (m_Unlocked_achievementsIsSet)
|
||||
{
|
||||
|
||||
val[utility::conversions::to_string_t(U("unlocked_achievements"))] = ModelBase::toJson(m_Unlocked_achievements);
|
||||
val[utility::conversions::to_string_t(U("unlocked_achievements"))] =
|
||||
ModelBase::toJson(m_Unlocked_achievements);
|
||||
}
|
||||
if (m_Total_achievementsIsSet)
|
||||
{
|
||||
|
||||
val[utility::conversions::to_string_t(U("total_achievements"))] = ModelBase::toJson(m_Total_achievements);
|
||||
val[utility::conversions::to_string_t(U("total_achievements"))] =
|
||||
ModelBase::toJson(m_Total_achievements);
|
||||
}
|
||||
if (m_StatsIsSet)
|
||||
{
|
||||
@ -124,7 +126,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -135,7 +136,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
@ -146,7 +146,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
@ -157,7 +156,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("slug"))))
|
||||
@ -168,7 +166,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("time_used"))))
|
||||
@ -179,18 +176,17 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
double refVal_setTimeUsed;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTimeUsed);
|
||||
setTimeUsed(refVal_setTimeUsed);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("unlocked_achievements"))))
|
||||
{
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("unlocked_achievements")));
|
||||
const web::json::value &fieldValue =
|
||||
val.at(utility::conversions::to_string_t(U("unlocked_achievements")));
|
||||
if (!fieldValue.is_null())
|
||||
{
|
||||
int32_t refVal_setUnlockedAchievements;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUnlockedAchievements);
|
||||
setUnlockedAchievements(refVal_setUnlockedAchievements);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("total_achievements"))))
|
||||
@ -201,7 +197,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setTotalAchievements;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTotalAchievements);
|
||||
setTotalAchievements(refVal_setTotalAchievements);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("stats"))))
|
||||
@ -212,7 +207,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<AnyType> refVal_setStats;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
|
||||
setStats(refVal_setStats);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("acquired"))))
|
||||
@ -223,7 +217,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setAcquired;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
|
||||
setAcquired(refVal_setAcquired);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("last_used"))))
|
||||
@ -234,16 +227,17 @@ bool ProfileGame::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setLastUsed;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
|
||||
setLastUsed(refVal_setLastUsed);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -253,43 +247,54 @@ void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_Capsule_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("capsule_image_url")), m_Capsule_image_url));
|
||||
}
|
||||
if (m_Library_image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("library_image_url")), m_Library_image_url));
|
||||
}
|
||||
if (m_SlugIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("slug")), m_Slug));
|
||||
}
|
||||
if (m_Time_usedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("time_used")), m_Time_used));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("time_used")),
|
||||
m_Time_used));
|
||||
}
|
||||
if (m_Unlocked_achievementsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("unlocked_achievements")), m_Unlocked_achievements));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("unlocked_achievements")),
|
||||
m_Unlocked_achievements));
|
||||
}
|
||||
if (m_Total_achievementsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("total_achievements")), m_Total_achievements));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("total_achievements")), m_Total_achievements));
|
||||
}
|
||||
if (m_StatsIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("stats")), m_Stats));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("stats")), m_Stats));
|
||||
}
|
||||
if (m_AcquiredIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("acquired")), m_Acquired));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("acquired")),
|
||||
m_Acquired));
|
||||
}
|
||||
if (m_Last_usedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_used")), m_Last_used));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("last_used")),
|
||||
m_Last_used));
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,7 +302,8 @@ bool ProfileGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -305,79 +311,92 @@ bool ProfileGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setCapsuleImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))), refVal_setCapsuleImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))),
|
||||
refVal_setCapsuleImageUrl);
|
||||
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setLibraryImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))), refVal_setLibraryImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))),
|
||||
refVal_setLibraryImageUrl);
|
||||
setLibraryImageUrl(refVal_setLibraryImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
|
||||
{
|
||||
utility::string_t refVal_setSlug;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))), refVal_setSlug );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))),
|
||||
refVal_setSlug);
|
||||
setSlug(refVal_setSlug);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("time_used"))))
|
||||
{
|
||||
double refVal_setTimeUsed;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("time_used"))), refVal_setTimeUsed );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("time_used"))), refVal_setTimeUsed);
|
||||
setTimeUsed(refVal_setTimeUsed);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("unlocked_achievements"))))
|
||||
{
|
||||
int32_t refVal_setUnlockedAchievements;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("unlocked_achievements"))), refVal_setUnlockedAchievements );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("unlocked_achievements"))),
|
||||
refVal_setUnlockedAchievements);
|
||||
setUnlockedAchievements(refVal_setUnlockedAchievements);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("total_achievements"))))
|
||||
{
|
||||
int32_t refVal_setTotalAchievements;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("total_achievements"))), refVal_setTotalAchievements );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("total_achievements"))),
|
||||
refVal_setTotalAchievements);
|
||||
setTotalAchievements(refVal_setTotalAchievements);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
|
||||
{
|
||||
std::shared_ptr<AnyType> refVal_setStats;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))), refVal_setStats );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))),
|
||||
refVal_setStats);
|
||||
setStats(refVal_setStats);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
|
||||
{
|
||||
utility::datetime refVal_setAcquired;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired);
|
||||
setAcquired(refVal_setAcquired);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
|
||||
{
|
||||
utility::datetime refVal_setLastUsed;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed);
|
||||
setLastUsed(refVal_setLastUsed);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t ProfileGame::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -398,7 +417,6 @@ utility::string_t ProfileGame::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -419,7 +437,6 @@ utility::string_t ProfileGame::getCapsuleImageUrl() const
|
||||
return m_Capsule_image_url;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setCapsuleImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Capsule_image_url = value;
|
||||
@ -440,7 +457,6 @@ utility::string_t ProfileGame::getLibraryImageUrl() const
|
||||
return m_Library_image_url;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setLibraryImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Library_image_url = value;
|
||||
@ -461,7 +477,6 @@ utility::string_t ProfileGame::getSlug() const
|
||||
return m_Slug;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setSlug(const utility::string_t &value)
|
||||
{
|
||||
m_Slug = value;
|
||||
@ -542,7 +557,6 @@ std::shared_ptr<AnyType> ProfileGame::getStats() const
|
||||
return m_Stats;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setStats(const std::shared_ptr<AnyType> &value)
|
||||
{
|
||||
m_Stats = value;
|
||||
@ -563,7 +577,6 @@ utility::datetime ProfileGame::getAcquired() const
|
||||
return m_Acquired;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setAcquired(const utility::datetime &value)
|
||||
{
|
||||
m_Acquired = value;
|
||||
@ -584,7 +597,6 @@ utility::datetime ProfileGame::getLastUsed() const
|
||||
return m_Last_used;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGame::setLastUsed(const utility::datetime &value)
|
||||
{
|
||||
m_Last_used = value;
|
||||
@ -603,5 +615,3 @@ void ProfileGame::unsetLast_used()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ProfileGroup.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
ProfileGroup::ProfileGroup()
|
||||
{
|
||||
@ -117,7 +117,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
|
||||
@ -128,7 +127,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -139,7 +137,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("tag"))))
|
||||
@ -150,7 +147,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setTag;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTag);
|
||||
setTag(refVal_setTag);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("privacy"))))
|
||||
@ -161,7 +157,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPrivacy;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy);
|
||||
setPrivacy(refVal_setPrivacy);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("verified"))))
|
||||
@ -172,7 +167,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
|
||||
@ -183,7 +177,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("member_count"))))
|
||||
@ -194,7 +187,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setMemberCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount);
|
||||
setMemberCount(refVal_setMemberCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("rank"))))
|
||||
@ -205,7 +197,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<GroupRank> refVal_setRank;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
|
||||
setRank(refVal_setRank);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("since"))))
|
||||
@ -216,16 +207,17 @@ bool ProfileGroup::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setSince;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
|
||||
setSince(refVal_setSince);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -235,39 +227,48 @@ void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
|
||||
}
|
||||
if (m_UuidIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_TagIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tag")), m_Tag));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("tag")), m_Tag));
|
||||
}
|
||||
if (m_PrivacyIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("privacy")), m_Privacy));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("privacy")), m_Privacy));
|
||||
}
|
||||
if (m_VerifiedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")), m_Verified));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("verified")),
|
||||
m_Verified));
|
||||
}
|
||||
if (m_Photo_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")), m_Photo_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("photo_url")),
|
||||
m_Photo_url));
|
||||
}
|
||||
if (m_Member_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("member_count")), m_Member_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("member_count")), m_Member_count));
|
||||
}
|
||||
if (m_RankIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rank")), m_Rank));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("rank")), m_Rank));
|
||||
}
|
||||
if (m_SinceIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("since")), m_Since));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("since")), m_Since));
|
||||
}
|
||||
}
|
||||
|
||||
@ -275,7 +276,8 @@ bool ProfileGroup::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -283,73 +285,81 @@ bool ProfileGroup::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
|
||||
{
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
|
||||
refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
|
||||
{
|
||||
utility::string_t refVal_setTag;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))), refVal_setTag );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))),
|
||||
refVal_setTag);
|
||||
setTag(refVal_setTag);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
|
||||
{
|
||||
int32_t refVal_setPrivacy;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))), refVal_setPrivacy );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))),
|
||||
refVal_setPrivacy);
|
||||
setPrivacy(refVal_setPrivacy);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
|
||||
{
|
||||
bool refVal_setVerified;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
|
||||
setVerified(refVal_setVerified);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
|
||||
{
|
||||
utility::string_t refVal_setPhotoUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
|
||||
setPhotoUrl(refVal_setPhotoUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
|
||||
{
|
||||
int32_t refVal_setMemberCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount);
|
||||
setMemberCount(refVal_setMemberCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
|
||||
{
|
||||
std::shared_ptr<GroupRank> refVal_setRank;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))), refVal_setRank );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))),
|
||||
refVal_setRank);
|
||||
setRank(refVal_setRank);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
|
||||
{
|
||||
utility::datetime refVal_setSince;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))), refVal_setSince );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))),
|
||||
refVal_setSince);
|
||||
setSince(refVal_setSince);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t ProfileGroup::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -370,7 +380,6 @@ utility::string_t ProfileGroup::getUuid() const
|
||||
return m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setUuid(const utility::string_t &value)
|
||||
{
|
||||
m_Uuid = value;
|
||||
@ -391,7 +400,6 @@ utility::string_t ProfileGroup::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -412,7 +420,6 @@ utility::string_t ProfileGroup::getTag() const
|
||||
return m_Tag;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setTag(const utility::string_t &value)
|
||||
{
|
||||
m_Tag = value;
|
||||
@ -473,7 +480,6 @@ utility::string_t ProfileGroup::getPhotoUrl() const
|
||||
return m_Photo_url;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setPhotoUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Photo_url = value;
|
||||
@ -514,7 +520,6 @@ std::shared_ptr<GroupRank> ProfileGroup::getRank() const
|
||||
return m_Rank;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setRank(const std::shared_ptr<GroupRank> &value)
|
||||
{
|
||||
m_Rank = value;
|
||||
@ -535,7 +540,6 @@ utility::datetime ProfileGroup::getSince() const
|
||||
return m_Since;
|
||||
}
|
||||
|
||||
|
||||
void ProfileGroup::setSince(const utility::datetime &value)
|
||||
{
|
||||
m_Since = value;
|
||||
@ -554,5 +558,3 @@ void ProfileGroup::unsetSince()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/RefreshRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
RefreshRequest::RefreshRequest()
|
||||
{
|
||||
@ -55,30 +55,34 @@ bool RefreshRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setRefreshToken;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
|
||||
setRefreshToken(refVal_setRefreshToken);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void RefreshRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void RefreshRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_Refresh_tokenIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
|
||||
}
|
||||
}
|
||||
|
||||
bool RefreshRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool RefreshRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -86,19 +90,19 @@ bool RefreshRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
|
||||
{
|
||||
utility::string_t refVal_setRefreshToken;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))), refVal_setRefreshToken );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))),
|
||||
refVal_setRefreshToken);
|
||||
setRefreshToken(refVal_setRefreshToken);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t RefreshRequest::getRefreshToken() const
|
||||
{
|
||||
return m_Refresh_token;
|
||||
}
|
||||
|
||||
|
||||
void RefreshRequest::setRefreshToken(const utility::string_t &value)
|
||||
{
|
||||
m_Refresh_token = value;
|
||||
@ -117,5 +121,3 @@ void RefreshRequest::unsetRefresh_token()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/RegisterRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
RegisterRequest::RegisterRequest()
|
||||
{
|
||||
@ -76,7 +76,6 @@ bool RegisterRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -87,7 +86,6 @@ bool RegisterRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("email"))))
|
||||
@ -98,7 +96,6 @@ bool RegisterRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setEmail;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setEmail);
|
||||
setEmail(refVal_setEmail);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("password"))))
|
||||
@ -109,42 +106,49 @@ bool RegisterRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void RegisterRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void RegisterRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_UuidIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("uuid")), m_Uuid));
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_EmailIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email")), m_Email));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("email")), m_Email));
|
||||
}
|
||||
if (m_PasswordIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")), m_Password));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("password")),
|
||||
m_Password));
|
||||
}
|
||||
}
|
||||
|
||||
bool RegisterRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
|
||||
bool RegisterRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix)
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -152,37 +156,39 @@ bool RegisterRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
|
||||
{
|
||||
utility::string_t refVal_setUuid;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
|
||||
refVal_setUuid);
|
||||
setUuid(refVal_setUuid);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("email"))))
|
||||
{
|
||||
utility::string_t refVal_setEmail;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))),
|
||||
refVal_setEmail);
|
||||
setEmail(refVal_setEmail);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
|
||||
{
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t RegisterRequest::getUuid() const
|
||||
{
|
||||
return m_Uuid;
|
||||
}
|
||||
|
||||
|
||||
void RegisterRequest::setUuid(const utility::string_t &value)
|
||||
{
|
||||
m_Uuid = value;
|
||||
@ -203,7 +209,6 @@ utility::string_t RegisterRequest::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void RegisterRequest::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -224,7 +229,6 @@ utility::string_t RegisterRequest::getEmail() const
|
||||
return m_Email;
|
||||
}
|
||||
|
||||
|
||||
void RegisterRequest::setEmail(const utility::string_t &value)
|
||||
{
|
||||
m_Email = value;
|
||||
@ -245,7 +249,6 @@ utility::string_t RegisterRequest::getPassword() const
|
||||
return m_Password;
|
||||
}
|
||||
|
||||
|
||||
void RegisterRequest::setPassword(const utility::string_t &value)
|
||||
{
|
||||
m_Password = value;
|
||||
@ -264,5 +267,3 @@ void RegisterRequest::unsetPassword()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ResponseType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -70,7 +70,8 @@ bool ResponseType::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ResponseType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ResponseType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -114,5 +115,3 @@ void ResponseType::setValue(ResponseType::eResponseType const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/RevokeRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
RevokeRequest::RevokeRequest()
|
||||
{
|
||||
@ -61,7 +61,6 @@ bool RevokeRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setToken;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
|
||||
setToken(refVal_setToken);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
|
||||
@ -72,26 +71,29 @@ bool RevokeRequest::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
|
||||
setTokenTypeHint(refVal_setTokenTypeHint);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void RevokeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void RevokeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_TokenIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token")), m_Token));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token")), m_Token));
|
||||
}
|
||||
if (m_Token_type_hintIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("token_type_hint")), m_Token_type_hint));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("token_type_hint")), m_Token_type_hint));
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,7 +101,8 @@ bool RevokeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -107,25 +110,26 @@ bool RevokeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("token"))))
|
||||
{
|
||||
utility::string_t refVal_setToken;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))), refVal_setToken );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))),
|
||||
refVal_setToken);
|
||||
setToken(refVal_setToken);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
|
||||
{
|
||||
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))), refVal_setTokenTypeHint );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))),
|
||||
refVal_setTokenTypeHint);
|
||||
setTokenTypeHint(refVal_setTokenTypeHint);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t RevokeRequest::getToken() const
|
||||
{
|
||||
return m_Token;
|
||||
}
|
||||
|
||||
|
||||
void RevokeRequest::setToken(const utility::string_t &value)
|
||||
{
|
||||
m_Token = value;
|
||||
@ -146,7 +150,6 @@ std::shared_ptr<TokenHintType> RevokeRequest::getTokenTypeHint() const
|
||||
return m_Token_type_hint;
|
||||
}
|
||||
|
||||
|
||||
void RevokeRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value)
|
||||
{
|
||||
m_Token_type_hint = value;
|
||||
@ -165,5 +168,3 @@ void RevokeRequest::unsetToken_type_hint()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/SearchRequest.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
SearchRequest::SearchRequest()
|
||||
{
|
||||
@ -75,7 +75,6 @@ bool SearchRequest::fromJson(const web::json::value& val)
|
||||
std::shared_ptr<SearchType> refVal_setType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
|
||||
setType(refVal_setType);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("query"))))
|
||||
@ -86,7 +85,6 @@ bool SearchRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setQuery;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setQuery);
|
||||
setQuery(refVal_setQuery);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("page"))))
|
||||
@ -97,7 +95,6 @@ bool SearchRequest::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPage;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPage);
|
||||
setPage(refVal_setPage);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("game_id"))))
|
||||
@ -108,34 +105,39 @@ bool SearchRequest::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void SearchRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void SearchRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_TypeIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("type")), m_Type));
|
||||
}
|
||||
if (m_QueryIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query")), m_Query));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("query")), m_Query));
|
||||
}
|
||||
if (m_PageIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("page")), m_Page));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("page")), m_Page));
|
||||
}
|
||||
if (m_Game_idIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("game_id")), m_Game_id));
|
||||
}
|
||||
}
|
||||
|
||||
@ -143,7 +145,8 @@ bool SearchRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -151,37 +154,39 @@ bool SearchRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
|
||||
{
|
||||
std::shared_ptr<SearchType> refVal_setType;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))),
|
||||
refVal_setType);
|
||||
setType(refVal_setType);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("query"))))
|
||||
{
|
||||
utility::string_t refVal_setQuery;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query"))), refVal_setQuery );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query"))),
|
||||
refVal_setQuery);
|
||||
setQuery(refVal_setQuery);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("page"))))
|
||||
{
|
||||
int32_t refVal_setPage;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("page"))), refVal_setPage );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("page"))),
|
||||
refVal_setPage);
|
||||
setPage(refVal_setPage);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
|
||||
{
|
||||
utility::string_t refVal_setGameId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))), refVal_setGameId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))),
|
||||
refVal_setGameId);
|
||||
setGameId(refVal_setGameId);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
std::shared_ptr<SearchType> SearchRequest::getType() const
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
|
||||
|
||||
void SearchRequest::setType(const std::shared_ptr<SearchType> &value)
|
||||
{
|
||||
m_Type = value;
|
||||
@ -202,7 +207,6 @@ utility::string_t SearchRequest::getQuery() const
|
||||
return m_Query;
|
||||
}
|
||||
|
||||
|
||||
void SearchRequest::setQuery(const utility::string_t &value)
|
||||
{
|
||||
m_Query = value;
|
||||
@ -243,7 +247,6 @@ utility::string_t SearchRequest::getGameId() const
|
||||
return m_Game_id;
|
||||
}
|
||||
|
||||
|
||||
void SearchRequest::setGameId(const utility::string_t &value)
|
||||
{
|
||||
m_Game_id = value;
|
||||
@ -262,5 +265,3 @@ void SearchRequest::unsetGame_id()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/SearchType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -78,7 +78,8 @@ bool SearchType::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void SearchType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void SearchType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -122,5 +123,3 @@ void SearchType::setValue(SearchType::eSearchType const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ServerMetrics.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
ServerMetrics::ServerMetrics()
|
||||
{
|
||||
@ -69,7 +69,6 @@ bool ServerMetrics::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("package_count"))))
|
||||
@ -80,7 +79,6 @@ bool ServerMetrics::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setPackageCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPackageCount);
|
||||
setPackageCount(refVal_setPackageCount);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("country_count"))))
|
||||
@ -91,30 +89,34 @@ bool ServerMetrics::fromJson(const web::json::value& val)
|
||||
int32_t refVal_setCountryCount;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCountryCount);
|
||||
setCountryCount(refVal_setCountryCount);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void ServerMetrics::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ServerMetrics::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
if (m_Server_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("server_count")), m_Server_count));
|
||||
}
|
||||
if (m_Package_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("package_count")), m_Package_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("package_count")), m_Package_count));
|
||||
}
|
||||
if (m_Country_countIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("country_count")), m_Country_count));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("country_count")), m_Country_count));
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,7 +124,8 @@ bool ServerMetrics::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -130,25 +133,29 @@ bool ServerMetrics::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
|
||||
{
|
||||
int32_t refVal_setServerCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount);
|
||||
setServerCount(refVal_setServerCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("package_count"))))
|
||||
{
|
||||
int32_t refVal_setPackageCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("package_count"))), refVal_setPackageCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("package_count"))),
|
||||
refVal_setPackageCount);
|
||||
setPackageCount(refVal_setPackageCount);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("country_count"))))
|
||||
{
|
||||
int32_t refVal_setCountryCount;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country_count"))), refVal_setCountryCount );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("country_count"))),
|
||||
refVal_setCountryCount);
|
||||
setCountryCount(refVal_setCountryCount);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
int32_t ServerMetrics::getServerCount() const
|
||||
{
|
||||
return m_Server_count;
|
||||
@ -212,5 +219,3 @@ void ServerMetrics::unsetCountry_count()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/ServerStatus.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -74,7 +74,8 @@ bool ServerStatus::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void ServerStatus::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void ServerStatus::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -118,5 +119,3 @@ void ServerStatus::setValue(ServerStatus::eServerStatus const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/Subscription.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
Subscription::Subscription()
|
||||
{
|
||||
@ -96,7 +96,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -107,7 +106,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("description"))))
|
||||
@ -118,7 +116,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("image_url"))))
|
||||
@ -129,7 +126,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::string_t refVal_setImageUrl;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
|
||||
setImageUrl(refVal_setImageUrl);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("prices"))))
|
||||
@ -140,7 +136,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
std::map<utility::string_t, double> refVal_setPrices;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPrices);
|
||||
setPrices(refVal_setPrices);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("created"))))
|
||||
@ -151,7 +146,6 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
|
||||
}
|
||||
}
|
||||
if (val.has_field(utility::conversions::to_string_t(U("updated"))))
|
||||
@ -162,16 +156,17 @@ bool Subscription::fromJson(const web::json::value& val)
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -181,27 +176,33 @@ void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
|
||||
}
|
||||
if (m_NameIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("name")), m_Name));
|
||||
}
|
||||
if (m_DescriptionIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
multipart->add(ModelBase::toHttpContent(
|
||||
namePrefix + utility::conversions::to_string_t(U("description")), m_Description));
|
||||
}
|
||||
if (m_Image_urlIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("image_url")), m_Image_url));
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("image_url")),
|
||||
m_Image_url));
|
||||
}
|
||||
if (m_PricesIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("prices")), m_Prices));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("prices")), m_Prices));
|
||||
}
|
||||
if (m_CreatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("created")), m_Created));
|
||||
}
|
||||
if (m_UpdatedIsSet)
|
||||
{
|
||||
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
multipart->add(
|
||||
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("updated")), m_Updated));
|
||||
}
|
||||
}
|
||||
|
||||
@ -209,7 +210,8 @@ bool Subscription::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
{
|
||||
bool ok = true;
|
||||
utility::string_t namePrefix = prefix;
|
||||
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
if (namePrefix.size() > 0 &&
|
||||
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
|
||||
{
|
||||
namePrefix += utility::conversions::to_string_t(U("."));
|
||||
}
|
||||
@ -217,55 +219,60 @@ bool Subscription::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
utility::string_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
|
||||
refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
|
||||
refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
|
||||
{
|
||||
utility::string_t refVal_setDescription;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
|
||||
setDescription(refVal_setDescription);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
|
||||
{
|
||||
utility::string_t refVal_setImageUrl;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl );
|
||||
ok &= ModelBase::fromHttpContent(
|
||||
multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl);
|
||||
setImageUrl(refVal_setImageUrl);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("prices"))))
|
||||
{
|
||||
std::map<utility::string_t, double> refVal_setPrices;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("prices"))), refVal_setPrices );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("prices"))),
|
||||
refVal_setPrices);
|
||||
setPrices(refVal_setPrices);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
|
||||
{
|
||||
utility::datetime refVal_setCreated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
|
||||
refVal_setCreated);
|
||||
setCreated(refVal_setCreated);
|
||||
}
|
||||
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
|
||||
{
|
||||
utility::datetime refVal_setUpdated;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
|
||||
refVal_setUpdated);
|
||||
setUpdated(refVal_setUpdated);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
utility::string_t Subscription::getId() const
|
||||
{
|
||||
return m_Id;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setId(const utility::string_t &value)
|
||||
{
|
||||
m_Id = value;
|
||||
@ -286,7 +293,6 @@ utility::string_t Subscription::getName() const
|
||||
return m_Name;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setName(const utility::string_t &value)
|
||||
{
|
||||
m_Name = value;
|
||||
@ -307,7 +313,6 @@ utility::string_t Subscription::getDescription() const
|
||||
return m_Description;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setDescription(const utility::string_t &value)
|
||||
{
|
||||
m_Description = value;
|
||||
@ -328,7 +333,6 @@ utility::string_t Subscription::getImageUrl() const
|
||||
return m_Image_url;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setImageUrl(const utility::string_t &value)
|
||||
{
|
||||
m_Image_url = value;
|
||||
@ -369,7 +373,6 @@ utility::datetime Subscription::getCreated() const
|
||||
return m_Created;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setCreated(const utility::datetime &value)
|
||||
{
|
||||
m_Created = value;
|
||||
@ -390,7 +393,6 @@ utility::datetime Subscription::getUpdated() const
|
||||
return m_Updated;
|
||||
}
|
||||
|
||||
|
||||
void Subscription::setUpdated(const utility::datetime &value)
|
||||
{
|
||||
m_Updated = value;
|
||||
@ -409,5 +411,3 @@ void Subscription::unsetUpdated()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -10,12 +10,12 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include "tribufu++/model/TokenHintType.h"
|
||||
|
||||
namespace tribufu {
|
||||
namespace models {
|
||||
namespace tribufu
|
||||
{
|
||||
namespace models
|
||||
{
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -70,7 +70,8 @@ bool TokenHintType::fromJson(const web::json::value& val)
|
||||
return true;
|
||||
}
|
||||
|
||||
void TokenHintType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
|
||||
void TokenHintType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
|
||||
const utility::string_t &prefix) const
|
||||
{
|
||||
utility::string_t namePrefix = prefix;
|
||||
if (!namePrefix.empty() && namePrefix.back() != U('.'))
|
||||
@ -114,5 +115,3 @@ void TokenHintType::setValue(TokenHintType::eTokenHintType const value)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user