Format c++ files on generation

This commit is contained in:
2025-05-28 15:37:13 -03:00
parent 11ab0e51c8
commit 4ce994a111
106 changed files with 32592 additions and 31280 deletions

View File

@ -19,16 +19,18 @@
#ifndef TRIBUFU_MODELS_AnyType_H_ #ifndef TRIBUFU_MODELS_AnyType_H_
#define TRIBUFU_MODELS_AnyType_H_ #define TRIBUFU_MODELS_AnyType_H_
#include "tribufu++/Object.h" #include "tribufu++/Object.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class AnyType : public Object { class AnyType : public Object
{
public: public:
AnyType(); AnyType();
virtual ~AnyType(); virtual ~AnyType();

View File

@ -19,11 +19,10 @@
#ifndef TRIBUFU_API_ApiClient_H_ #ifndef TRIBUFU_API_ApiClient_H_
#define TRIBUFU_API_ApiClient_H_ #define TRIBUFU_API_ApiClient_H_
#include "tribufu++/ApiConfiguration.h" #include "tribufu++/ApiConfiguration.h"
#include "tribufu++/ApiException.h" #include "tribufu++/ApiException.h"
#include "tribufu++/IHttpBody.h"
#include "tribufu++/HttpContent.h" #include "tribufu++/HttpContent.h"
#include "tribufu++/IHttpBody.h"
#if defined(_WIN32) || defined(_WIN64) #if defined(_WIN32) || defined(_WIN64)
#undef U #undef U
@ -32,12 +31,14 @@
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <functional>
#include <memory> #include <memory>
#include <vector> #include <vector>
#include <functional>
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
using namespace tribufu::models; using namespace tribufu::models;
@ -62,49 +63,42 @@ public:
static utility::string_t parameterToString(double value); static utility::string_t parameterToString(double value);
static utility::string_t parameterToString(const utility::datetime &value); static utility::string_t parameterToString(const utility::datetime &value);
static utility::string_t parameterToString(bool value); static utility::string_t parameterToString(bool value);
template<class T> template <class T> static utility::string_t parameterToString(const std::vector<T> &value);
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::shared_ptr<T>& value);
pplx::task<web::http::http_response> callApi( pplx::task<web::http::http_response> callApi(
const utility::string_t& path, const utility::string_t &path, const utility::string_t &method,
const utility::string_t& method,
const std::map<utility::string_t, utility::string_t> &queryParams, const std::map<utility::string_t, utility::string_t> &queryParams,
const std::shared_ptr<IHttpBody> postBody, 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> &headerParams,
const std::map<utility::string_t, utility::string_t> &formParams, const std::map<utility::string_t, utility::string_t> &formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams, const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams,
const utility::string_t& contentType const utility::string_t &contentType) const;
) const;
protected: protected:
ResponseHandlerType m_ResponseHandler; ResponseHandlerType m_ResponseHandler;
std::shared_ptr<const ApiConfiguration> m_Configuration; std::shared_ptr<const ApiConfiguration> m_Configuration;
}; };
template<class T> template <class T> utility::string_t ApiClient::parameterToString(const std::vector<T> &value)
utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
{ {
utility::stringstream_t ss; utility::stringstream_t ss;
for (size_t i = 0; i < value.size(); i++) 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]); ss << ApiClient::parameterToString(value[i]);
} }
return ss.str(); return ss.str();
} }
template<class T> template <class T> utility::string_t ApiClient::parameterToString(const std::shared_ptr<T> &value)
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
{ {
return parameterToString(*value.get()); return parameterToString(*value.get());
} }
} }
} }

View File

@ -19,15 +19,15 @@
#ifndef TRIBUFU_API_ApiConfiguration_H_ #ifndef TRIBUFU_API_ApiConfiguration_H_
#define TRIBUFU_API_ApiConfiguration_H_ #define TRIBUFU_API_ApiConfiguration_H_
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h> #include <cpprest/http_client.h>
#include <map> #include <map>
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
class ApiConfiguration class ApiConfiguration
{ {

View File

@ -19,28 +19,25 @@
#ifndef TRIBUFU_API_ApiException_H_ #ifndef TRIBUFU_API_ApiException_H_
#define TRIBUFU_API_ApiException_H_ #define TRIBUFU_API_ApiException_H_
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/http_msg.h> #include <cpprest/http_msg.h>
#include <memory>
#include <map> #include <map>
#include <memory>
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
class ApiException class ApiException : public web::http::http_exception
: public web::http::http_exception
{ {
public: public:
ApiException( int errorCode ApiException(int errorCode, const utility::string_t &message,
, const utility::string_t& message std::shared_ptr<std::istream> content = nullptr);
, std::shared_ptr<std::istream> content = nullptr ); ApiException(int errorCode, const utility::string_t &message,
ApiException( int errorCode std::map<utility::string_t, utility::string_t> &headers,
, const utility::string_t& message std::shared_ptr<std::istream> content = nullptr);
, std::map<utility::string_t, utility::string_t>& headers
, std::shared_ptr<std::istream> content = nullptr );
virtual ~ApiException(); virtual ~ApiException();
std::map<utility::string_t, utility::string_t> &getHeaders(); std::map<utility::string_t, utility::string_t> &getHeaders();

View File

@ -19,14 +19,14 @@
#ifndef TRIBUFU_MODELS_HttpContent_H_ #ifndef TRIBUFU_MODELS_HttpContent_H_
#define TRIBUFU_MODELS_HttpContent_H_ #define TRIBUFU_MODELS_HttpContent_H_
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <memory> #include <memory>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class HttpContent class HttpContent
{ {

View File

@ -19,16 +19,19 @@
#ifndef TRIBUFU_MODELS_IHttpBody_H_ #ifndef TRIBUFU_MODELS_IHttpBody_H_
#define TRIBUFU_MODELS_IHttpBody_H_ #define TRIBUFU_MODELS_IHttpBody_H_
#include <iostream> #include <iostream>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class IHttpBody class IHttpBody
{ {
public: public:
virtual ~IHttpBody() { } virtual ~IHttpBody()
{
}
virtual void writeTo(std::ostream &stream) = 0; virtual void writeTo(std::ostream &stream) = 0;
}; };

View File

@ -19,16 +19,16 @@
#ifndef TRIBUFU_MODELS_JsonBody_H_ #ifndef TRIBUFU_MODELS_JsonBody_H_
#define TRIBUFU_MODELS_JsonBody_H_ #define TRIBUFU_MODELS_JsonBody_H_
#include "tribufu++/IHttpBody.h" #include "tribufu++/IHttpBody.h"
#include <cpprest/json.h> #include <cpprest/json.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class JsonBody class JsonBody : public IHttpBody
: public IHttpBody
{ {
public: public:
JsonBody(const web::json::value &value); JsonBody(const web::json::value &value);

View File

@ -19,8 +19,6 @@
#ifndef TRIBUFU_MODELS_ModelBase_H_ #ifndef TRIBUFU_MODELS_ModelBase_H_
#define TRIBUFU_MODELS_ModelBase_H_ #define TRIBUFU_MODELS_ModelBase_H_
#include "tribufu++/HttpContent.h" #include "tribufu++/HttpContent.h"
#include "tribufu++/MultipartFormData.h" #include "tribufu++/MultipartFormData.h"
@ -31,8 +29,10 @@
#include <set> #include <set>
#include <vector> #include <vector>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class ModelBase class ModelBase
{ {
@ -45,8 +45,10 @@ public:
virtual web::json::value toJson() const = 0; virtual web::json::value toJson() const = 0;
virtual bool fromJson(const web::json::value &json) = 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 void toMultipart(std::shared_ptr<MultipartFormData> multipart,
virtual bool fromMultiPart( std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix ) = 0; 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; virtual bool isSet() const;
@ -59,12 +61,9 @@ public:
static utility::string_t toString(const utility::datetime &val); 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 web::json::value &val);
static utility::string_t toString(const std::shared_ptr<HttpContent> &val); static utility::string_t toString(const std::shared_ptr<HttpContent> &val);
template <typename T> template <typename T> static utility::string_t toString(const std::shared_ptr<T> &val);
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> template <typename T> static utility::string_t toString(const std::set<T> &val);
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(bool val);
static web::json::value toJson(float 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 utility::datetime &val);
static web::json::value toJson(const web::json::value &val); static web::json::value toJson(const web::json::value &val);
static web::json::value toJson(const std::shared_ptr<HttpContent> &val); static web::json::value toJson(const std::shared_ptr<HttpContent> &val);
template<typename T> template <typename T> static web::json::value toJson(const std::shared_ptr<T> &val);
static web::json::value toJson( const std::shared_ptr<T>& val );
static web::json::value toJson(const std::shared_ptr<utility::datetime> &val); static web::json::value toJson(const std::shared_ptr<utility::datetime> &val);
template<typename T> template <typename T> static web::json::value toJson(const std::vector<T> &val);
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> template <typename T> static web::json::value toJson(const std::map<utility::string_t, T> &val);
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, bool &);
static bool fromString(const utility::string_t &val, float &); 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, utility::datetime &);
static bool fromString(const utility::string_t &val, web::json::value &); static bool fromString(const utility::string_t &val, web::json::value &);
static bool fromString(const utility::string_t &val, std::shared_ptr<HttpContent> &); static bool fromString(const utility::string_t &val, std::shared_ptr<HttpContent> &);
template<typename 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<T>& );
static bool fromString(const utility::string_t &val, std::shared_ptr<utility::datetime> &outVal); static bool fromString(const utility::string_t &val, std::shared_ptr<utility::datetime> &outVal);
template<typename T> template <typename T> static bool fromString(const utility::string_t &val, std::vector<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::set<T> & );
template <typename T> template <typename T>
static bool fromString(const utility::string_t &val, std::map<utility::string_t, 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, utility::datetime &);
static bool fromJson(const web::json::value &val, web::json::value &); static bool fromJson(const web::json::value &val, web::json::value &);
static bool fromJson(const web::json::value &val, std::shared_ptr<HttpContent> &); static bool fromJson(const web::json::value &val, std::shared_ptr<HttpContent> &);
template<typename 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<T>& );
static bool fromJson(const web::json::value &val, std::shared_ptr<utility::datetime> &outVal); static bool fromJson(const web::json::value &val, std::shared_ptr<utility::datetime> &outVal);
template<typename T> template <typename T> static bool fromJson(const web::json::value &val, std::vector<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> template <typename T> static bool fromJson(const web::json::value &val, std::map<utility::string_t, 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(
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, bool value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); const utility::string_t &name, bool value,
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); 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(
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); const utility::string_t &name, float value,
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") ); 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(
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("")); const utility::string_t &name, double value,
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") ); const utility::string_t &contentType = utility::conversions::to_string_t(""));
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, 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> 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(
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") ); 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> 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> 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> 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, bool &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, float &); 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, utility::datetime &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &); static bool fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &); static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &);
template <typename T> template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<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> template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::set<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> template <typename T>
static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, 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(utility::string_t value);
static utility::string_t toBase64(std::shared_ptr<std::istream> value); static utility::string_t toBase64(std::shared_ptr<std::istream> value);
static std::shared_ptr<std::istream> fromBase64(const utility::string_t &encoded); static std::shared_ptr<std::istream> fromBase64(const utility::string_t &encoded);
protected: protected:
bool m_IsSet; bool m_IsSet;
}; };
template <typename T> template <typename T> utility::string_t ModelBase::toString(const std::shared_ptr<T> &val)
utility::string_t ModelBase::toString( const std::shared_ptr<T>& val )
{ {
utility::stringstream_t ss; utility::stringstream_t ss;
if (val != nullptr) if (val != nullptr)
@ -180,8 +191,7 @@ utility::string_t ModelBase::toString( const std::shared_ptr<T>& val )
} }
// std::vector to string // std::vector to string
template<typename T> template <typename T> utility::string_t ModelBase::toString(const std::vector<T> &val)
utility::string_t ModelBase::toString( const std::vector<T> & val )
{ {
utility::string_t strArray; utility::string_t strArray;
for (const auto &item : val) for (const auto &item : val)
@ -196,8 +206,7 @@ utility::string_t ModelBase::toString( const std::vector<T> & val )
} }
// std::set to string // std::set to string
template<typename T> template <typename T> utility::string_t ModelBase::toString(const std::set<T> &val)
utility::string_t ModelBase::toString( const std::set<T> & val )
{ {
utility::string_t strArray; utility::string_t strArray;
for (const auto &item : val) for (const auto &item : val)
@ -211,9 +220,7 @@ utility::string_t ModelBase::toString( const std::set<T> & val )
return strArray; 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; web::json::value retVal;
if (val != nullptr) if (val != nullptr)
@ -224,8 +231,7 @@ web::json::value ModelBase::toJson( const std::shared_ptr<T>& val )
} }
// std::vector to json // std::vector to json
template<typename T> template <typename T> web::json::value ModelBase::toJson(const std::vector<T> &value)
web::json::value ModelBase::toJson( const std::vector<T>& value )
{ {
std::vector<web::json::value> ret; std::vector<web::json::value> ret;
for (const auto &x : value) for (const auto &x : value)
@ -236,10 +242,10 @@ web::json::value ModelBase::toJson( const std::vector<T>& value )
} }
// std::set to json // std::set to json
template<typename T> template <typename T> web::json::value ModelBase::toJson(const std::set<T> &value)
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; std::vector<web::json::value> ret;
for (const auto &x : value) 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); 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; web::json::value obj;
for (const auto &itemkey : val) for (const auto &itemkey : val)
@ -259,8 +263,7 @@ web::json::value ModelBase::toJson( const std::map<utility::string_t, T>& val )
} }
return obj; return obj;
} }
template<typename T> template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::shared_ptr<T> &outVal)
bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& outVal )
{ {
bool ok = false; bool ok = false;
if (outVal == nullptr) if (outVal == nullptr)
@ -273,8 +276,7 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& ou
} }
return ok; return ok;
} }
template<typename T> template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::vector<T> &outVal)
bool ModelBase::fromString(const utility::string_t& val, std::vector<T>& outVal )
{ {
bool ok = true; bool ok = true;
web::json::value jsonValue = web::json::value::parse(val); 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; return ok;
} }
template<typename T> template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::set<T> &outVal)
bool ModelBase::fromString(const utility::string_t& val, std::set<T>& outVal )
{ {
bool ok = true; bool ok = true;
web::json::value jsonValue = web::json::value::parse(val); 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; return ok;
} }
template<typename T> template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::shared_ptr<T> &outVal)
bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<T> &outVal )
{ {
bool ok = false; bool ok = false;
if (outVal == nullptr) if (outVal == nullptr)
@ -353,8 +353,7 @@ bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<T> &outVa
} }
return ok; return ok;
} }
template<typename T> template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::vector<T> &outVal)
bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
{ {
bool ok = true; bool ok = true;
if (val.is_array()) if (val.is_array())
@ -372,8 +371,7 @@ bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
} }
return ok; return ok;
} }
template<typename T> template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::set<T> &outVal)
bool ModelBase::fromJson(const web::json::value& val, std::set<T>& outVal )
{ {
bool ok = true; bool ok = true;
if (val.is_array()) if (val.is_array())
@ -414,7 +412,9 @@ bool ModelBase::fromJson( const web::json::value& jval, std::map<utility::string
return ok; return ok;
} }
template <typename T> 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>(); std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
if (value != nullptr) if (value != nullptr)
@ -422,49 +422,59 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& n
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; return content;
} }
template <typename T> 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); web::json::value json_array = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>(); std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; return content;
} }
template <typename T> 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); web::json::value json_array = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>(); std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; return content;
} }
template <typename T> 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); web::json::value jobj = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>(); std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; return content;
} }
template <typename T> template <typename T>
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &outVal)
{ {
utility::string_t str; utility::string_t str;
if(val == nullptr) return false; if (val == nullptr)
return false;
if (outVal == nullptr) if (outVal == nullptr)
{ {
outVal = std::make_shared<T>(); outVal = std::make_shared<T>();
@ -472,19 +482,19 @@ bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
template <typename T> template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::vector<T> &outVal)
bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::vector<T> & outVal )
{ {
utility::string_t str; utility::string_t str;
if (val == nullptr) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
template <typename T> template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T> &outVal)
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T>& outVal )
{ {
utility::string_t str; utility::string_t str;
if (val == nullptr) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); 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) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> &outVal)
{ {
utility::string_t str; utility::string_t str;
if (val == nullptr) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }

View File

@ -19,21 +19,21 @@
#ifndef TRIBUFU_MODELS_MultipartFormData_H_ #ifndef TRIBUFU_MODELS_MultipartFormData_H_
#define TRIBUFU_MODELS_MultipartFormData_H_ #define TRIBUFU_MODELS_MultipartFormData_H_
#include "tribufu++/IHttpBody.h"
#include "tribufu++/HttpContent.h" #include "tribufu++/HttpContent.h"
#include "tribufu++/IHttpBody.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <vector>
#include <map> #include <map>
#include <memory> #include <memory>
#include <vector>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class MultipartFormData class MultipartFormData : public IHttpBody
: public IHttpBody
{ {
public: public:
MultipartFormData(); MultipartFormData();

View File

@ -19,14 +19,15 @@
#ifndef TRIBUFU_MODELS_Object_H_ #ifndef TRIBUFU_MODELS_Object_H_
#define TRIBUFU_MODELS_Object_H_ #define TRIBUFU_MODELS_Object_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <cpprest/json.h> #include <cpprest/json.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Object : public ModelBase class Object : public ModelBase
{ {
@ -41,8 +42,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Object manipulation /// Object manipulation

View File

@ -19,12 +19,10 @@
#ifndef TRIBUFU_API_TribufuGeneratedApi_H_ #ifndef TRIBUFU_API_TribufuGeneratedApi_H_
#define TRIBUFU_API_TribufuGeneratedApi_H_ #define TRIBUFU_API_TribufuGeneratedApi_H_
#include "tribufu++/ApiClient.h" #include "tribufu++/ApiClient.h"
#include "tribufu++/model/Account.h"
#include "tribufu++/AnyType.h" #include "tribufu++/AnyType.h"
#include "tribufu++/model/Account.h"
#include "tribufu++/model/AuthorizeRequest.h" #include "tribufu++/model/AuthorizeRequest.h"
#include "tribufu++/model/CryptoViewModel.h" #include "tribufu++/model/CryptoViewModel.h"
#include "tribufu++/model/Game.h" #include "tribufu++/model/Game.h"
@ -54,22 +52,21 @@
#include "tribufu++/model/TokenResponse.h" #include "tribufu++/model/TokenResponse.h"
#include "tribufu++/model/UpdateProfile.h" #include "tribufu++/model/UpdateProfile.h"
#include "tribufu++/model/UserInfo.h" #include "tribufu++/model/UserInfo.h"
#include <boost/optional.hpp>
#include <cpprest/details/basic_types.h>
#include <map> #include <map>
#include <vector> #include <vector>
#include <cpprest/details/basic_types.h>
#include <boost/optional.hpp>
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
using namespace tribufu::models; using namespace tribufu::models;
class TribufuGeneratedApi class TribufuGeneratedApi
{ {
public: public:
explicit TribufuGeneratedApi(std::shared_ptr<const ApiClient> apiClient); explicit TribufuGeneratedApi(std::shared_ptr<const ApiClient> apiClient);
virtual ~TribufuGeneratedApi(); virtual ~TribufuGeneratedApi();
@ -81,45 +78,41 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.authorize&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.authorize&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="authorizeRequest"> (optional)</param> /// <param name="authorizeRequest"> (optional)</param>
pplx::task<void> authorize( pplx::task<void> authorize(boost::optional<std::shared_ptr<AuthorizeRequest>> authorizeRequest) const;
boost::optional<std::shared_ptr<AuthorizeRequest>> authorizeRequest
) const;
/// <summary> /// <summary>
/// Change the email of a user. /// Change the email of a user.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This endpoint is not available with an api key, only with a bearer token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.user.email.update&lt;/code&gt; /// This endpoint is not available with an api key, only with a bearer
/// token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.identity.user.email.update&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> changeEmail( pplx::task<void> changeEmail(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
utility::string_t id,
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Change the password of a user. /// Change the password of a user.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This endpoint is not available with an api key, only with a bearer token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.user.password.update&lt;/code&gt; /// This endpoint is not available with an api key, only with a bearer
/// token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.identity.user.password.update&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> changePassword( pplx::task<void> changePassword(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
utility::string_t id,
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Claim a game server. /// Claim a game server.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// This endpoint is not available with an api key, only with a bearer token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.claim&lt;/code&gt; /// This endpoint is not available with an api key, only with a bearer
/// token.&lt;br/&gt;&lt;br/&gt;&lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.claim&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> claimGameServer( pplx::task<void> claimGameServer(utility::string_t id,
utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Convert a string to base64 or vice versa. /// Convert a string to base64 or vice versa.
/// </summary> /// </summary>
@ -128,28 +121,25 @@ public:
/// </remarks> /// </remarks>
/// <param name="cryptoViewModel"> (optional)</param> /// <param name="cryptoViewModel"> (optional)</param>
pplx::task<std::shared_ptr<CryptoViewModel>> convertBase64( pplx::task<std::shared_ptr<CryptoViewModel>> convertBase64(
boost::optional<std::shared_ptr<CryptoViewModel>> cryptoViewModel boost::optional<std::shared_ptr<CryptoViewModel>> cryptoViewModel) const;
) const;
/// <summary> /// <summary>
/// Create a new game server. /// Create a new game server.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.create&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.create&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> createGameServer( pplx::task<void> createGameServer(boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Create a new game server cluster. /// Create a new game server cluster.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.create&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.create&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> createGameServerCluster( pplx::task<void> createGameServerCluster(boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Create a new group. /// Create a new group.
/// </summary> /// </summary>
@ -157,9 +147,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.create&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.create&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> createGroup( pplx::task<void> createGroup(boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Create a new token with grant type. /// Create a new token with grant type.
/// </summary> /// </summary>
@ -168,28 +156,25 @@ public:
/// </remarks> /// </remarks>
/// <param name="tokenRequest"> (optional)</param> /// <param name="tokenRequest"> (optional)</param>
pplx::task<std::shared_ptr<TokenResponse>> createToken( pplx::task<std::shared_ptr<TokenResponse>> createToken(
boost::optional<std::shared_ptr<TokenRequest>> tokenRequest boost::optional<std::shared_ptr<TokenRequest>> tokenRequest) const;
) const;
/// <summary> /// <summary>
/// Delete a game server. /// Delete a game server.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.delete&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.delete&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<void> deleteGameServer( pplx::task<void> deleteGameServer(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Delete a game server cluster. /// Delete a game server cluster.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.delete&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.delete&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<void> deleteGameServerCluster( pplx::task<void> deleteGameServerCluster(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Delete a group. /// Delete a group.
/// </summary> /// </summary>
@ -197,9 +182,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.delete&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.delete&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<void> deleteGroup( pplx::task<void> deleteGroup(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Generate one or more flake ids. /// Generate one or more flake ids.
/// </summary> /// </summary>
@ -207,21 +190,18 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.utils.generate.flake&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.utils.generate.flake&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="amount"> (optional, default to 0)</param> /// <param name="amount"> (optional, default to 0)</param>
pplx::task<std::vector<utility::string_t>> generateFlakeId( pplx::task<std::vector<utility::string_t>> generateFlakeId(boost::optional<int32_t> amount) const;
boost::optional<int32_t> amount
) const;
/// <summary> /// <summary>
/// Generate one or more flake ids from a timestamp. /// Generate one or more flake ids from a timestamp.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.utils.generate.flake.timestamp&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.utils.generate.flake.timestamp&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="timestamp"></param> /// <param name="timestamp"></param>
/// <param name="amount"> (optional, default to 0)</param> /// <param name="amount"> (optional, default to 0)</param>
pplx::task<std::vector<utility::string_t>> generateFlakeIdFromTimestamp( pplx::task<std::vector<utility::string_t>> generateFlakeIdFromTimestamp(
utility::string_t timestamp, utility::string_t timestamp, boost::optional<int32_t> amount) const;
boost::optional<int32_t> amount
) const;
/// <summary> /// <summary>
/// Generate a random password. /// Generate a random password.
/// </summary> /// </summary>
@ -230,10 +210,8 @@ public:
/// </remarks> /// </remarks>
/// <param name="length"> (optional, default to 0)</param> /// <param name="length"> (optional, default to 0)</param>
/// <param name="symbols"> (optional, default to false)</param> /// <param name="symbols"> (optional, default to false)</param>
pplx::task<std::shared_ptr<HashViewModel>> generatePassword( pplx::task<std::shared_ptr<HashViewModel>> generatePassword(boost::optional<int32_t> length,
boost::optional<int32_t> length, boost::optional<bool> symbols) const;
boost::optional<bool> symbols
) const;
/// <summary> /// <summary>
/// Generate one or more uuids with a specific version. /// Generate one or more uuids with a specific version.
/// </summary> /// </summary>
@ -242,26 +220,22 @@ public:
/// </remarks> /// </remarks>
/// <param name="version"> (optional, default to 0)</param> /// <param name="version"> (optional, default to 0)</param>
/// <param name="amount"> (optional, default to 0)</param> /// <param name="amount"> (optional, default to 0)</param>
pplx::task<std::vector<utility::string_t>> generateUuid( pplx::task<std::vector<utility::string_t>> generateUuid(boost::optional<int32_t> version,
boost::optional<int32_t> version, boost::optional<int32_t> amount) const;
boost::optional<int32_t> amount
) const;
/// <summary> /// <summary>
/// Get current client information. /// Get current client information.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// ///
/// </remarks> /// </remarks>
pplx::task<void> getClientInfo( pplx::task<void> getClientInfo() const;
) const;
/// <summary> /// <summary>
/// Get current ip address location. /// Get current ip address location.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.geoip.current&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.geoip.current&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getCurrentIpAddress( pplx::task<std::vector<std::shared_ptr<IpAddress>>> getCurrentIpAddress() const;
) const;
/// <summary> /// <summary>
/// Get a game by id. /// Get a game by id.
/// </summary> /// </summary>
@ -269,23 +243,19 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<Game>> getGameById( pplx::task<std::shared_ptr<Game>> getGameById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of game server clusters of a game. /// Get a list of game server clusters of a game.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameClustersByGameId( pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameClustersByGameId(
utility::string_t id, utility::string_t id, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> page,
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of game items. /// Get a list of game items.
/// </summary> /// </summary>
@ -295,23 +265,20 @@ public:
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<AnyType>>> getGameItems( pplx::task<std::vector<std::shared_ptr<AnyType>>> getGameItems(utility::string_t id,
utility::string_t id,
boost::optional<int32_t> page, boost::optional<int32_t> page,
boost::optional<int32_t> limit boost::optional<int32_t> limit) const;
) const;
/// <summary> /// <summary>
/// Get a game server by address and query port. /// Get a game server by address and query port.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.get.address&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.get.address&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="address"></param> /// <param name="address"></param>
/// <param name="port"></param> /// <param name="port"></param>
pplx::task<std::shared_ptr<GameServer>> getGameServerByAddressAndQueryPort( pplx::task<std::shared_ptr<GameServer>> getGameServerByAddressAndQueryPort(utility::string_t address,
utility::string_t address, int32_t port) const;
int32_t port
) const;
/// <summary> /// <summary>
/// Get a game server by id. /// Get a game server by id.
/// </summary> /// </summary>
@ -319,31 +286,27 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<GameServer>> getGameServerById( pplx::task<std::shared_ptr<GameServer>> getGameServerById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a game server cluster by id. /// Get a game server cluster by id.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<GameServerCluster>> getGameServerClusterById( pplx::task<std::shared_ptr<GameServerCluster>> getGameServerClusterById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of game server clusters. /// Get a list of game server clusters.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameServerClusters( pplx::task<std::vector<std::shared_ptr<GameServerCluster>>> getGameServerClusters(
boost::optional<int32_t> page, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of game servers. /// Get a list of game servers.
/// </summary> /// </summary>
@ -352,24 +315,20 @@ public:
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServers( pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServers(boost::optional<int32_t> page,
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of game servers from a country. /// Get a list of game servers from a country.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.list.country&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.list.country&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="country"></param> /// <param name="country"></param>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByCountry( pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByCountry(
utility::string_t country, utility::string_t country, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> page,
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of game servers of a game. /// Get a list of game servers of a game.
/// </summary> /// </summary>
@ -380,34 +339,30 @@ public:
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByGameId( pplx::task<std::vector<std::shared_ptr<GameServer>>> getGameServersByGameId(
utility::string_t id, utility::string_t id, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> page,
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of countries with the number of game servers. /// Get a list of countries with the number of game servers.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.country.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.country.list&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<std::map<utility::string_t, int32_t>> getGameServersCountries( pplx::task<std::map<utility::string_t, int32_t>> getGameServersCountries() const;
) const;
/// <summary> /// <summary>
/// Get metrics about the tracked game servers. /// Get metrics about the tracked game servers.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.metric.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.metric.get&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<std::shared_ptr<ServerMetrics>> getGameServersMetrics( pplx::task<std::shared_ptr<ServerMetrics>> getGameServersMetrics() const;
) const;
/// <summary> /// <summary>
/// Get a list of games. /// Get a list of games.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.list&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<std::vector<std::shared_ptr<Game>>> getGames( pplx::task<std::vector<std::shared_ptr<Game>>> getGames() const;
) const;
/// <summary> /// <summary>
/// Get a group by id. /// Get a group by id.
/// </summary> /// </summary>
@ -415,9 +370,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<Group>> getGroupById( pplx::task<std::shared_ptr<Group>> getGroupById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a group by tag. /// Get a group by tag.
/// </summary> /// </summary>
@ -425,9 +378,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get.tag&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get.tag&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="tag"></param> /// <param name="tag"></param>
pplx::task<std::shared_ptr<Group>> getGroupByTag( pplx::task<std::shared_ptr<Group>> getGroupByTag(utility::string_t tag) const;
utility::string_t tag
) const;
/// <summary> /// <summary>
/// Get a group by uuid. /// Get a group by uuid.
/// </summary> /// </summary>
@ -435,9 +386,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get.uuid&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.get.uuid&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="uuid"></param> /// <param name="uuid"></param>
pplx::task<std::shared_ptr<Group>> getGroupByUuid( pplx::task<std::shared_ptr<Group>> getGroupByUuid(utility::string_t uuid) const;
utility::string_t uuid
) const;
/// <summary> /// <summary>
/// Get a list of games of a group. /// Get a list of games of a group.
/// </summary> /// </summary>
@ -445,9 +394,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.game.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.game.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<GroupGame>>> getGroupGames( pplx::task<std::vector<std::shared_ptr<GroupGame>>> getGroupGames(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of members in a group. /// Get a list of members in a group.
/// </summary> /// </summary>
@ -455,9 +402,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.member.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.group.member.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<GroupMember>>> getGroupMembers( pplx::task<std::vector<std::shared_ptr<GroupMember>>> getGroupMembers(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of groups. /// Get a list of groups.
/// </summary> /// </summary>
@ -466,10 +411,8 @@ public:
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<Group>>> getGroups( pplx::task<std::vector<std::shared_ptr<Group>>> getGroups(boost::optional<int32_t> page,
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a ip address location. /// Get a ip address location.
/// </summary> /// </summary>
@ -477,9 +420,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.geoip.address.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.geoip.address.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="address"></param> /// <param name="address"></param>
pplx::task<std::shared_ptr<IpAddress>> getIpAddress( pplx::task<std::shared_ptr<IpAddress>> getIpAddress(utility::string_t address) const;
utility::string_t address
) const;
/// <summary> /// <summary>
/// Get a list of ip addresses. /// Get a list of ip addresses.
/// </summary> /// </summary>
@ -488,10 +429,8 @@ public:
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<IpAddress>>> getIpAddresses( pplx::task<std::vector<std::shared_ptr<IpAddress>>> getIpAddresses(boost::optional<int32_t> page,
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get the top 20 leaderboard users. /// Get the top 20 leaderboard users.
/// </summary> /// </summary>
@ -500,16 +439,14 @@ public:
/// </remarks> /// </remarks>
/// <param name="order"> (optional, default to new LeaderboardOrder())</param> /// <param name="order"> (optional, default to new LeaderboardOrder())</param>
pplx::task<std::vector<std::shared_ptr<LeaderboardItem>>> getLeaderboard( pplx::task<std::vector<std::shared_ptr<LeaderboardItem>>> getLeaderboard(
boost::optional<std::shared_ptr<LeaderboardOrder>> order boost::optional<std::shared_ptr<LeaderboardOrder>> order) const;
) const;
/// <summary> /// <summary>
/// Get current user information. /// Get current user information.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// ///
/// </remarks> /// </remarks>
pplx::task<std::shared_ptr<UserInfo>> getMe( pplx::task<std::shared_ptr<UserInfo>> getMe() const;
) const;
/// <summary> /// <summary>
/// Get a package by id. /// Get a package by id.
/// </summary> /// </summary>
@ -517,9 +454,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.package.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.package.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<Package>> getPackageById( pplx::task<std::shared_ptr<Package>> getPackageById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of packages. /// Get a list of packages.
/// </summary> /// </summary>
@ -528,18 +463,15 @@ public:
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<Package>>> getPackages( pplx::task<std::vector<std::shared_ptr<Package>>> getPackages(boost::optional<int32_t> page,
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get the public keys for the client. /// Get the public keys for the client.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.client.keys&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.client.keys&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<void> getPublicKeys( pplx::task<void> getPublicKeys() const;
) const;
/// <summary> /// <summary>
/// Get a subscription by id. /// Get a subscription by id.
/// </summary> /// </summary>
@ -547,9 +479,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.store.subscription.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.store.subscription.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<Subscription>> getSubscriptionById( pplx::task<std::shared_ptr<Subscription>> getSubscriptionById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of subscriptions. /// Get a list of subscriptions.
/// </summary> /// </summary>
@ -559,9 +489,7 @@ public:
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<Subscription>>> getSubscriptions( pplx::task<std::vector<std::shared_ptr<Subscription>>> getSubscriptions(
boost::optional<int32_t> page, boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Get a list of connected accounts of the user. /// Get a list of connected accounts of the user.
/// </summary> /// </summary>
@ -569,9 +497,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.user.account.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.user.account.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<Account>>> getUserAccounts( pplx::task<std::vector<std::shared_ptr<Account>>> getUserAccounts(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a user profile by id. /// Get a user profile by id.
/// </summary> /// </summary>
@ -579,9 +505,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::shared_ptr<Profile>> getUserById( pplx::task<std::shared_ptr<Profile>> getUserById(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a user profile by name. /// Get a user profile by name.
/// </summary> /// </summary>
@ -589,9 +513,7 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get.name&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get.name&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="name"></param> /// <param name="name"></param>
pplx::task<std::shared_ptr<Profile>> getUserByName( pplx::task<std::shared_ptr<Profile>> getUserByName(utility::string_t name) const;
utility::string_t name
) const;
/// <summary> /// <summary>
/// Get a user profile by uuid. /// Get a user profile by uuid.
/// </summary> /// </summary>
@ -599,19 +521,16 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get.uuid&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.get.uuid&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="uuid"></param> /// <param name="uuid"></param>
pplx::task<std::shared_ptr<Profile>> getUserByUuid( pplx::task<std::shared_ptr<Profile>> getUserByUuid(utility::string_t uuid) const;
utility::string_t uuid
) const;
/// <summary> /// <summary>
/// Get a list of friends of the user. /// Get a list of friends of the user.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.friend.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.profile.friend.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserFriends( pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserFriends(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of games the user has played. /// Get a list of games the user has played.
/// </summary> /// </summary>
@ -619,51 +538,45 @@ public:
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.game.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.game.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<ProfileGame>>> getUserGames( pplx::task<std::vector<std::shared_ptr<ProfileGame>>> getUserGames(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of groups the user is a member of. /// Get a list of groups the user is a member of.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.group.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.profile.group.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<ProfileGroup>>> getUserGroups( pplx::task<std::vector<std::shared_ptr<ProfileGroup>>> getUserGroups(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get current user information. /// Get current user information.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.user.info&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.user.info&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<std::shared_ptr<UserInfo>> getUserInfo( pplx::task<std::shared_ptr<UserInfo>> getUserInfo() const;
) const;
/// <summary> /// <summary>
/// Get a list of punishments the user has received. /// Get a list of punishments the user has received.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.punishment.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.profile.punishment.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserPunishments( pplx::task<std::vector<std::shared_ptr<AnyType>>> getUserPunishments(utility::string_t id) const;
utility::string_t id
) const;
/// <summary> /// <summary>
/// Get a list of servers the user is owner of. /// Get a list of servers the user is owner of.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.profile.game.server.list&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.profile.game.server.list&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<GameServer>>> getUserServers( pplx::task<std::vector<std::shared_ptr<GameServer>>> getUserServers(utility::string_t id,
utility::string_t id,
boost::optional<int32_t> page, boost::optional<int32_t> page,
boost::optional<int32_t> limit boost::optional<int32_t> limit) const;
) const;
/// <summary> /// <summary>
/// Get a list of user profiles. /// Get a list of user profiles.
/// </summary> /// </summary>
@ -672,10 +585,8 @@ public:
/// </remarks> /// </remarks>
/// <param name="page"> (optional, default to 0)</param> /// <param name="page"> (optional, default to 0)</param>
/// <param name="limit"> (optional, default to 0)</param> /// <param name="limit"> (optional, default to 0)</param>
pplx::task<std::vector<std::shared_ptr<Profile>>> getUsers( pplx::task<std::vector<std::shared_ptr<Profile>>> getUsers(boost::optional<int32_t> page,
boost::optional<int32_t> page, boost::optional<int32_t> limit) const;
boost::optional<int32_t> limit
) const;
/// <summary> /// <summary>
/// Hash a string using argon2. /// Hash a string using argon2.
/// </summary> /// </summary>
@ -684,8 +595,7 @@ public:
/// </remarks> /// </remarks>
/// <param name="hashViewModel"> (optional)</param> /// <param name="hashViewModel"> (optional)</param>
pplx::task<std::shared_ptr<HashViewModel>> hashArgon2( pplx::task<std::shared_ptr<HashViewModel>> hashArgon2(
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
) const;
/// <summary> /// <summary>
/// Hash a string using bcrypt. /// Hash a string using bcrypt.
/// </summary> /// </summary>
@ -694,8 +604,7 @@ public:
/// </remarks> /// </remarks>
/// <param name="hashViewModel"> (optional)</param> /// <param name="hashViewModel"> (optional)</param>
pplx::task<std::shared_ptr<HashViewModel>> hashBcrypt( pplx::task<std::shared_ptr<HashViewModel>> hashBcrypt(
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
) const;
/// <summary> /// <summary>
/// Hash a string using md5. /// Hash a string using md5.
/// </summary> /// </summary>
@ -704,8 +613,7 @@ public:
/// </remarks> /// </remarks>
/// <param name="hashViewModel"> (optional)</param> /// <param name="hashViewModel"> (optional)</param>
pplx::task<std::shared_ptr<HashViewModel>> hashMd5( pplx::task<std::shared_ptr<HashViewModel>> hashMd5(
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
) const;
/// <summary> /// <summary>
/// Hash a string using sha256. /// Hash a string using sha256.
/// </summary> /// </summary>
@ -714,18 +622,17 @@ public:
/// </remarks> /// </remarks>
/// <param name="hashViewModel"> (optional)</param> /// <param name="hashViewModel"> (optional)</param>
pplx::task<std::shared_ptr<HashViewModel>> hashSha256( pplx::task<std::shared_ptr<HashViewModel>> hashSha256(
boost::optional<std::shared_ptr<HashViewModel>> hashViewModel boost::optional<std::shared_ptr<HashViewModel>> hashViewModel) const;
) const;
/// <summary> /// <summary>
/// Introspect a token. /// Introspect a token.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.token.introspect&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.identity.oauth2.token.introspect&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="introspectRequest"> (optional)</param> /// <param name="introspectRequest"> (optional)</param>
pplx::task<void> introspectToken( pplx::task<void> introspectToken(
boost::optional<std::shared_ptr<IntrospectRequest>> introspectRequest boost::optional<std::shared_ptr<IntrospectRequest>> introspectRequest) const;
) const;
/// <summary> /// <summary>
/// Login with name or email and password. /// Login with name or email and password.
/// </summary> /// </summary>
@ -734,16 +641,14 @@ public:
/// </remarks> /// </remarks>
/// <param name="loginRequest"> (optional)</param> /// <param name="loginRequest"> (optional)</param>
pplx::task<std::shared_ptr<LoginResponse>> login( pplx::task<std::shared_ptr<LoginResponse>> login(
boost::optional<std::shared_ptr<LoginRequest>> loginRequest boost::optional<std::shared_ptr<LoginRequest>> loginRequest) const;
) const;
/// <summary> /// <summary>
/// Invalidate credentials. /// Invalidate credentials.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.token.revoke&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.token.revoke&lt;/code&gt;
/// </remarks> /// </remarks>
pplx::task<void> logout( pplx::task<void> logout() const;
) const;
/// <summary> /// <summary>
/// Create a new user. /// Create a new user.
/// </summary> /// </summary>
@ -752,8 +657,7 @@ public:
/// </remarks> /// </remarks>
/// <param name="registerRequest"> (optional)</param> /// <param name="registerRequest"> (optional)</param>
pplx::task<std::shared_ptr<LoginResponse>> r_register( pplx::task<std::shared_ptr<LoginResponse>> r_register(
boost::optional<std::shared_ptr<RegisterRequest>> registerRequest boost::optional<std::shared_ptr<RegisterRequest>> registerRequest) const;
) const;
/// <summary> /// <summary>
/// Refresh credentials. /// Refresh credentials.
/// </summary> /// </summary>
@ -762,18 +666,16 @@ public:
/// </remarks> /// </remarks>
/// <param name="refreshRequest"> (optional)</param> /// <param name="refreshRequest"> (optional)</param>
pplx::task<std::shared_ptr<LoginResponse>> refresh( pplx::task<std::shared_ptr<LoginResponse>> refresh(
boost::optional<std::shared_ptr<RefreshRequest>> refreshRequest boost::optional<std::shared_ptr<RefreshRequest>> refreshRequest) const;
) const;
/// <summary> /// <summary>
/// Revoke a token. /// Revoke a token.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.identity.oauth2.token.revoke&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.identity.oauth2.token.revoke&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="revokeRequest"> (optional)</param> /// <param name="revokeRequest"> (optional)</param>
pplx::task<void> revokeToken( pplx::task<void> revokeToken(boost::optional<std::shared_ptr<RevokeRequest>> revokeRequest) const;
boost::optional<std::shared_ptr<RevokeRequest>> revokeRequest
) const;
/// <summary> /// <summary>
/// Advanced search for servers or players. /// Advanced search for servers or players.
/// </summary> /// </summary>
@ -782,32 +684,29 @@ public:
/// </remarks> /// </remarks>
/// <param name="searchRequest"> (optional)</param> /// <param name="searchRequest"> (optional)</param>
pplx::task<std::vector<std::shared_ptr<AnyType>>> search( pplx::task<std::vector<std::shared_ptr<AnyType>>> search(
boost::optional<std::shared_ptr<SearchRequest>> searchRequest boost::optional<std::shared_ptr<SearchRequest>> searchRequest) const;
) const;
/// <summary> /// <summary>
/// Update a game server. /// Update a game server.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.update&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.update&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> updateGameServer( pplx::task<void> updateGameServer(utility::string_t id,
utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Update a game server cluster. /// Update a game server cluster.
/// </summary> /// </summary>
/// <remarks> /// <remarks>
/// &lt;b&gt;🔒 Required permissions:&lt;/b&gt; &lt;code&gt;tribufu.community.game.server.cluster.update&lt;/code&gt; /// &lt;b&gt;🔒 Required permissions:&lt;/b&gt;
/// &lt;code&gt;tribufu.community.game.server.cluster.update&lt;/code&gt;
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> updateGameServerCluster( pplx::task<void> updateGameServerCluster(utility::string_t id,
utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Update a group. /// Update a group.
/// </summary> /// </summary>
@ -816,10 +715,7 @@ public:
/// </remarks> /// </remarks>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="body"> (optional)</param> /// <param name="body"> (optional)</param>
pplx::task<void> updateGroup( pplx::task<void> updateGroup(utility::string_t id, boost::optional<std::shared_ptr<AnyType>> body) const;
utility::string_t id,
boost::optional<std::shared_ptr<AnyType>> body
) const;
/// <summary> /// <summary>
/// Update a user profile. /// Update a user profile.
/// </summary> /// </summary>
@ -829,9 +725,7 @@ public:
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="updateProfile"> (optional)</param> /// <param name="updateProfile"> (optional)</param>
pplx::task<std::shared_ptr<Profile>> updateUserProfile( pplx::task<std::shared_ptr<Profile>> updateUserProfile(
utility::string_t id, utility::string_t id, boost::optional<std::shared_ptr<UpdateProfile>> updateProfile) const;
boost::optional<std::shared_ptr<UpdateProfile>> updateProfile
) const;
protected: protected:
std::shared_ptr<const ApiClient> m_ApiClient; std::shared_ptr<const ApiClient> m_ApiClient;
@ -841,4 +735,3 @@ protected:
} }
#endif /* TRIBUFU_API_TribufuGeneratedApi_H_ */ #endif /* TRIBUFU_API_TribufuGeneratedApi_H_ */

View File

@ -23,17 +23,16 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/AnyType.h" #include "tribufu++/AnyType.h"
#include "tribufu++/model/LoginProvider.h" #include "tribufu++/model/LoginProvider.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Account : public ModelBase
class Account
: public ModelBase
{ {
public: public:
Account(); Account();
@ -47,14 +46,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Account members /// Account members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -95,7 +94,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -120,10 +118,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ApplicationType.h" #include "tribufu++/model/ApplicationType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Application : public ModelBase
class Application
: public ModelBase
{ {
public: public:
Application(); Application();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Application members /// Application members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -154,7 +153,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -215,10 +213,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_ApplicationType_H_ #ifndef TRIBUFU_MODELS_ApplicationType_H_
#define TRIBUFU_MODELS_ApplicationType_H_ #define TRIBUFU_MODELS_ApplicationType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class ApplicationType : public ModelBase
namespace models {
class ApplicationType
: public ModelBase
{ {
public: public:
ApplicationType(); ApplicationType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eApplicationType enum class eApplicationType
{ {

View File

@ -23,17 +23,16 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include "tribufu++/model/CodeChallengeMethod.h"
#include "tribufu++/model/ResponseType.h" #include "tribufu++/model/ResponseType.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include "tribufu++/model/CodeChallengeMethod.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class AuthorizeRequest : public ModelBase
class AuthorizeRequest
: public ModelBase
{ {
public: public:
AuthorizeRequest(); AuthorizeRequest();
@ -47,14 +46,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// AuthorizeRequest members /// AuthorizeRequest members
std::shared_ptr<ResponseType> getResponseType() const; std::shared_ptr<ResponseType> getResponseType() const;
bool responseTypeIsSet() const; bool responseTypeIsSet() const;
void unsetResponse_type(); void unsetResponse_type();
@ -90,7 +89,6 @@ public:
void unsetState(); void unsetState();
void setState(const utility::string_t &value); void setState(const utility::string_t &value);
protected: protected:
std::shared_ptr<ResponseType> m_Response_type; std::shared_ptr<ResponseType> m_Response_type;
bool m_Response_typeIsSet; bool m_Response_typeIsSet;
@ -112,10 +110,8 @@ protected:
utility::string_t m_State; utility::string_t m_State;
bool m_StateIsSet; bool m_StateIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_CodeChallengeMethod_H_ #ifndef TRIBUFU_MODELS_CodeChallengeMethod_H_
#define TRIBUFU_MODELS_CodeChallengeMethod_H_ #define TRIBUFU_MODELS_CodeChallengeMethod_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class CodeChallengeMethod : public ModelBase
namespace models {
class CodeChallengeMethod
: public ModelBase
{ {
public: public:
CodeChallengeMethod(); CodeChallengeMethod();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eCodeChallengeMethod enum class eCodeChallengeMethod
{ {

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_CryptoViewModel_H_ #ifndef TRIBUFU_MODELS_CryptoViewModel_H_
#define TRIBUFU_MODELS_CryptoViewModel_H_ #define TRIBUFU_MODELS_CryptoViewModel_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class CryptoViewModel : public ModelBase
class CryptoViewModel
: public ModelBase
{ {
public: public:
CryptoViewModel(); CryptoViewModel();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// CryptoViewModel members /// CryptoViewModel members
utility::string_t getEncoded() const; utility::string_t getEncoded() const;
bool encodedIsSet() const; bool encodedIsSet() const;
void unsetEncoded(); void unsetEncoded();
@ -62,17 +60,14 @@ public:
void unsetDecoded(); void unsetDecoded();
void setDecoded(const utility::string_t &value); void setDecoded(const utility::string_t &value);
protected: protected:
utility::string_t m_Encoded; utility::string_t m_Encoded;
bool m_EncodedIsSet; bool m_EncodedIsSet;
utility::string_t m_Decoded; utility::string_t m_Decoded;
bool m_DecodedIsSet; bool m_DecodedIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ApplicationType.h" #include "tribufu++/model/ApplicationType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Game : public ModelBase
class Game
: public ModelBase
{ {
public: public:
Game(); Game();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Game members /// Game members
int32_t getGamePort() const; int32_t getGamePort() const;
bool gamePortIsSet() const; bool gamePortIsSet() const;
void unsetGame_port(); void unsetGame_port();
@ -209,7 +208,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
int32_t m_Game_port; int32_t m_Game_port;
bool m_Game_portIsSet; bool m_Game_portIsSet;
@ -303,10 +301,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ServerStatus.h" #include "tribufu++/model/ServerStatus.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class GameServer : public ModelBase
class GameServer
: public ModelBase
{ {
public: public:
GameServer(); GameServer();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GameServer members /// GameServer members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -209,7 +208,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -303,10 +301,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_GameServerCluster_H_ #ifndef TRIBUFU_MODELS_GameServerCluster_H_
#define TRIBUFU_MODELS_GameServerCluster_H_ #define TRIBUFU_MODELS_GameServerCluster_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class GameServerCluster : public ModelBase
class GameServerCluster
: public ModelBase
{ {
public: public:
GameServerCluster(); GameServerCluster();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GameServerCluster members /// GameServerCluster members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -122,7 +120,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -165,10 +162,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_GrantType_H_ #ifndef TRIBUFU_MODELS_GrantType_H_
#define TRIBUFU_MODELS_GrantType_H_ #define TRIBUFU_MODELS_GrantType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class GrantType : public ModelBase
namespace models {
class GrantType
: public ModelBase
{ {
public: public:
GrantType(); GrantType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eGrantType enum class eGrantType
{ {

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_Group_H_ #ifndef TRIBUFU_MODELS_Group_H_
#define TRIBUFU_MODELS_Group_H_ #define TRIBUFU_MODELS_Group_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Group : public ModelBase
class Group
: public ModelBase
{ {
public: public:
Group(); Group();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Group members /// Group members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -132,7 +130,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -181,10 +178,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,23 +19,22 @@
#ifndef TRIBUFU_MODELS_GroupGame_H_ #ifndef TRIBUFU_MODELS_GroupGame_H_
#define TRIBUFU_MODELS_GroupGame_H_ #define TRIBUFU_MODELS_GroupGame_H_
#include "tribufu++/ModelBase.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++/AnyType.h"
#include "tribufu++/model/Application.h"
#include "tribufu++/model/Group.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Group; class Group;
class Application; class Application;
class GroupGame : public ModelBase
class GroupGame
: public ModelBase
{ {
public: public:
GroupGame(); GroupGame();
@ -49,14 +48,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GroupGame members /// GroupGame members
utility::string_t getGroupId() const; utility::string_t getGroupId() const;
bool groupIdIsSet() const; bool groupIdIsSet() const;
void unsetGroup_id(); void unsetGroup_id();
@ -92,7 +91,6 @@ public:
void unsetLast_used(); void unsetLast_used();
void setLastUsed(const utility::datetime &value); void setLastUsed(const utility::datetime &value);
protected: protected:
utility::string_t m_Group_id; utility::string_t m_Group_id;
bool m_Group_idIsSet; bool m_Group_idIsSet;
@ -114,10 +112,8 @@ protected:
utility::datetime m_Last_used; utility::datetime m_Last_used;
bool m_Last_usedIsSet; bool m_Last_usedIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GroupRank.h" #include "tribufu++/model/GroupRank.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class GroupMember : public ModelBase
class GroupMember
: public ModelBase
{ {
public: public:
GroupMember(); GroupMember();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// GroupMember members /// GroupMember members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -99,7 +98,6 @@ public:
void unsetSince(); void unsetSince();
void setSince(const utility::datetime &value); void setSince(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -127,10 +125,8 @@ protected:
utility::datetime m_Since; utility::datetime m_Since;
bool m_SinceIsSet; bool m_SinceIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_GroupRank_H_ #ifndef TRIBUFU_MODELS_GroupRank_H_
#define TRIBUFU_MODELS_GroupRank_H_ #define TRIBUFU_MODELS_GroupRank_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class GroupRank : public ModelBase
namespace models {
class GroupRank
: public ModelBase
{ {
public: public:
GroupRank(); GroupRank();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eGroupRank enum class eGroupRank
{ {

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_HashViewModel_H_ #ifndef TRIBUFU_MODELS_HashViewModel_H_
#define TRIBUFU_MODELS_HashViewModel_H_ #define TRIBUFU_MODELS_HashViewModel_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class HashViewModel : public ModelBase
class HashViewModel
: public ModelBase
{ {
public: public:
HashViewModel(); HashViewModel();
@ -44,27 +42,24 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// HashViewModel members /// HashViewModel members
utility::string_t getValue() const; utility::string_t getValue() const;
bool valueIsSet() const; bool valueIsSet() const;
void unsetValue(); void unsetValue();
void setValue(const utility::string_t &value); void setValue(const utility::string_t &value);
protected: protected:
utility::string_t m_Value; utility::string_t m_Value;
bool m_ValueIsSet; bool m_ValueIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/TokenHintType.h" #include "tribufu++/model/TokenHintType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class IntrospectRequest : public ModelBase
class IntrospectRequest
: public ModelBase
{ {
public: public:
IntrospectRequest(); IntrospectRequest();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// IntrospectRequest members /// IntrospectRequest members
utility::string_t getToken() const; utility::string_t getToken() const;
bool tokenIsSet() const; bool tokenIsSet() const;
void unsetToken(); void unsetToken();
@ -64,17 +63,14 @@ public:
void unsetToken_type_hint(); void unsetToken_type_hint();
void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value); void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value);
protected: protected:
utility::string_t m_Token; utility::string_t m_Token;
bool m_TokenIsSet; bool m_TokenIsSet;
std::shared_ptr<TokenHintType> m_Token_type_hint; std::shared_ptr<TokenHintType> m_Token_type_hint;
bool m_Token_type_hintIsSet; bool m_Token_type_hintIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_IpAddress_H_ #ifndef TRIBUFU_MODELS_IpAddress_H_
#define TRIBUFU_MODELS_IpAddress_H_ #define TRIBUFU_MODELS_IpAddress_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class IpAddress : public ModelBase
class IpAddress
: public ModelBase
{ {
public: public:
IpAddress(); IpAddress();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// IpAddress members /// IpAddress members
utility::string_t getAddress() const; utility::string_t getAddress() const;
bool addressIsSet() const; bool addressIsSet() const;
void unsetAddress(); void unsetAddress();
@ -142,7 +140,6 @@ public:
void unsetLongitude(); void unsetLongitude();
void setLongitude(float value); void setLongitude(float value);
protected: protected:
utility::string_t m_Address; utility::string_t m_Address;
bool m_AddressIsSet; bool m_AddressIsSet;
@ -197,10 +194,8 @@ protected:
float m_Longitude; float m_Longitude;
bool m_LongitudeIsSet; bool m_LongitudeIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_LeaderboardItem_H_ #ifndef TRIBUFU_MODELS_LeaderboardItem_H_
#define TRIBUFU_MODELS_LeaderboardItem_H_ #define TRIBUFU_MODELS_LeaderboardItem_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class LeaderboardItem : public ModelBase
class LeaderboardItem
: public ModelBase
{ {
public: public:
LeaderboardItem(); LeaderboardItem();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// LeaderboardItem members /// LeaderboardItem members
utility::string_t getName() const; utility::string_t getName() const;
bool nameIsSet() const; bool nameIsSet() const;
void unsetName(); void unsetName();
@ -82,7 +80,6 @@ public:
void unsetPoints(); void unsetPoints();
void setPoints(double value); void setPoints(double value);
protected: protected:
utility::string_t m_Name; utility::string_t m_Name;
bool m_NameIsSet; bool m_NameIsSet;
@ -101,10 +98,8 @@ protected:
double m_Points; double m_Points;
bool m_PointsIsSet; bool m_PointsIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_LeaderboardOrder_H_ #ifndef TRIBUFU_MODELS_LeaderboardOrder_H_
#define TRIBUFU_MODELS_LeaderboardOrder_H_ #define TRIBUFU_MODELS_LeaderboardOrder_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class LeaderboardOrder : public ModelBase
namespace models {
class LeaderboardOrder
: public ModelBase
{ {
public: public:
LeaderboardOrder(); LeaderboardOrder();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eLeaderboardOrder enum class eLeaderboardOrder
{ {

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_LoginProvider_H_ #ifndef TRIBUFU_MODELS_LoginProvider_H_
#define TRIBUFU_MODELS_LoginProvider_H_ #define TRIBUFU_MODELS_LoginProvider_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class LoginProvider : public ModelBase
namespace models {
class LoginProvider
: public ModelBase
{ {
public: public:
LoginProvider(); LoginProvider();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eLoginProvider enum class eLoginProvider
{ {

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_LoginRequest_H_ #ifndef TRIBUFU_MODELS_LoginRequest_H_
#define TRIBUFU_MODELS_LoginRequest_H_ #define TRIBUFU_MODELS_LoginRequest_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class LoginRequest : public ModelBase
class LoginRequest
: public ModelBase
{ {
public: public:
LoginRequest(); LoginRequest();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// LoginRequest members /// LoginRequest members
utility::string_t getLogin() const; utility::string_t getLogin() const;
bool loginIsSet() const; bool loginIsSet() const;
void unsetLogin(); void unsetLogin();
@ -62,17 +60,14 @@ public:
void unsetPassword(); void unsetPassword();
void setPassword(const utility::string_t &value); void setPassword(const utility::string_t &value);
protected: protected:
utility::string_t m_Login; utility::string_t m_Login;
bool m_LoginIsSet; bool m_LoginIsSet;
utility::string_t m_Password; utility::string_t m_Password;
bool m_PasswordIsSet; bool m_PasswordIsSet;
}; };
} }
} }

View File

@ -19,20 +19,19 @@
#ifndef TRIBUFU_MODELS_LoginResponse_H_ #ifndef TRIBUFU_MODELS_LoginResponse_H_
#define TRIBUFU_MODELS_LoginResponse_H_ #define TRIBUFU_MODELS_LoginResponse_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include "tribufu++/model/UserInfo.h" #include "tribufu++/model/UserInfo.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class UserInfo; class UserInfo;
class LoginResponse : public ModelBase
class LoginResponse
: public ModelBase
{ {
public: public:
LoginResponse(); LoginResponse();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// LoginResponse members /// LoginResponse members
std::shared_ptr<UserInfo> getUser() const; std::shared_ptr<UserInfo> getUser() const;
bool userIsSet() const; bool userIsSet() const;
void unsetUser(); void unsetUser();
@ -74,7 +73,6 @@ public:
void unsetExpires_in(); void unsetExpires_in();
void setExpiresIn(int64_t value); void setExpiresIn(int64_t value);
protected: protected:
std::shared_ptr<UserInfo> m_User; std::shared_ptr<UserInfo> m_User;
bool m_UserIsSet; bool m_UserIsSet;
@ -87,10 +85,8 @@ protected:
int64_t m_Expires_in; int64_t m_Expires_in;
bool m_Expires_inIsSet; bool m_Expires_inIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_Package_H_ #ifndef TRIBUFU_MODELS_Package_H_
#define TRIBUFU_MODELS_Package_H_ #define TRIBUFU_MODELS_Package_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Package : public ModelBase
class Package
: public ModelBase
{ {
public: public:
Package(); Package();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Package members /// Package members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -112,7 +110,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -149,10 +146,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_Profile_H_ #ifndef TRIBUFU_MODELS_Profile_H_
#define TRIBUFU_MODELS_Profile_H_ #define TRIBUFU_MODELS_Profile_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Profile : public ModelBase
class Profile
: public ModelBase
{ {
public: public:
Profile(); Profile();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Profile members /// Profile members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -142,7 +140,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -197,10 +194,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,19 +19,17 @@
#ifndef TRIBUFU_MODELS_ProfileGame_H_ #ifndef TRIBUFU_MODELS_ProfileGame_H_
#define TRIBUFU_MODELS_ProfileGame_H_ #define TRIBUFU_MODELS_ProfileGame_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/AnyType.h" #include "tribufu++/AnyType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class ProfileGame : public ModelBase
class ProfileGame
: public ModelBase
{ {
public: public:
ProfileGame(); ProfileGame();
@ -45,14 +43,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// ProfileGame members /// ProfileGame members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -108,7 +106,6 @@ public:
void unsetLast_used(); void unsetLast_used();
void setLastUsed(const utility::datetime &value); void setLastUsed(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -142,10 +139,8 @@ protected:
utility::datetime m_Last_used; utility::datetime m_Last_used;
bool m_Last_usedIsSet; bool m_Last_usedIsSet;
}; };
} }
} }

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GroupRank.h" #include "tribufu++/model/GroupRank.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class ProfileGroup : public ModelBase
class ProfileGroup
: public ModelBase
{ {
public: public:
ProfileGroup(); ProfileGroup();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// ProfileGroup members /// ProfileGroup members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -104,7 +103,6 @@ public:
void unsetSince(); void unsetSince();
void setSince(const utility::datetime &value); void setSince(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -135,10 +133,8 @@ protected:
utility::datetime m_Since; utility::datetime m_Since;
bool m_SinceIsSet; bool m_SinceIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_RefreshRequest_H_ #ifndef TRIBUFU_MODELS_RefreshRequest_H_
#define TRIBUFU_MODELS_RefreshRequest_H_ #define TRIBUFU_MODELS_RefreshRequest_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class RefreshRequest : public ModelBase
class RefreshRequest
: public ModelBase
{ {
public: public:
RefreshRequest(); RefreshRequest();
@ -44,27 +42,24 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RefreshRequest members /// RefreshRequest members
utility::string_t getRefreshToken() const; utility::string_t getRefreshToken() const;
bool refreshTokenIsSet() const; bool refreshTokenIsSet() const;
void unsetRefresh_token(); void unsetRefresh_token();
void setRefreshToken(const utility::string_t &value); void setRefreshToken(const utility::string_t &value);
protected: protected:
utility::string_t m_Refresh_token; utility::string_t m_Refresh_token;
bool m_Refresh_tokenIsSet; bool m_Refresh_tokenIsSet;
}; };
} }
} }

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_RegisterRequest_H_ #ifndef TRIBUFU_MODELS_RegisterRequest_H_
#define TRIBUFU_MODELS_RegisterRequest_H_ #define TRIBUFU_MODELS_RegisterRequest_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class RegisterRequest : public ModelBase
class RegisterRequest
: public ModelBase
{ {
public: public:
RegisterRequest(); RegisterRequest();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RegisterRequest members /// RegisterRequest members
utility::string_t getUuid() const; utility::string_t getUuid() const;
bool uuidIsSet() const; bool uuidIsSet() const;
void unsetUuid(); void unsetUuid();
@ -72,7 +70,6 @@ public:
void unsetPassword(); void unsetPassword();
void setPassword(const utility::string_t &value); void setPassword(const utility::string_t &value);
protected: protected:
utility::string_t m_Uuid; utility::string_t m_Uuid;
bool m_UuidIsSet; bool m_UuidIsSet;
@ -85,10 +82,8 @@ protected:
utility::string_t m_Password; utility::string_t m_Password;
bool m_PasswordIsSet; bool m_PasswordIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_ResponseType_H_ #ifndef TRIBUFU_MODELS_ResponseType_H_
#define TRIBUFU_MODELS_ResponseType_H_ #define TRIBUFU_MODELS_ResponseType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class ResponseType : public ModelBase
namespace models {
class ResponseType
: public ModelBase
{ {
public: public:
ResponseType(); ResponseType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eResponseType enum class eResponseType
{ {

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/TokenHintType.h" #include "tribufu++/model/TokenHintType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class RevokeRequest : public ModelBase
class RevokeRequest
: public ModelBase
{ {
public: public:
RevokeRequest(); RevokeRequest();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// RevokeRequest members /// RevokeRequest members
utility::string_t getToken() const; utility::string_t getToken() const;
bool tokenIsSet() const; bool tokenIsSet() const;
void unsetToken(); void unsetToken();
@ -64,17 +63,14 @@ public:
void unsetToken_type_hint(); void unsetToken_type_hint();
void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value); void setTokenTypeHint(const std::shared_ptr<TokenHintType> &value);
protected: protected:
utility::string_t m_Token; utility::string_t m_Token;
bool m_TokenIsSet; bool m_TokenIsSet;
std::shared_ptr<TokenHintType> m_Token_type_hint; std::shared_ptr<TokenHintType> m_Token_type_hint;
bool m_Token_type_hintIsSet; bool m_Token_type_hintIsSet;
}; };
} }
} }

View File

@ -26,13 +26,12 @@
#include "tribufu++/model/SearchType.h" #include "tribufu++/model/SearchType.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class SearchRequest : public ModelBase
class SearchRequest
: public ModelBase
{ {
public: public:
SearchRequest(); SearchRequest();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// SearchRequest members /// SearchRequest members
std::shared_ptr<SearchType> getType() const; std::shared_ptr<SearchType> getType() const;
bool typeIsSet() const; bool typeIsSet() const;
void unsetType(); void unsetType();
@ -74,7 +73,6 @@ public:
void unsetGame_id(); void unsetGame_id();
void setGameId(const utility::string_t &value); void setGameId(const utility::string_t &value);
protected: protected:
std::shared_ptr<SearchType> m_Type; std::shared_ptr<SearchType> m_Type;
bool m_TypeIsSet; bool m_TypeIsSet;
@ -87,10 +85,8 @@ protected:
utility::string_t m_Game_id; utility::string_t m_Game_id;
bool m_Game_idIsSet; bool m_Game_idIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_SearchType_H_ #ifndef TRIBUFU_MODELS_SearchType_H_
#define TRIBUFU_MODELS_SearchType_H_ #define TRIBUFU_MODELS_SearchType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class SearchType : public ModelBase
namespace models {
class SearchType
: public ModelBase
{ {
public: public:
SearchType(); SearchType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eSearchType enum class eSearchType
{ {

View File

@ -19,17 +19,14 @@
#ifndef TRIBUFU_MODELS_ServerMetrics_H_ #ifndef TRIBUFU_MODELS_ServerMetrics_H_
#define TRIBUFU_MODELS_ServerMetrics_H_ #define TRIBUFU_MODELS_ServerMetrics_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class ServerMetrics : public ModelBase
namespace models {
class ServerMetrics
: public ModelBase
{ {
public: public:
ServerMetrics(); ServerMetrics();
@ -43,14 +40,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// ServerMetrics members /// ServerMetrics members
int32_t getServerCount() const; int32_t getServerCount() const;
bool serverCountIsSet() const; bool serverCountIsSet() const;
void unsetServer_count(); void unsetServer_count();
@ -66,7 +63,6 @@ public:
void unsetCountry_count(); void unsetCountry_count();
void setCountryCount(int32_t value); void setCountryCount(int32_t value);
protected: protected:
int32_t m_Server_count; int32_t m_Server_count;
bool m_Server_countIsSet; bool m_Server_countIsSet;
@ -76,10 +72,8 @@ protected:
int32_t m_Country_count; int32_t m_Country_count;
bool m_Country_countIsSet; bool m_Country_countIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_ServerStatus_H_ #ifndef TRIBUFU_MODELS_ServerStatus_H_
#define TRIBUFU_MODELS_ServerStatus_H_ #define TRIBUFU_MODELS_ServerStatus_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class ServerStatus : public ModelBase
namespace models {
class ServerStatus
: public ModelBase
{ {
public: public:
ServerStatus(); ServerStatus();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eServerStatus enum class eServerStatus
{ {

View File

@ -19,19 +19,17 @@
#ifndef TRIBUFU_MODELS_Subscription_H_ #ifndef TRIBUFU_MODELS_Subscription_H_
#define TRIBUFU_MODELS_Subscription_H_ #define TRIBUFU_MODELS_Subscription_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
#include <map> #include <map>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class Subscription : public ModelBase
class Subscription
: public ModelBase
{ {
public: public:
Subscription(); Subscription();
@ -45,14 +43,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// Subscription members /// Subscription members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -88,7 +86,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -110,10 +107,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_TokenHintType_H_ #ifndef TRIBUFU_MODELS_TokenHintType_H_
#define TRIBUFU_MODELS_TokenHintType_H_ #define TRIBUFU_MODELS_TokenHintType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class TokenHintType : public ModelBase
namespace models {
class TokenHintType
: public ModelBase
{ {
public: public:
TokenHintType(); TokenHintType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eTokenHintType enum class eTokenHintType
{ {

View File

@ -23,16 +23,15 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GrantType.h" #include "tribufu++/model/GrantType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class TokenRequest : public ModelBase
class TokenRequest
: public ModelBase
{ {
public: public:
TokenRequest(); TokenRequest();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// TokenRequest members /// TokenRequest members
std::shared_ptr<GrantType> getGrantType() const; std::shared_ptr<GrantType> getGrantType() const;
bool grantTypeIsSet() const; bool grantTypeIsSet() const;
void unsetGrant_type(); void unsetGrant_type();
@ -94,7 +93,6 @@ public:
void unsetCode_verifier(); void unsetCode_verifier();
void setCodeVerifier(const utility::string_t &value); void setCodeVerifier(const utility::string_t &value);
protected: protected:
std::shared_ptr<GrantType> m_Grant_type; std::shared_ptr<GrantType> m_Grant_type;
bool m_Grant_typeIsSet; bool m_Grant_typeIsSet;
@ -119,10 +117,8 @@ protected:
utility::string_t m_Code_verifier; utility::string_t m_Code_verifier;
bool m_Code_verifierIsSet; bool m_Code_verifierIsSet;
}; };
} }
} }

View File

@ -26,13 +26,12 @@
#include "tribufu++/model/TokenType.h" #include "tribufu++/model/TokenType.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class TokenResponse : public ModelBase
class TokenResponse
: public ModelBase
{ {
public: public:
TokenResponse(); TokenResponse();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// TokenResponse members /// TokenResponse members
std::shared_ptr<TokenType> getTokenType() const; std::shared_ptr<TokenType> getTokenType() const;
bool tokenTypeIsSet() const; bool tokenTypeIsSet() const;
void unsetToken_type(); void unsetToken_type();
@ -84,7 +83,6 @@ public:
void unsetExpires_in(); void unsetExpires_in();
void setExpiresIn(int64_t value); void setExpiresIn(int64_t value);
protected: protected:
std::shared_ptr<TokenType> m_Token_type; std::shared_ptr<TokenType> m_Token_type;
bool m_Token_typeIsSet; bool m_Token_typeIsSet;
@ -103,10 +101,8 @@ protected:
int64_t m_Expires_in; int64_t m_Expires_in;
bool m_Expires_inIsSet; bool m_Expires_inIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_TokenType_H_ #ifndef TRIBUFU_MODELS_TokenType_H_
#define TRIBUFU_MODELS_TokenType_H_ #define TRIBUFU_MODELS_TokenType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class TokenType : public ModelBase
namespace models {
class TokenType
: public ModelBase
{ {
public: public:
TokenType(); TokenType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eTokenType enum class eTokenType
{ {

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_UpdateProfile_H_ #ifndef TRIBUFU_MODELS_UpdateProfile_H_
#define TRIBUFU_MODELS_UpdateProfile_H_ #define TRIBUFU_MODELS_UpdateProfile_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class UpdateProfile : public ModelBase
class UpdateProfile
: public ModelBase
{ {
public: public:
UpdateProfile(); UpdateProfile();
@ -44,14 +42,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// UpdateProfile members /// UpdateProfile members
utility::string_t getDisplayName() const; utility::string_t getDisplayName() const;
bool displayNameIsSet() const; bool displayNameIsSet() const;
void unsetDisplay_name(); void unsetDisplay_name();
@ -62,17 +60,14 @@ public:
void unsetBiography(); void unsetBiography();
void setBiography(const utility::string_t &value); void setBiography(const utility::string_t &value);
protected: protected:
utility::string_t m_Display_name; utility::string_t m_Display_name;
bool m_Display_nameIsSet; bool m_Display_nameIsSet;
utility::string_t m_Biography; utility::string_t m_Biography;
bool m_BiographyIsSet; bool m_BiographyIsSet;
}; };
} }
} }

View File

@ -26,13 +26,12 @@
#include "tribufu++/model/UserType.h" #include "tribufu++/model/UserType.h"
#include <cpprest/details/basic_types.h> #include <cpprest/details/basic_types.h>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
class UserInfo : public ModelBase
class UserInfo
: public ModelBase
{ {
public: public:
UserInfo(); UserInfo();
@ -46,14 +45,14 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
///////////////////////////////////////////// /////////////////////////////////////////////
/// UserInfo members /// UserInfo members
utility::string_t getId() const; utility::string_t getId() const;
bool idIsSet() const; bool idIsSet() const;
void unsetId(); void unsetId();
@ -179,7 +178,6 @@ public:
void unsetUpdated(); void unsetUpdated();
void setUpdated(const utility::datetime &value); void setUpdated(const utility::datetime &value);
protected: protected:
utility::string_t m_Id; utility::string_t m_Id;
bool m_IdIsSet; bool m_IdIsSet;
@ -255,10 +253,8 @@ protected:
utility::datetime m_Updated; utility::datetime m_Updated;
bool m_UpdatedIsSet; bool m_UpdatedIsSet;
}; };
} }
} }

View File

@ -19,16 +19,14 @@
#ifndef TRIBUFU_MODELS_UserType_H_ #ifndef TRIBUFU_MODELS_UserType_H_
#define TRIBUFU_MODELS_UserType_H_ #define TRIBUFU_MODELS_UserType_H_
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu
{
namespace models
{
namespace tribufu { class UserType : public ModelBase
namespace models {
class UserType
: public ModelBase
{ {
public: public:
UserType(); UserType();
@ -42,8 +40,10 @@ public:
web::json::value toJson() const override; web::json::value toJson() const override;
bool fromJson(const web::json::value &json) override; bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override; void toMultipart(std::shared_ptr<MultipartFormData> multipart,
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override; const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eUserType enum class eUserType
{ {

View File

@ -1,9 +1,12 @@
#!/usr/bin/env pwsh #!/usr/bin/env pwsh
$env:CPP_POST_PROCESS_FILE = "clang-format -i"
java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate ` java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate `
-i https://api.tribufu.com/openapi.json ` -i https://api.tribufu.com/openapi.json `
-g cpp-restsdk ` -g cpp-restsdk `
-o . ` -o . `
--enable-post-process-file `
--global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false ` --global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false `
--additional-properties=packageName=tribufu++,apiPackage=tribufu.api,modelPackage=tribufu.models ` --additional-properties=packageName=tribufu++,apiPackage=tribufu.api,modelPackage=tribufu.models `
--openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated ` --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated `

View File

@ -12,34 +12,49 @@
#include "tribufu++/AnyType.h" #include "tribufu++/AnyType.h"
namespace tribufu { namespace tribufu
namespace models { {
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_value = val;
m_IsSet = true; m_IsSet = true;
return isSet(); return isSet();
} }
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart, void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
const utility::string_t &prefix) const { {
if (m_value.is_object()) { if (m_value.is_object())
{
return Object::toMultipart(multipart, prefix); return Object::toMultipart(multipart, prefix);
} }
throw std::runtime_error("AnyType::toMultipart: unsupported type"); throw std::runtime_error("AnyType::toMultipart: unsupported type");
} }
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
const utility::string_t &prefix) { {
if (m_value.is_object()) { if (m_value.is_object())
{
return Object::fromMultiPart(multipart, prefix); return Object::fromMultiPart(multipart, prefix);
} }
return false; return false;

View File

@ -11,39 +11,41 @@
*/ */
#include "tribufu++/ApiClient.h" #include "tribufu++/ApiClient.h"
#include "tribufu++/MultipartFormData.h"
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
#include "tribufu++/MultipartFormData.h"
#include <sstream>
#include <limits>
#include <iomanip> #include <iomanip>
#include <limits>
#include <sstream>
template <typename T> template <typename T> utility::string_t toString(const T value)
utility::string_t toString(const T value)
{ {
utility::ostringstream_t out; utility::ostringstream_t out;
out << std::setprecision(std::numeric_limits<T>::digits10) << std::fixed << value; out << std::setprecision(std::numeric_limits<T>::digits10) << std::fixed << value;
return out.str(); return out.str();
} }
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
using namespace tribufu::models; using namespace tribufu::models;
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration ) ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration) : m_Configuration(configuration)
: m_Configuration(configuration)
{ {
} }
ApiClient::~ApiClient() ApiClient::~ApiClient()
{ {
} }
const ApiClient::ResponseHandlerType& ApiClient::getResponseHandler() const { const ApiClient::ResponseHandlerType &ApiClient::getResponseHandler() const
{
return m_ResponseHandler; return m_ResponseHandler;
} }
void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) { void ApiClient::setResponseHandler(const ResponseHandlerType &responseHandler)
{
m_ResponseHandler = responseHandler; m_ResponseHandler = responseHandler;
} }
@ -56,7 +58,6 @@ void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configu
m_Configuration = configuration; m_Configuration = configuration;
} }
utility::string_t ApiClient::parameterToString(utility::string_t value) utility::string_t ApiClient::parameterToString(utility::string_t value)
{ {
return value; return value;
@ -97,15 +98,13 @@ utility::string_t ApiClient::parameterToString(bool value)
} }
pplx::task<web::http::http_response> ApiClient::callApi( pplx::task<web::http::http_response> ApiClient::callApi(
const utility::string_t& path, const utility::string_t &path, const utility::string_t &method,
const utility::string_t& method,
const std::map<utility::string_t, utility::string_t> &queryParams, const std::map<utility::string_t, utility::string_t> &queryParams,
const std::shared_ptr<IHttpBody> postBody, 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> &headerParams,
const std::map<utility::string_t, utility::string_t> &formParams, const std::map<utility::string_t, utility::string_t> &formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams, const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams,
const utility::string_t& contentType const utility::string_t &contentType) const
) const
{ {
if (postBody != nullptr && formParams.size() != 0) 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")) 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()); 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); uploadData.writeTo(data);
auto bodyString = data.str(); auto bodyString = data.str();
const auto length = bodyString.size(); 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 else
{ {
@ -155,7 +157,8 @@ pplx::task<web::http::http_response> ApiClient::callApi(
postBody->writeTo(data); postBody->writeTo(data);
auto bodyString = data.str(); auto bodyString = data.str();
const auto length = bodyString.size(); 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 else
{ {
@ -180,7 +183,8 @@ pplx::task<web::http::http_response> ApiClient::callApi(
} }
if (!formParams.empty()) 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"));
} }
} }
} }

View File

@ -12,8 +12,10 @@
#include "tribufu++/ApiConfiguration.h" #include "tribufu++/ApiConfiguration.h"
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
ApiConfiguration::ApiConfiguration() ApiConfiguration::ApiConfiguration()
{ {

View File

@ -12,23 +12,20 @@
#include "tribufu++/ApiException.h" #include "tribufu++/ApiException.h"
namespace tribufu { namespace tribufu
namespace api { {
namespace api
{
ApiException::ApiException( int errorCode ApiException::ApiException(int errorCode, const utility::string_t &message,
, const utility::string_t& message std::shared_ptr<std::istream> content /*= nullptr*/)
, std::shared_ptr<std::istream> content /*= nullptr*/ ) : web::http::http_exception(errorCode, message), m_Content(content)
: web::http::http_exception( errorCode, message )
, m_Content(content)
{ {
} }
ApiException::ApiException( int errorCode ApiException::ApiException(int errorCode, const utility::string_t &message,
, const utility::string_t& message std::map<utility::string_t, utility::string_t> &headers,
, std::map<utility::string_t, utility::string_t>& headers std::shared_ptr<std::istream> content /*= nullptr*/)
, std::shared_ptr<std::istream> content /*= nullptr*/ ) : web::http::http_exception(errorCode, message), m_Content(content), m_Headers(headers)
: web::http::http_exception( errorCode, message )
, m_Content(content)
, m_Headers(headers)
{ {
} }

View File

@ -12,8 +12,10 @@
#include "tribufu++/HttpContent.h" #include "tribufu++/HttpContent.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
HttpContent::HttpContent() HttpContent::HttpContent()
{ {

View File

@ -12,11 +12,12 @@
#include "tribufu++/JsonBody.h" #include "tribufu++/JsonBody.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
JsonBody::JsonBody( const web::json::value& json) JsonBody::JsonBody(const web::json::value &json) : m_Json(json)
: m_Json(json)
{ {
} }

View File

@ -12,8 +12,10 @@
#include "tribufu++/ModelBase.h" #include "tribufu++/ModelBase.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
ModelBase::ModelBase() : m_IsSet(false) ModelBase::ModelBase() : m_IsSet(false)
{ {
@ -115,10 +117,12 @@ web::json::value ModelBase::toJson( const std::shared_ptr<HttpContent>& content
web::json::value value; web::json::value value;
if (content != nullptr) 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("ContentType")] = ModelBase::toJson(content->getContentType());
value[utility::conversions::to_string_t("FileName")] = ModelBase::toJson(content->getFileName()); 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; return value;
} }
@ -253,7 +257,8 @@ bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<HttpCo
} }
if (outVal != nullptr) 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 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) 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(); return val.is_double() || val.is_integer();
} }
bool ModelBase::fromJson(const web::json::value &val, double &outVal) 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(); return val.is_double() || val.is_integer();
} }
bool ModelBase::fromJson(const web::json::value &val, int32_t &outVal) 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) 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(); return outVal.is_initialized();
} }
bool ModelBase::fromJson(const web::json::value &val, web::json::value &outVal) 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"))) if (val.has_field(utility::conversions::to_string_t("ContentDisposition")))
{ {
utility::string_t value; 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); content->setContentDisposition(value);
} }
if (val.has_field(utility::conversions::to_string_t("ContentType"))) if (val.has_field(utility::conversions::to_string_t("ContentType")))
{ {
utility::string_t value; 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); content->setContentType(value);
} }
if (val.has_field(utility::conversions::to_string_t("FileName"))) if (val.has_field(utility::conversions::to_string_t("FileName")))
{ {
utility::string_t value; 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); content->setFileName(value);
} }
if (val.has_field(utility::conversions::to_string_t("InputStream"))) if (val.has_field(utility::conversions::to_string_t("InputStream")))
{ {
utility::string_t value; 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)); content->setData(ModelBase::fromBase64(value));
} }
} }
@ -364,7 +377,8 @@ bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<utility::
} }
return ok; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); 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)); content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); 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)); content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); 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)); content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); 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)); content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); 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)); content->setData(std::shared_ptr<std::istream>(valueAsStringStream));
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; 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); std::shared_ptr<HttpContent> content(new HttpContent);
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; 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); std::shared_ptr<HttpContent> content(new HttpContent);
if (value != nullptr) if (value != nullptr)
@ -459,7 +487,9 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t&
} }
return content; 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); std::shared_ptr<HttpContent> content(new HttpContent);
if (value != nullptr) if (value != nullptr)
@ -467,60 +497,67 @@ std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& n
content->setName(name); content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data")); content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType); 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; return content;
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, bool &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, bool &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, float &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, float &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, double &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, double &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int32_t &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int32_t &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int64_t &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, int64_t &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::string_t &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(); std::shared_ptr<std::istream> data = val->getData();
data->seekg(0, data->beg); data->seekg(0, data->beg);
std::string str((std::istreambuf_iterator<char>(*data.get())), std::string str((std::istreambuf_iterator<char>(*data.get())), std::istreambuf_iterator<char>());
std::istreambuf_iterator<char>());
outVal = utility::conversions::to_string_t(str); outVal = utility::conversions::to_string_t(str);
return true; return true;
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::datetime &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, utility::datetime &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
outVal = utility::datetime::from_string(str, utility::datetime::ISO_8601); outVal = utility::datetime::from_string(str, utility::datetime::ISO_8601);
return true; 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) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); return fromString(str, outVal);
} }
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &outVal) bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &outVal)
{ {
utility::string_t str; utility::string_t str;
if( val == nullptr ) return false; if (val == nullptr)
return false;
if (outVal == nullptr) if (outVal == nullptr)
{ {
outVal = std::shared_ptr<HttpContent>(new HttpContent()); 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); ModelBase::fromHttpContent(val, str);
return fromString(str, outVal); 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 Base64Chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const static char Base64PadChar = '='; const static char Base64PadChar = '=';
utility::string_t ModelBase::toBase64(utility::string_t value) 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); result->write(outBuf, 1);
return result; return result;
default: 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 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; ++cursor;
} }

View File

@ -16,8 +16,10 @@
#include <boost/uuid/random_generator.hpp> #include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp> #include <boost/uuid/uuid_io.hpp>
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
MultipartFormData::MultipartFormData() MultipartFormData::MultipartFormData()
{ {
@ -26,10 +28,8 @@ MultipartFormData::MultipartFormData()
m_Boundary = uuidString.str(); m_Boundary = uuidString.str();
} }
MultipartFormData::MultipartFormData(const utility::string_t& boundary) MultipartFormData::MultipartFormData(const utility::string_t &boundary) : m_Boundary(boundary)
: m_Boundary(boundary)
{ {
} }
MultipartFormData::~MultipartFormData() MultipartFormData::~MultipartFormData()
@ -69,10 +69,12 @@ void MultipartFormData::writeTo( std::ostream& target )
std::shared_ptr<HttpContent> content = m_Contents[i]; std::shared_ptr<HttpContent> content = m_Contents[i];
// boundary // boundary
target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n"; target << "\r\n"
<< "--" << utility::conversions::to_utf8string(m_Boundary) << "\r\n";
// headers // headers
target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() ); target << "Content-Disposition: "
<< utility::conversions::to_utf8string(content->getContentDisposition());
if (content->getName().size() > 0) if (content->getName().size() > 0)
{ {
target << "; name=\"" << utility::conversions::to_utf8string(content->getName()) << "\""; target << "; name=\"" << utility::conversions::to_utf8string(content->getName()) << "\"";
@ -85,7 +87,8 @@ void MultipartFormData::writeTo( std::ostream& target )
if (content->getContentType().size() > 0) 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"; target << "\r\n";

View File

@ -12,8 +12,10 @@
#include "tribufu++/Object.h" #include "tribufu++/Object.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Object::Object() Object::Object()
{ {
@ -26,7 +28,6 @@ Object::~Object()
void Object::validate() void Object::validate()
{ {
} }
web::json::value Object::toJson() const 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 void Object::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = 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("."); 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) bool Object::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{ {
utility::string_t namePrefix = 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("."); 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; m_IsSet = true;
} }
@ -74,7 +79,6 @@ web::json::value Object::getValue(const utility::string_t& key) const
return m_object.at(key); return m_object.at(key);
} }
void Object::setValue(const utility::string_t &key, const web::json::value &value) void Object::setValue(const utility::string_t &key, const web::json::value &value)
{ {
if (!value.is_null()) if (!value.is_null())

File diff suppressed because it is too large Load Diff

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Account.h" #include "tribufu++/model/Account.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Account::Account() Account::Account()
{ {
@ -102,7 +102,6 @@ bool Account::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("provider")))) 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; std::shared_ptr<LoginProvider> refVal_setProvider;
ok &= ModelBase::fromJson(fieldValue, refVal_setProvider); ok &= ModelBase::fromJson(fieldValue, refVal_setProvider);
setProvider(refVal_setProvider); setProvider(refVal_setProvider);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("user_id")))) 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; utility::string_t refVal_setUserId;
ok &= ModelBase::fromJson(fieldValue, refVal_setUserId); ok &= ModelBase::fromJson(fieldValue, refVal_setUserId);
setUserId(refVal_setUserId); setUserId(refVal_setUserId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("authorized")))) 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; bool refVal_setAuthorized;
ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorized); ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorized);
setAuthorized(refVal_setAuthorized); setAuthorized(refVal_setAuthorized);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("fields")))) 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; std::shared_ptr<AnyType> refVal_setFields;
ok &= ModelBase::fromJson(fieldValue, refVal_setFields); ok &= ModelBase::fromJson(fieldValue, refVal_setFields);
setFields(refVal_setFields); setFields(refVal_setFields);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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 void Account::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -198,31 +191,38 @@ void Account::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("provider")))) if (multipart->hasContent(utility::conversions::to_string_t(U("provider"))))
{ {
std::shared_ptr<LoginProvider> refVal_setProvider; 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); setProvider(refVal_setProvider);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("user_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("user_id"))))
{ {
utility::string_t refVal_setUserId; 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); setUserId(refVal_setUserId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("authorized")))) if (multipart->hasContent(utility::conversions::to_string_t(U("authorized"))))
{ {
bool refVal_setAuthorized; 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); setAuthorized(refVal_setAuthorized);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("fields")))) if (multipart->hasContent(utility::conversions::to_string_t(U("fields"))))
{ {
std::shared_ptr<AnyType> refVal_setFields; 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); setFields(refVal_setFields);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Account::getId() const utility::string_t Account::getId() const
{ {
return m_Id; return m_Id;
} }
void Account::setId(const utility::string_t &value) void Account::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -313,7 +320,6 @@ utility::string_t Account::getName() const
return m_Name; return m_Name;
} }
void Account::setName(const utility::string_t &value) void Account::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -334,7 +340,6 @@ std::shared_ptr<LoginProvider> Account::getProvider() const
return m_Provider; return m_Provider;
} }
void Account::setProvider(const std::shared_ptr<LoginProvider> &value) void Account::setProvider(const std::shared_ptr<LoginProvider> &value)
{ {
m_Provider = value; m_Provider = value;
@ -355,7 +360,6 @@ utility::string_t Account::getUserId() const
return m_User_id; return m_User_id;
} }
void Account::setUserId(const utility::string_t &value) void Account::setUserId(const utility::string_t &value)
{ {
m_User_id = value; m_User_id = value;
@ -396,7 +400,6 @@ std::shared_ptr<AnyType> Account::getFields() const
return m_Fields; return m_Fields;
} }
void Account::setFields(const std::shared_ptr<AnyType> &value) void Account::setFields(const std::shared_ptr<AnyType> &value)
{ {
m_Fields = value; m_Fields = value;
@ -417,7 +420,6 @@ utility::datetime Account::getCreated() const
return m_Created; return m_Created;
} }
void Account::setCreated(const utility::datetime &value) void Account::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -438,7 +440,6 @@ utility::datetime Account::getUpdated() const
return m_Updated; return m_Updated;
} }
void Account::setUpdated(const utility::datetime &value) void Account::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -457,5 +458,3 @@ void Account::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Application.h" #include "tribufu++/model/Application.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Application::Application() Application::Application()
{ {
@ -187,7 +187,6 @@ bool Application::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("type")))) 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; std::shared_ptr<ApplicationType> refVal_setType;
ok &= ModelBase::fromJson(fieldValue, refVal_setType); ok &= ModelBase::fromJson(fieldValue, refVal_setType);
setType(refVal_setType); setType(refVal_setType);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("organization_id")))) 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; utility::string_t refVal_setOrganizationId;
ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId); ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId);
setOrganizationId(refVal_setOrganizationId); setOrganizationId(refVal_setOrganizationId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("icon_url")))) 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; utility::string_t refVal_setIconUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl);
setIconUrl(refVal_setIconUrl); setIconUrl(refVal_setIconUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url")))) 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; utility::string_t refVal_setCapsuleImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
setCapsuleImageUrl(refVal_setCapsuleImageUrl); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("library_image_url")))) 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; utility::string_t refVal_setLibraryImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
setLibraryImageUrl(refVal_setLibraryImageUrl); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("parent_id")))) 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; utility::string_t refVal_setParentId;
ok &= ModelBase::fromJson(fieldValue, refVal_setParentId); ok &= ModelBase::fromJson(fieldValue, refVal_setParentId);
setParentId(refVal_setParentId); setParentId(refVal_setParentId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("slug")))) 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; utility::string_t refVal_setSlug;
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug); ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
setSlug(refVal_setSlug); setSlug(refVal_setSlug);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("visibility")))) 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; int32_t refVal_setVisibility;
ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility); ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility);
setVisibility(refVal_setVisibility); setVisibility(refVal_setVisibility);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("password")))) 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; utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword); ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword); setPassword(refVal_setPassword);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("primary")))) 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; int32_t refVal_setPrimary;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary); ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary);
setPrimary(refVal_setPrimary); setPrimary(refVal_setPrimary);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("user_count")))) 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; int32_t refVal_setUserCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount); ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount);
setUserCount(refVal_setUserCount); setUserCount(refVal_setUserCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("achievement_count")))) 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; int32_t refVal_setAchievementCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount); ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount);
setAchievementCount(refVal_setAchievementCount); setAchievementCount(refVal_setAchievementCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("badge_count")))) 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; int32_t refVal_setBadgeCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount); ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount);
setBadgeCount(refVal_setBadgeCount); setBadgeCount(refVal_setBadgeCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("download_count")))) 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; int32_t refVal_setDownloadCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount); ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
setDownloadCount(refVal_setDownloadCount); setDownloadCount(refVal_setDownloadCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -415,79 +397,98 @@ void Application::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("type")))) if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
{ {
std::shared_ptr<ApplicationType> refVal_setType; 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); setType(refVal_setType);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id"))))
{ {
utility::string_t refVal_setOrganizationId; 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); setOrganizationId(refVal_setOrganizationId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url"))))
{ {
utility::string_t refVal_setIconUrl; 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); setIconUrl(refVal_setIconUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
{ {
utility::string_t refVal_setCapsuleImageUrl; 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); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
{ {
utility::string_t refVal_setLibraryImageUrl; 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); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id"))))
{ {
utility::string_t refVal_setParentId; 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); setParentId(refVal_setParentId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("slug")))) if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
{ {
utility::string_t refVal_setSlug; 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); setSlug(refVal_setSlug);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("visibility")))) if (multipart->hasContent(utility::conversions::to_string_t(U("visibility"))))
{ {
int32_t refVal_setVisibility; 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); setVisibility(refVal_setVisibility);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("password")))) if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{ {
utility::string_t refVal_setPassword; 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); setPassword(refVal_setPassword);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("primary")))) if (multipart->hasContent(utility::conversions::to_string_t(U("primary"))))
{ {
int32_t refVal_setPrimary; 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); setPrimary(refVal_setPrimary);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("user_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("user_count"))))
{ {
int32_t refVal_setUserCount; 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); setUserCount(refVal_setUserCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count"))))
{ {
int32_t refVal_setAchievementCount; 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); setAchievementCount(refVal_setAchievementCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count"))))
{ {
int32_t refVal_setBadgeCount; 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); setBadgeCount(refVal_setBadgeCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
{ {
int32_t refVal_setDownloadCount; 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); setDownloadCount(refVal_setDownloadCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Application::getId() const utility::string_t Application::getId() const
{ {
return m_Id; return m_Id;
} }
void Application::setId(const utility::string_t &value) void Application::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -650,7 +675,6 @@ utility::string_t Application::getName() const
return m_Name; return m_Name;
} }
void Application::setName(const utility::string_t &value) void Application::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -671,7 +695,6 @@ utility::string_t Application::getDescription() const
return m_Description; return m_Description;
} }
void Application::setDescription(const utility::string_t &value) void Application::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -692,7 +715,6 @@ std::shared_ptr<ApplicationType> Application::getType() const
return m_Type; return m_Type;
} }
void Application::setType(const std::shared_ptr<ApplicationType> &value) void Application::setType(const std::shared_ptr<ApplicationType> &value)
{ {
m_Type = value; m_Type = value;
@ -713,7 +735,6 @@ utility::string_t Application::getOrganizationId() const
return m_Organization_id; return m_Organization_id;
} }
void Application::setOrganizationId(const utility::string_t &value) void Application::setOrganizationId(const utility::string_t &value)
{ {
m_Organization_id = value; m_Organization_id = value;
@ -734,7 +755,6 @@ utility::string_t Application::getIconUrl() const
return m_Icon_url; return m_Icon_url;
} }
void Application::setIconUrl(const utility::string_t &value) void Application::setIconUrl(const utility::string_t &value)
{ {
m_Icon_url = value; m_Icon_url = value;
@ -755,7 +775,6 @@ utility::string_t Application::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void Application::setBannerUrl(const utility::string_t &value) void Application::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -776,7 +795,6 @@ utility::string_t Application::getCapsuleImageUrl() const
return m_Capsule_image_url; return m_Capsule_image_url;
} }
void Application::setCapsuleImageUrl(const utility::string_t &value) void Application::setCapsuleImageUrl(const utility::string_t &value)
{ {
m_Capsule_image_url = value; m_Capsule_image_url = value;
@ -797,7 +815,6 @@ utility::string_t Application::getLibraryImageUrl() const
return m_Library_image_url; return m_Library_image_url;
} }
void Application::setLibraryImageUrl(const utility::string_t &value) void Application::setLibraryImageUrl(const utility::string_t &value)
{ {
m_Library_image_url = value; m_Library_image_url = value;
@ -818,7 +835,6 @@ utility::string_t Application::getParentId() const
return m_Parent_id; return m_Parent_id;
} }
void Application::setParentId(const utility::string_t &value) void Application::setParentId(const utility::string_t &value)
{ {
m_Parent_id = value; m_Parent_id = value;
@ -839,7 +855,6 @@ utility::string_t Application::getSlug() const
return m_Slug; return m_Slug;
} }
void Application::setSlug(const utility::string_t &value) void Application::setSlug(const utility::string_t &value)
{ {
m_Slug = value; m_Slug = value;
@ -880,7 +895,6 @@ utility::string_t Application::getPassword() const
return m_Password; return m_Password;
} }
void Application::setPassword(const utility::string_t &value) void Application::setPassword(const utility::string_t &value)
{ {
m_Password = value; m_Password = value;
@ -1001,7 +1015,6 @@ utility::datetime Application::getCreated() const
return m_Created; return m_Created;
} }
void Application::setCreated(const utility::datetime &value) void Application::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -1022,7 +1035,6 @@ utility::datetime Application::getUpdated() const
return m_Updated; return m_Updated;
} }
void Application::setUpdated(const utility::datetime &value) void Application::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -1041,5 +1053,3 @@ void Application::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ApplicationType.h" #include "tribufu++/model/ApplicationType.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -70,7 +70,8 @@ bool ApplicationType::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -82,7 +83,8 @@ void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
multipart->add(ModelBase::toHttpContent(namePrefix, e)); 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; bool ok = true;
utility::string_t namePrefix = prefix; utility::string_t namePrefix = prefix;
@ -114,5 +116,3 @@ void ApplicationType::setValue(ApplicationType::eApplicationType const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/AuthorizeRequest.h" #include "tribufu++/model/AuthorizeRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
AuthorizeRequest::AuthorizeRequest() AuthorizeRequest::AuthorizeRequest()
{ {
@ -63,7 +63,8 @@ web::json::value AuthorizeRequest::toJson() const
if (m_Code_challenge_methodIsSet) 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) if (m_Redirect_uriIsSet)
{ {
@ -95,7 +96,6 @@ bool AuthorizeRequest::fromJson(const web::json::value& val)
std::shared_ptr<ResponseType> refVal_setResponseType; std::shared_ptr<ResponseType> refVal_setResponseType;
ok &= ModelBase::fromJson(fieldValue, refVal_setResponseType); ok &= ModelBase::fromJson(fieldValue, refVal_setResponseType);
setResponseType(refVal_setResponseType); setResponseType(refVal_setResponseType);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("client_id")))) 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; utility::string_t refVal_setClientId;
ok &= ModelBase::fromJson(fieldValue, refVal_setClientId); ok &= ModelBase::fromJson(fieldValue, refVal_setClientId);
setClientId(refVal_setClientId); setClientId(refVal_setClientId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("code_challenge")))) 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; utility::string_t refVal_setCodeChallenge;
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallenge); ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallenge);
setCodeChallenge(refVal_setCodeChallenge); setCodeChallenge(refVal_setCodeChallenge);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("code_challenge_method")))) 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()) if (!fieldValue.is_null())
{ {
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod; std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod;
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallengeMethod); ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallengeMethod);
setCodeChallengeMethod(refVal_setCodeChallengeMethod); setCodeChallengeMethod(refVal_setCodeChallengeMethod);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("redirect_uri")))) 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; utility::string_t refVal_setRedirectUri;
ok &= ModelBase::fromJson(fieldValue, refVal_setRedirectUri); ok &= ModelBase::fromJson(fieldValue, refVal_setRedirectUri);
setRedirectUri(refVal_setRedirectUri); setRedirectUri(refVal_setRedirectUri);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("scope")))) 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; utility::string_t refVal_setScope;
ok &= ModelBase::fromJson(fieldValue, refVal_setScope); ok &= ModelBase::fromJson(fieldValue, refVal_setScope);
setScope(refVal_setScope); setScope(refVal_setScope);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("state")))) 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; utility::string_t refVal_setState;
ok &= ModelBase::fromJson(fieldValue, refVal_setState); ok &= ModelBase::fromJson(fieldValue, refVal_setState);
setState(refVal_setState); setState(refVal_setState);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_Response_typeIsSet) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("response_type"))))
{ {
std::shared_ptr<ResponseType> refVal_setResponseType; 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); setResponseType(refVal_setResponseType);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("client_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("client_id"))))
{ {
utility::string_t refVal_setClientId; 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); setClientId(refVal_setClientId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge")))) if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge"))))
{ {
utility::string_t refVal_setCodeChallenge; 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); setCodeChallenge(refVal_setCodeChallenge);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge_method")))) if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge_method"))))
{ {
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod; 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); setCodeChallengeMethod(refVal_setCodeChallengeMethod);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("redirect_uri")))) if (multipart->hasContent(utility::conversions::to_string_t(U("redirect_uri"))))
{ {
utility::string_t refVal_setRedirectUri; 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); setRedirectUri(refVal_setRedirectUri);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("scope")))) if (multipart->hasContent(utility::conversions::to_string_t(U("scope"))))
{ {
utility::string_t refVal_setScope; 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); setScope(refVal_setScope);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("state")))) if (multipart->hasContent(utility::conversions::to_string_t(U("state"))))
{ {
utility::string_t refVal_setState; 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); setState(refVal_setState);
} }
return ok; return ok;
} }
std::shared_ptr<ResponseType> AuthorizeRequest::getResponseType() const std::shared_ptr<ResponseType> AuthorizeRequest::getResponseType() const
{ {
return m_Response_type; return m_Response_type;
} }
void AuthorizeRequest::setResponseType(const std::shared_ptr<ResponseType> &value) void AuthorizeRequest::setResponseType(const std::shared_ptr<ResponseType> &value)
{ {
m_Response_type = value; m_Response_type = value;
@ -285,7 +300,6 @@ utility::string_t AuthorizeRequest::getClientId() const
return m_Client_id; return m_Client_id;
} }
void AuthorizeRequest::setClientId(const utility::string_t &value) void AuthorizeRequest::setClientId(const utility::string_t &value)
{ {
m_Client_id = value; m_Client_id = value;
@ -306,7 +320,6 @@ utility::string_t AuthorizeRequest::getCodeChallenge() const
return m_Code_challenge; return m_Code_challenge;
} }
void AuthorizeRequest::setCodeChallenge(const utility::string_t &value) void AuthorizeRequest::setCodeChallenge(const utility::string_t &value)
{ {
m_Code_challenge = value; m_Code_challenge = value;
@ -327,7 +340,6 @@ std::shared_ptr<CodeChallengeMethod> AuthorizeRequest::getCodeChallengeMethod()
return m_Code_challenge_method; return m_Code_challenge_method;
} }
void AuthorizeRequest::setCodeChallengeMethod(const std::shared_ptr<CodeChallengeMethod> &value) void AuthorizeRequest::setCodeChallengeMethod(const std::shared_ptr<CodeChallengeMethod> &value)
{ {
m_Code_challenge_method = value; m_Code_challenge_method = value;
@ -348,7 +360,6 @@ utility::string_t AuthorizeRequest::getRedirectUri() const
return m_Redirect_uri; return m_Redirect_uri;
} }
void AuthorizeRequest::setRedirectUri(const utility::string_t &value) void AuthorizeRequest::setRedirectUri(const utility::string_t &value)
{ {
m_Redirect_uri = value; m_Redirect_uri = value;
@ -369,7 +380,6 @@ utility::string_t AuthorizeRequest::getScope() const
return m_Scope; return m_Scope;
} }
void AuthorizeRequest::setScope(const utility::string_t &value) void AuthorizeRequest::setScope(const utility::string_t &value)
{ {
m_Scope = value; m_Scope = value;
@ -390,7 +400,6 @@ utility::string_t AuthorizeRequest::getState() const
return m_State; return m_State;
} }
void AuthorizeRequest::setState(const utility::string_t &value) void AuthorizeRequest::setState(const utility::string_t &value)
{ {
m_State = value; m_State = value;
@ -409,5 +418,3 @@ void AuthorizeRequest::unsetState()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/CodeChallengeMethod.h" #include "tribufu++/model/CodeChallengeMethod.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -70,7 +70,8 @@ bool CodeChallengeMethod::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -82,7 +83,8 @@ void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipa
multipart->add(ModelBase::toHttpContent(namePrefix, e)); 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; bool ok = true;
utility::string_t namePrefix = prefix; utility::string_t namePrefix = prefix;
@ -114,5 +116,3 @@ void CodeChallengeMethod::setValue(CodeChallengeMethod::eCodeChallengeMethod con
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/CryptoViewModel.h" #include "tribufu++/model/CryptoViewModel.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
CryptoViewModel::CryptoViewModel() CryptoViewModel::CryptoViewModel()
{ {
@ -62,7 +62,6 @@ bool CryptoViewModel::fromJson(const web::json::value& val)
utility::string_t refVal_setEncoded; utility::string_t refVal_setEncoded;
ok &= ModelBase::fromJson(fieldValue, refVal_setEncoded); ok &= ModelBase::fromJson(fieldValue, refVal_setEncoded);
setEncoded(refVal_setEncoded); setEncoded(refVal_setEncoded);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("decoded")))) 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; utility::string_t refVal_setDecoded;
ok &= ModelBase::fromJson(fieldValue, refVal_setDecoded); ok &= ModelBase::fromJson(fieldValue, refVal_setDecoded);
setDecoded(refVal_setDecoded); setDecoded(refVal_setDecoded);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_EncodedIsSet) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("encoded"))))
{ {
utility::string_t refVal_setEncoded; 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); setEncoded(refVal_setEncoded);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("decoded")))) if (multipart->hasContent(utility::conversions::to_string_t(U("decoded"))))
{ {
utility::string_t refVal_setDecoded; 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); setDecoded(refVal_setDecoded);
} }
return ok; return ok;
} }
utility::string_t CryptoViewModel::getEncoded() const utility::string_t CryptoViewModel::getEncoded() const
{ {
return m_Encoded; return m_Encoded;
} }
void CryptoViewModel::setEncoded(const utility::string_t &value) void CryptoViewModel::setEncoded(const utility::string_t &value)
{ {
m_Encoded = value; m_Encoded = value;
@ -147,7 +151,6 @@ utility::string_t CryptoViewModel::getDecoded() const
return m_Decoded; return m_Decoded;
} }
void CryptoViewModel::setDecoded(const utility::string_t &value) void CryptoViewModel::setDecoded(const utility::string_t &value)
{ {
m_Decoded = value; m_Decoded = value;
@ -166,5 +169,3 @@ void CryptoViewModel::unsetDecoded()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Game.h" #include "tribufu++/model/Game.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Game::Game() Game::Game()
{ {
@ -122,7 +122,8 @@ web::json::value Game::toJson() const
if (m_Steam_server_app_idIsSet) 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) if (m_Enable_serversIsSet)
{ {
@ -142,7 +143,8 @@ web::json::value Game::toJson() const
if (m_Server_connect_urlIsSet) 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) if (m_Server_tagsIsSet)
{ {
@ -264,7 +266,6 @@ bool Game::fromJson(const web::json::value& val)
int32_t refVal_setGamePort; int32_t refVal_setGamePort;
ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort); ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort);
setGamePort(refVal_setGamePort); setGamePort(refVal_setGamePort);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("query_port")))) 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; int32_t refVal_setQueryPort;
ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort); ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort);
setQueryPort(refVal_setQueryPort); setQueryPort(refVal_setQueryPort);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("rcon_port")))) 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; int32_t refVal_setRconPort;
ok &= ModelBase::fromJson(fieldValue, refVal_setRconPort); ok &= ModelBase::fromJson(fieldValue, refVal_setRconPort);
setRconPort(refVal_setRconPort); setRconPort(refVal_setRconPort);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("server_count")))) 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; int32_t refVal_setServerCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount); ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
setServerCount(refVal_setServerCount); setServerCount(refVal_setServerCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("steam_app_id")))) 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; int32_t refVal_setSteamAppId;
ok &= ModelBase::fromJson(fieldValue, refVal_setSteamAppId); ok &= ModelBase::fromJson(fieldValue, refVal_setSteamAppId);
setSteamAppId(refVal_setSteamAppId); setSteamAppId(refVal_setSteamAppId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("steam_server_app_id")))) 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()) if (!fieldValue.is_null())
{ {
int32_t refVal_setSteamServerAppId; int32_t refVal_setSteamServerAppId;
ok &= ModelBase::fromJson(fieldValue, refVal_setSteamServerAppId); ok &= ModelBase::fromJson(fieldValue, refVal_setSteamServerAppId);
setSteamServerAppId(refVal_setSteamServerAppId); setSteamServerAppId(refVal_setSteamServerAppId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("enable_servers")))) 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; bool refVal_setEnableServers;
ok &= ModelBase::fromJson(fieldValue, refVal_setEnableServers); ok &= ModelBase::fromJson(fieldValue, refVal_setEnableServers);
setEnableServers(refVal_setEnableServers); setEnableServers(refVal_setEnableServers);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("rust_gamedig_id")))) 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; utility::string_t refVal_setRustGamedigId;
ok &= ModelBase::fromJson(fieldValue, refVal_setRustGamedigId); ok &= ModelBase::fromJson(fieldValue, refVal_setRustGamedigId);
setRustGamedigId(refVal_setRustGamedigId); setRustGamedigId(refVal_setRustGamedigId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("node_gamedig_id")))) 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; utility::string_t refVal_setNodeGamedigId;
ok &= ModelBase::fromJson(fieldValue, refVal_setNodeGamedigId); ok &= ModelBase::fromJson(fieldValue, refVal_setNodeGamedigId);
setNodeGamedigId(refVal_setNodeGamedigId); setNodeGamedigId(refVal_setNodeGamedigId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("server_connect_url")))) 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; utility::string_t refVal_setServerConnectUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerConnectUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setServerConnectUrl);
setServerConnectUrl(refVal_setServerConnectUrl); setServerConnectUrl(refVal_setServerConnectUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("server_tags")))) 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; utility::string_t refVal_setServerTags;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerTags); ok &= ModelBase::fromJson(fieldValue, refVal_setServerTags);
setServerTags(refVal_setServerTags); setServerTags(refVal_setServerTags);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("id")))) 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; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("type")))) 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; std::shared_ptr<ApplicationType> refVal_setType;
ok &= ModelBase::fromJson(fieldValue, refVal_setType); ok &= ModelBase::fromJson(fieldValue, refVal_setType);
setType(refVal_setType); setType(refVal_setType);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("organization_id")))) 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; utility::string_t refVal_setOrganizationId;
ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId); ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationId);
setOrganizationId(refVal_setOrganizationId); setOrganizationId(refVal_setOrganizationId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("icon_url")))) 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; utility::string_t refVal_setIconUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setIconUrl);
setIconUrl(refVal_setIconUrl); setIconUrl(refVal_setIconUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url")))) 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; utility::string_t refVal_setCapsuleImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
setCapsuleImageUrl(refVal_setCapsuleImageUrl); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("library_image_url")))) 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; utility::string_t refVal_setLibraryImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
setLibraryImageUrl(refVal_setLibraryImageUrl); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("parent_id")))) 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; utility::string_t refVal_setParentId;
ok &= ModelBase::fromJson(fieldValue, refVal_setParentId); ok &= ModelBase::fromJson(fieldValue, refVal_setParentId);
setParentId(refVal_setParentId); setParentId(refVal_setParentId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("slug")))) 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; utility::string_t refVal_setSlug;
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug); ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
setSlug(refVal_setSlug); setSlug(refVal_setSlug);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("visibility")))) 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; int32_t refVal_setVisibility;
ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility); ok &= ModelBase::fromJson(fieldValue, refVal_setVisibility);
setVisibility(refVal_setVisibility); setVisibility(refVal_setVisibility);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("password")))) 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; utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword); ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword); setPassword(refVal_setPassword);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("primary")))) 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; int32_t refVal_setPrimary;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary); ok &= ModelBase::fromJson(fieldValue, refVal_setPrimary);
setPrimary(refVal_setPrimary); setPrimary(refVal_setPrimary);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("user_count")))) 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; int32_t refVal_setUserCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount); ok &= ModelBase::fromJson(fieldValue, refVal_setUserCount);
setUserCount(refVal_setUserCount); setUserCount(refVal_setUserCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("achievement_count")))) 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; int32_t refVal_setAchievementCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount); ok &= ModelBase::fromJson(fieldValue, refVal_setAchievementCount);
setAchievementCount(refVal_setAchievementCount); setAchievementCount(refVal_setAchievementCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("badge_count")))) 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; int32_t refVal_setBadgeCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount); ok &= ModelBase::fromJson(fieldValue, refVal_setBadgeCount);
setBadgeCount(refVal_setBadgeCount); setBadgeCount(refVal_setBadgeCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("download_count")))) 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; int32_t refVal_setDownloadCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount); ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
setDownloadCount(refVal_setDownloadCount); setDownloadCount(refVal_setDownloadCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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 void Game::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_Game_portIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) if (m_IdIsSet)
{ {
@ -657,79 +641,98 @@ void Game::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utili
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_port"))))
{ {
int32_t refVal_setGamePort; 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); setGamePort(refVal_setGamePort);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("query_port")))) if (multipart->hasContent(utility::conversions::to_string_t(U("query_port"))))
{ {
int32_t refVal_setQueryPort; 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); setQueryPort(refVal_setQueryPort);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("rcon_port")))) if (multipart->hasContent(utility::conversions::to_string_t(U("rcon_port"))))
{ {
int32_t refVal_setRconPort; 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); setRconPort(refVal_setRconPort);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("server_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
{ {
int32_t refVal_setServerCount; 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); setServerCount(refVal_setServerCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("steam_app_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("steam_app_id"))))
{ {
int32_t refVal_setSteamAppId; 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); setSteamAppId(refVal_setSteamAppId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("steam_server_app_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("steam_server_app_id"))))
{ {
int32_t refVal_setSteamServerAppId; 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); setSteamServerAppId(refVal_setSteamServerAppId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("enable_servers")))) if (multipart->hasContent(utility::conversions::to_string_t(U("enable_servers"))))
{ {
bool refVal_setEnableServers; 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); setEnableServers(refVal_setEnableServers);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("rust_gamedig_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("rust_gamedig_id"))))
{ {
utility::string_t refVal_setRustGamedigId; 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); setRustGamedigId(refVal_setRustGamedigId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("node_gamedig_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("node_gamedig_id"))))
{ {
utility::string_t refVal_setNodeGamedigId; 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); setNodeGamedigId(refVal_setNodeGamedigId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("server_connect_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("server_connect_url"))))
{ {
utility::string_t refVal_setServerConnectUrl; 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); setServerConnectUrl(refVal_setServerConnectUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("server_tags")))) if (multipart->hasContent(utility::conversions::to_string_t(U("server_tags"))))
{ {
utility::string_t refVal_setServerTags; 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); setServerTags(refVal_setServerTags);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("type")))) if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
{ {
std::shared_ptr<ApplicationType> refVal_setType; 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); setType(refVal_setType);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("organization_id"))))
{ {
utility::string_t refVal_setOrganizationId; 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); setOrganizationId(refVal_setOrganizationId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("icon_url"))))
{ {
utility::string_t refVal_setIconUrl; 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); setIconUrl(refVal_setIconUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
{ {
utility::string_t refVal_setCapsuleImageUrl; 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); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
{ {
utility::string_t refVal_setLibraryImageUrl; 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); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("parent_id"))))
{ {
utility::string_t refVal_setParentId; 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); setParentId(refVal_setParentId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("slug")))) if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
{ {
utility::string_t refVal_setSlug; 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); setSlug(refVal_setSlug);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("visibility")))) if (multipart->hasContent(utility::conversions::to_string_t(U("visibility"))))
{ {
int32_t refVal_setVisibility; 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); setVisibility(refVal_setVisibility);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("password")))) if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{ {
utility::string_t refVal_setPassword; 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); setPassword(refVal_setPassword);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("primary")))) if (multipart->hasContent(utility::conversions::to_string_t(U("primary"))))
{ {
int32_t refVal_setPrimary; 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); setPrimary(refVal_setPrimary);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("user_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("user_count"))))
{ {
int32_t refVal_setUserCount; 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); setUserCount(refVal_setUserCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("achievement_count"))))
{ {
int32_t refVal_setAchievementCount; 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); setAchievementCount(refVal_setAchievementCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("badge_count"))))
{ {
int32_t refVal_setBadgeCount; 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); setBadgeCount(refVal_setBadgeCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
{ {
int32_t refVal_setDownloadCount; 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); setDownloadCount(refVal_setDownloadCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
int32_t Game::getGamePort() const int32_t Game::getGamePort() const
{ {
return m_Game_port; return m_Game_port;
@ -1077,7 +1121,6 @@ utility::string_t Game::getRustGamedigId() const
return m_Rust_gamedig_id; return m_Rust_gamedig_id;
} }
void Game::setRustGamedigId(const utility::string_t &value) void Game::setRustGamedigId(const utility::string_t &value)
{ {
m_Rust_gamedig_id = value; m_Rust_gamedig_id = value;
@ -1098,7 +1141,6 @@ utility::string_t Game::getNodeGamedigId() const
return m_Node_gamedig_id; return m_Node_gamedig_id;
} }
void Game::setNodeGamedigId(const utility::string_t &value) void Game::setNodeGamedigId(const utility::string_t &value)
{ {
m_Node_gamedig_id = value; m_Node_gamedig_id = value;
@ -1119,7 +1161,6 @@ utility::string_t Game::getServerConnectUrl() const
return m_Server_connect_url; return m_Server_connect_url;
} }
void Game::setServerConnectUrl(const utility::string_t &value) void Game::setServerConnectUrl(const utility::string_t &value)
{ {
m_Server_connect_url = value; m_Server_connect_url = value;
@ -1140,7 +1181,6 @@ utility::string_t Game::getServerTags() const
return m_Server_tags; return m_Server_tags;
} }
void Game::setServerTags(const utility::string_t &value) void Game::setServerTags(const utility::string_t &value)
{ {
m_Server_tags = value; m_Server_tags = value;
@ -1161,7 +1201,6 @@ utility::string_t Game::getId() const
return m_Id; return m_Id;
} }
void Game::setId(const utility::string_t &value) void Game::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -1182,7 +1221,6 @@ utility::string_t Game::getName() const
return m_Name; return m_Name;
} }
void Game::setName(const utility::string_t &value) void Game::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -1203,7 +1241,6 @@ utility::string_t Game::getDescription() const
return m_Description; return m_Description;
} }
void Game::setDescription(const utility::string_t &value) void Game::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -1224,7 +1261,6 @@ std::shared_ptr<ApplicationType> Game::getType() const
return m_Type; return m_Type;
} }
void Game::setType(const std::shared_ptr<ApplicationType> &value) void Game::setType(const std::shared_ptr<ApplicationType> &value)
{ {
m_Type = value; m_Type = value;
@ -1245,7 +1281,6 @@ utility::string_t Game::getOrganizationId() const
return m_Organization_id; return m_Organization_id;
} }
void Game::setOrganizationId(const utility::string_t &value) void Game::setOrganizationId(const utility::string_t &value)
{ {
m_Organization_id = value; m_Organization_id = value;
@ -1266,7 +1301,6 @@ utility::string_t Game::getIconUrl() const
return m_Icon_url; return m_Icon_url;
} }
void Game::setIconUrl(const utility::string_t &value) void Game::setIconUrl(const utility::string_t &value)
{ {
m_Icon_url = value; m_Icon_url = value;
@ -1287,7 +1321,6 @@ utility::string_t Game::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void Game::setBannerUrl(const utility::string_t &value) void Game::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -1308,7 +1341,6 @@ utility::string_t Game::getCapsuleImageUrl() const
return m_Capsule_image_url; return m_Capsule_image_url;
} }
void Game::setCapsuleImageUrl(const utility::string_t &value) void Game::setCapsuleImageUrl(const utility::string_t &value)
{ {
m_Capsule_image_url = value; m_Capsule_image_url = value;
@ -1329,7 +1361,6 @@ utility::string_t Game::getLibraryImageUrl() const
return m_Library_image_url; return m_Library_image_url;
} }
void Game::setLibraryImageUrl(const utility::string_t &value) void Game::setLibraryImageUrl(const utility::string_t &value)
{ {
m_Library_image_url = value; m_Library_image_url = value;
@ -1350,7 +1381,6 @@ utility::string_t Game::getParentId() const
return m_Parent_id; return m_Parent_id;
} }
void Game::setParentId(const utility::string_t &value) void Game::setParentId(const utility::string_t &value)
{ {
m_Parent_id = value; m_Parent_id = value;
@ -1371,7 +1401,6 @@ utility::string_t Game::getSlug() const
return m_Slug; return m_Slug;
} }
void Game::setSlug(const utility::string_t &value) void Game::setSlug(const utility::string_t &value)
{ {
m_Slug = value; m_Slug = value;
@ -1412,7 +1441,6 @@ utility::string_t Game::getPassword() const
return m_Password; return m_Password;
} }
void Game::setPassword(const utility::string_t &value) void Game::setPassword(const utility::string_t &value)
{ {
m_Password = value; m_Password = value;
@ -1533,7 +1561,6 @@ utility::datetime Game::getCreated() const
return m_Created; return m_Created;
} }
void Game::setCreated(const utility::datetime &value) void Game::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -1554,7 +1581,6 @@ utility::datetime Game::getUpdated() const
return m_Updated; return m_Updated;
} }
void Game::setUpdated(const utility::datetime &value) void Game::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -1573,5 +1599,3 @@ void Game::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GameServer.h" #include "tribufu++/model/GameServer.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
GameServer::GameServer() GameServer::GameServer()
{ {
@ -264,7 +264,6 @@ bool GameServer::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("address")))) 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; utility::string_t refVal_setAddress;
ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); ok &= ModelBase::fromJson(fieldValue, refVal_setAddress);
setAddress(refVal_setAddress); setAddress(refVal_setAddress);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("game_port")))) 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; int32_t refVal_setGamePort;
ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort); ok &= ModelBase::fromJson(fieldValue, refVal_setGamePort);
setGamePort(refVal_setGamePort); setGamePort(refVal_setGamePort);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("query_port")))) 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; int32_t refVal_setQueryPort;
ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort); ok &= ModelBase::fromJson(fieldValue, refVal_setQueryPort);
setQueryPort(refVal_setQueryPort); setQueryPort(refVal_setQueryPort);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("game_id")))) 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; utility::string_t refVal_setGameId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId); ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
setGameId(refVal_setGameId); setGameId(refVal_setGameId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("game_icon_url")))) 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; utility::string_t refVal_setGameIconUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setGameIconUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setGameIconUrl);
setGameIconUrl(refVal_setGameIconUrl); setGameIconUrl(refVal_setGameIconUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("version")))) 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; utility::string_t refVal_setVersion;
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion); ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
setVersion(refVal_setVersion); setVersion(refVal_setVersion);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("featured")))) 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; bool refVal_setFeatured;
ok &= ModelBase::fromJson(fieldValue, refVal_setFeatured); ok &= ModelBase::fromJson(fieldValue, refVal_setFeatured);
setFeatured(refVal_setFeatured); setFeatured(refVal_setFeatured);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("cluster_id")))) 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; utility::string_t refVal_setClusterId;
ok &= ModelBase::fromJson(fieldValue, refVal_setClusterId); ok &= ModelBase::fromJson(fieldValue, refVal_setClusterId);
setClusterId(refVal_setClusterId); setClusterId(refVal_setClusterId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("website_url")))) 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; utility::string_t refVal_setWebsiteUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl);
setWebsiteUrl(refVal_setWebsiteUrl); setWebsiteUrl(refVal_setWebsiteUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("owner_id")))) 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; utility::string_t refVal_setOwnerId;
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId); ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
setOwnerId(refVal_setOwnerId); setOwnerId(refVal_setOwnerId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("uptime")))) 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; double refVal_setUptime;
ok &= ModelBase::fromJson(fieldValue, refVal_setUptime); ok &= ModelBase::fromJson(fieldValue, refVal_setUptime);
setUptime(refVal_setUptime); setUptime(refVal_setUptime);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("status")))) 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; std::shared_ptr<ServerStatus> refVal_setStatus;
ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); ok &= ModelBase::fromJson(fieldValue, refVal_setStatus);
setStatus(refVal_setStatus); setStatus(refVal_setStatus);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("ping")))) 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; int32_t refVal_setPing;
ok &= ModelBase::fromJson(fieldValue, refVal_setPing); ok &= ModelBase::fromJson(fieldValue, refVal_setPing);
setPing(refVal_setPing); setPing(refVal_setPing);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("map")))) 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; utility::string_t refVal_setMap;
ok &= ModelBase::fromJson(fieldValue, refVal_setMap); ok &= ModelBase::fromJson(fieldValue, refVal_setMap);
setMap(refVal_setMap); setMap(refVal_setMap);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("used_slots")))) 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; int32_t refVal_setUsedSlots;
ok &= ModelBase::fromJson(fieldValue, refVal_setUsedSlots); ok &= ModelBase::fromJson(fieldValue, refVal_setUsedSlots);
setUsedSlots(refVal_setUsedSlots); setUsedSlots(refVal_setUsedSlots);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("max_slots")))) 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; int32_t refVal_setMaxSlots;
ok &= ModelBase::fromJson(fieldValue, refVal_setMaxSlots); ok &= ModelBase::fromJson(fieldValue, refVal_setMaxSlots);
setMaxSlots(refVal_setMaxSlots); setMaxSlots(refVal_setMaxSlots);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("motd")))) 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; utility::string_t refVal_setMotd;
ok &= ModelBase::fromJson(fieldValue, refVal_setMotd); ok &= ModelBase::fromJson(fieldValue, refVal_setMotd);
setMotd(refVal_setMotd); setMotd(refVal_setMotd);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("players")))) 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; utility::string_t refVal_setPlayers;
ok &= ModelBase::fromJson(fieldValue, refVal_setPlayers); ok &= ModelBase::fromJson(fieldValue, refVal_setPlayers);
setPlayers(refVal_setPlayers); setPlayers(refVal_setPlayers);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_online")))) 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; utility::datetime refVal_setLastOnline;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline); ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
setLastOnline(refVal_setLastOnline); setLastOnline(refVal_setLastOnline);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("country")))) 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; utility::string_t refVal_setCountry;
ok &= ModelBase::fromJson(fieldValue, refVal_setCountry); ok &= ModelBase::fromJson(fieldValue, refVal_setCountry);
setCountry(refVal_setCountry); setCountry(refVal_setCountry);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("steam")))) 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; bool refVal_setSteam;
ok &= ModelBase::fromJson(fieldValue, refVal_setSteam); ok &= ModelBase::fromJson(fieldValue, refVal_setSteam);
setSteam(refVal_setSteam); setSteam(refVal_setSteam);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("discord_server_id")))) 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; utility::string_t refVal_setDiscordServerId;
ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId); ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId);
setDiscordServerId(refVal_setDiscordServerId); setDiscordServerId(refVal_setDiscordServerId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("youtube_video_url")))) 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; utility::string_t refVal_setYoutubeVideoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl);
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl); setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("tags")))) 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; utility::string_t refVal_setTags;
ok &= ModelBase::fromJson(fieldValue, refVal_setTags); ok &= ModelBase::fromJson(fieldValue, refVal_setTags);
setTags(refVal_setTags); setTags(refVal_setTags);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("comment_count")))) 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; int32_t refVal_setCommentCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount); ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount);
setCommentCount(refVal_setCommentCount); setCommentCount(refVal_setCommentCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -613,123 +584,153 @@ void GameServer::toMultipart(std::shared_ptr<MultipartFormData> multipart, const
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("address")))) if (multipart->hasContent(utility::conversions::to_string_t(U("address"))))
{ {
utility::string_t refVal_setAddress; 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); setAddress(refVal_setAddress);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("game_port")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_port"))))
{ {
int32_t refVal_setGamePort; 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); setGamePort(refVal_setGamePort);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("query_port")))) if (multipart->hasContent(utility::conversions::to_string_t(U("query_port"))))
{ {
int32_t refVal_setQueryPort; 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); setQueryPort(refVal_setQueryPort);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
{ {
utility::string_t refVal_setGameId; 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); setGameId(refVal_setGameId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("game_icon_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_icon_url"))))
{ {
utility::string_t refVal_setGameIconUrl; 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); setGameIconUrl(refVal_setGameIconUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("version")))) if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
{ {
utility::string_t refVal_setVersion; 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); setVersion(refVal_setVersion);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("featured")))) if (multipart->hasContent(utility::conversions::to_string_t(U("featured"))))
{ {
bool refVal_setFeatured; 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); setFeatured(refVal_setFeatured);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("cluster_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("cluster_id"))))
{ {
utility::string_t refVal_setClusterId; 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); setClusterId(refVal_setClusterId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("website_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("website_url"))))
{ {
utility::string_t refVal_setWebsiteUrl; 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); setWebsiteUrl(refVal_setWebsiteUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
{ {
utility::string_t refVal_setOwnerId; 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); setOwnerId(refVal_setOwnerId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("uptime")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uptime"))))
{ {
double refVal_setUptime; 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); setUptime(refVal_setUptime);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("status")))) if (multipart->hasContent(utility::conversions::to_string_t(U("status"))))
{ {
std::shared_ptr<ServerStatus> refVal_setStatus; 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); setStatus(refVal_setStatus);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("ping")))) if (multipart->hasContent(utility::conversions::to_string_t(U("ping"))))
{ {
int32_t refVal_setPing; 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); setPing(refVal_setPing);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("map")))) if (multipart->hasContent(utility::conversions::to_string_t(U("map"))))
{ {
utility::string_t refVal_setMap; 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); setMap(refVal_setMap);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("used_slots")))) if (multipart->hasContent(utility::conversions::to_string_t(U("used_slots"))))
{ {
int32_t refVal_setUsedSlots; 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); setUsedSlots(refVal_setUsedSlots);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("max_slots")))) if (multipart->hasContent(utility::conversions::to_string_t(U("max_slots"))))
{ {
int32_t refVal_setMaxSlots; 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); setMaxSlots(refVal_setMaxSlots);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("motd")))) if (multipart->hasContent(utility::conversions::to_string_t(U("motd"))))
{ {
utility::string_t refVal_setMotd; 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); setMotd(refVal_setMotd);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("players")))) if (multipart->hasContent(utility::conversions::to_string_t(U("players"))))
{ {
utility::string_t refVal_setPlayers; 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); setPlayers(refVal_setPlayers);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
{ {
utility::datetime refVal_setLastOnline; 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); setLastOnline(refVal_setLastOnline);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("country")))) if (multipart->hasContent(utility::conversions::to_string_t(U("country"))))
{ {
utility::string_t refVal_setCountry; 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); setCountry(refVal_setCountry);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("steam")))) if (multipart->hasContent(utility::conversions::to_string_t(U("steam"))))
{ {
bool refVal_setSteam; 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); setSteam(refVal_setSteam);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id"))))
{ {
utility::string_t refVal_setDiscordServerId; 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); setDiscordServerId(refVal_setDiscordServerId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url"))))
{ {
utility::string_t refVal_setYoutubeVideoUrl; 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); setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("tags")))) if (multipart->hasContent(utility::conversions::to_string_t(U("tags"))))
{ {
utility::string_t refVal_setTags; 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); setTags(refVal_setTags);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count"))))
{ {
int32_t refVal_setCommentCount; 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); setCommentCount(refVal_setCommentCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t GameServer::getId() const utility::string_t GameServer::getId() const
{ {
return m_Id; return m_Id;
} }
void GameServer::setId(const utility::string_t &value) void GameServer::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -958,7 +993,6 @@ utility::string_t GameServer::getName() const
return m_Name; return m_Name;
} }
void GameServer::setName(const utility::string_t &value) void GameServer::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -979,7 +1013,6 @@ utility::string_t GameServer::getDescription() const
return m_Description; return m_Description;
} }
void GameServer::setDescription(const utility::string_t &value) void GameServer::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -1000,7 +1033,6 @@ utility::string_t GameServer::getAddress() const
return m_Address; return m_Address;
} }
void GameServer::setAddress(const utility::string_t &value) void GameServer::setAddress(const utility::string_t &value)
{ {
m_Address = value; m_Address = value;
@ -1061,7 +1093,6 @@ utility::string_t GameServer::getGameId() const
return m_Game_id; return m_Game_id;
} }
void GameServer::setGameId(const utility::string_t &value) void GameServer::setGameId(const utility::string_t &value)
{ {
m_Game_id = value; m_Game_id = value;
@ -1082,7 +1113,6 @@ utility::string_t GameServer::getGameIconUrl() const
return m_Game_icon_url; return m_Game_icon_url;
} }
void GameServer::setGameIconUrl(const utility::string_t &value) void GameServer::setGameIconUrl(const utility::string_t &value)
{ {
m_Game_icon_url = value; m_Game_icon_url = value;
@ -1103,7 +1133,6 @@ utility::string_t GameServer::getVersion() const
return m_Version; return m_Version;
} }
void GameServer::setVersion(const utility::string_t &value) void GameServer::setVersion(const utility::string_t &value)
{ {
m_Version = value; m_Version = value;
@ -1144,7 +1173,6 @@ utility::string_t GameServer::getClusterId() const
return m_Cluster_id; return m_Cluster_id;
} }
void GameServer::setClusterId(const utility::string_t &value) void GameServer::setClusterId(const utility::string_t &value)
{ {
m_Cluster_id = value; m_Cluster_id = value;
@ -1165,7 +1193,6 @@ utility::string_t GameServer::getWebsiteUrl() const
return m_Website_url; return m_Website_url;
} }
void GameServer::setWebsiteUrl(const utility::string_t &value) void GameServer::setWebsiteUrl(const utility::string_t &value)
{ {
m_Website_url = value; m_Website_url = value;
@ -1186,7 +1213,6 @@ utility::string_t GameServer::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void GameServer::setBannerUrl(const utility::string_t &value) void GameServer::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -1207,7 +1233,6 @@ utility::string_t GameServer::getOwnerId() const
return m_Owner_id; return m_Owner_id;
} }
void GameServer::setOwnerId(const utility::string_t &value) void GameServer::setOwnerId(const utility::string_t &value)
{ {
m_Owner_id = value; m_Owner_id = value;
@ -1248,7 +1273,6 @@ std::shared_ptr<ServerStatus> GameServer::getStatus() const
return m_Status; return m_Status;
} }
void GameServer::setStatus(const std::shared_ptr<ServerStatus> &value) void GameServer::setStatus(const std::shared_ptr<ServerStatus> &value)
{ {
m_Status = value; m_Status = value;
@ -1289,7 +1313,6 @@ utility::string_t GameServer::getMap() const
return m_map; return m_map;
} }
void GameServer::setMap(const utility::string_t &value) void GameServer::setMap(const utility::string_t &value)
{ {
m_map = value; m_map = value;
@ -1350,7 +1373,6 @@ utility::string_t GameServer::getMotd() const
return m_Motd; return m_Motd;
} }
void GameServer::setMotd(const utility::string_t &value) void GameServer::setMotd(const utility::string_t &value)
{ {
m_Motd = value; m_Motd = value;
@ -1371,7 +1393,6 @@ utility::string_t GameServer::getPlayers() const
return m_Players; return m_Players;
} }
void GameServer::setPlayers(const utility::string_t &value) void GameServer::setPlayers(const utility::string_t &value)
{ {
m_Players = value; m_Players = value;
@ -1392,7 +1413,6 @@ utility::datetime GameServer::getLastOnline() const
return m_Last_online; return m_Last_online;
} }
void GameServer::setLastOnline(const utility::datetime &value) void GameServer::setLastOnline(const utility::datetime &value)
{ {
m_Last_online = value; m_Last_online = value;
@ -1413,7 +1433,6 @@ utility::string_t GameServer::getCountry() const
return m_Country; return m_Country;
} }
void GameServer::setCountry(const utility::string_t &value) void GameServer::setCountry(const utility::string_t &value)
{ {
m_Country = value; m_Country = value;
@ -1454,7 +1473,6 @@ utility::string_t GameServer::getDiscordServerId() const
return m_Discord_server_id; return m_Discord_server_id;
} }
void GameServer::setDiscordServerId(const utility::string_t &value) void GameServer::setDiscordServerId(const utility::string_t &value)
{ {
m_Discord_server_id = value; m_Discord_server_id = value;
@ -1475,7 +1493,6 @@ utility::string_t GameServer::getYoutubeVideoUrl() const
return m_Youtube_video_url; return m_Youtube_video_url;
} }
void GameServer::setYoutubeVideoUrl(const utility::string_t &value) void GameServer::setYoutubeVideoUrl(const utility::string_t &value)
{ {
m_Youtube_video_url = value; m_Youtube_video_url = value;
@ -1496,7 +1513,6 @@ utility::string_t GameServer::getTags() const
return m_Tags; return m_Tags;
} }
void GameServer::setTags(const utility::string_t &value) void GameServer::setTags(const utility::string_t &value)
{ {
m_Tags = value; m_Tags = value;
@ -1537,7 +1553,6 @@ utility::datetime GameServer::getCreated() const
return m_Created; return m_Created;
} }
void GameServer::setCreated(const utility::datetime &value) void GameServer::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -1558,7 +1573,6 @@ utility::datetime GameServer::getUpdated() const
return m_Updated; return m_Updated;
} }
void GameServer::setUpdated(const utility::datetime &value) void GameServer::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -1577,5 +1591,3 @@ void GameServer::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GameServerCluster.h" #include "tribufu++/model/GameServerCluster.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
GameServerCluster::GameServerCluster() GameServerCluster::GameServerCluster()
{ {
@ -146,7 +146,6 @@ bool GameServerCluster::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("game_id")))) 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; utility::string_t refVal_setGameId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId); ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
setGameId(refVal_setGameId); setGameId(refVal_setGameId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("website_url")))) 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; utility::string_t refVal_setWebsiteUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setWebsiteUrl);
setWebsiteUrl(refVal_setWebsiteUrl); setWebsiteUrl(refVal_setWebsiteUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("owner_id")))) 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; utility::string_t refVal_setOwnerId;
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId); ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
setOwnerId(refVal_setOwnerId); setOwnerId(refVal_setOwnerId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("discord_server_id")))) 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; utility::string_t refVal_setDiscordServerId;
ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId); ok &= ModelBase::fromJson(fieldValue, refVal_setDiscordServerId);
setDiscordServerId(refVal_setDiscordServerId); setDiscordServerId(refVal_setDiscordServerId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("youtube_video_url")))) 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; utility::string_t refVal_setYoutubeVideoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setYoutubeVideoUrl);
setYoutubeVideoUrl(refVal_setYoutubeVideoUrl); setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("tags")))) 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; utility::string_t refVal_setTags;
ok &= ModelBase::fromJson(fieldValue, refVal_setTags); ok &= ModelBase::fromJson(fieldValue, refVal_setTags);
setTags(refVal_setTags); setTags(refVal_setTags);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("comment_count")))) 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; int32_t refVal_setCommentCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount); ok &= ModelBase::fromJson(fieldValue, refVal_setCommentCount);
setCommentCount(refVal_setCommentCount); setCommentCount(refVal_setCommentCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("server_count")))) 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; int32_t refVal_setServerCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount); ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
setServerCount(refVal_setServerCount); setServerCount(refVal_setServerCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -308,63 +296,78 @@ void GameServerCluster::toMultipart(std::shared_ptr<MultipartFormData> multipart
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
{ {
utility::string_t refVal_setGameId; 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); setGameId(refVal_setGameId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("website_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("website_url"))))
{ {
utility::string_t refVal_setWebsiteUrl; 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); setWebsiteUrl(refVal_setWebsiteUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
{ {
utility::string_t refVal_setOwnerId; 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); setOwnerId(refVal_setOwnerId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("discord_server_id"))))
{ {
utility::string_t refVal_setDiscordServerId; 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); setDiscordServerId(refVal_setDiscordServerId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("youtube_video_url"))))
{ {
utility::string_t refVal_setYoutubeVideoUrl; 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); setYoutubeVideoUrl(refVal_setYoutubeVideoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("tags")))) if (multipart->hasContent(utility::conversions::to_string_t(U("tags"))))
{ {
utility::string_t refVal_setTags; 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); setTags(refVal_setTags);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("comment_count"))))
{ {
int32_t refVal_setCommentCount; 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); setCommentCount(refVal_setCommentCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("server_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
{ {
int32_t refVal_setServerCount; 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); setServerCount(refVal_setServerCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t GameServerCluster::getId() const utility::string_t GameServerCluster::getId() const
{ {
return m_Id; return m_Id;
} }
void GameServerCluster::setId(const utility::string_t &value) void GameServerCluster::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -483,7 +501,6 @@ utility::string_t GameServerCluster::getName() const
return m_Name; return m_Name;
} }
void GameServerCluster::setName(const utility::string_t &value) void GameServerCluster::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -504,7 +521,6 @@ utility::string_t GameServerCluster::getDescription() const
return m_Description; return m_Description;
} }
void GameServerCluster::setDescription(const utility::string_t &value) void GameServerCluster::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -525,7 +541,6 @@ utility::string_t GameServerCluster::getGameId() const
return m_Game_id; return m_Game_id;
} }
void GameServerCluster::setGameId(const utility::string_t &value) void GameServerCluster::setGameId(const utility::string_t &value)
{ {
m_Game_id = value; m_Game_id = value;
@ -546,7 +561,6 @@ utility::string_t GameServerCluster::getWebsiteUrl() const
return m_Website_url; return m_Website_url;
} }
void GameServerCluster::setWebsiteUrl(const utility::string_t &value) void GameServerCluster::setWebsiteUrl(const utility::string_t &value)
{ {
m_Website_url = value; m_Website_url = value;
@ -567,7 +581,6 @@ utility::string_t GameServerCluster::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void GameServerCluster::setBannerUrl(const utility::string_t &value) void GameServerCluster::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -588,7 +601,6 @@ utility::string_t GameServerCluster::getOwnerId() const
return m_Owner_id; return m_Owner_id;
} }
void GameServerCluster::setOwnerId(const utility::string_t &value) void GameServerCluster::setOwnerId(const utility::string_t &value)
{ {
m_Owner_id = value; m_Owner_id = value;
@ -609,7 +621,6 @@ utility::string_t GameServerCluster::getDiscordServerId() const
return m_Discord_server_id; return m_Discord_server_id;
} }
void GameServerCluster::setDiscordServerId(const utility::string_t &value) void GameServerCluster::setDiscordServerId(const utility::string_t &value)
{ {
m_Discord_server_id = value; m_Discord_server_id = value;
@ -630,7 +641,6 @@ utility::string_t GameServerCluster::getYoutubeVideoUrl() const
return m_Youtube_video_url; return m_Youtube_video_url;
} }
void GameServerCluster::setYoutubeVideoUrl(const utility::string_t &value) void GameServerCluster::setYoutubeVideoUrl(const utility::string_t &value)
{ {
m_Youtube_video_url = value; m_Youtube_video_url = value;
@ -651,7 +661,6 @@ utility::string_t GameServerCluster::getTags() const
return m_Tags; return m_Tags;
} }
void GameServerCluster::setTags(const utility::string_t &value) void GameServerCluster::setTags(const utility::string_t &value)
{ {
m_Tags = value; m_Tags = value;
@ -712,7 +721,6 @@ utility::datetime GameServerCluster::getCreated() const
return m_Created; return m_Created;
} }
void GameServerCluster::setCreated(const utility::datetime &value) void GameServerCluster::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -733,7 +741,6 @@ utility::datetime GameServerCluster::getUpdated() const
return m_Updated; return m_Updated;
} }
void GameServerCluster::setUpdated(const utility::datetime &value) void GameServerCluster::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -752,5 +759,3 @@ void GameServerCluster::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GrantType.h" #include "tribufu++/model/GrantType.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -122,5 +122,3 @@ void GrantType::setValue(GrantType::eGrantType const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Group.h" #include "tribufu++/model/Group.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Group::Group() Group::Group()
{ {
@ -160,7 +160,6 @@ bool Group::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("uuid")))) 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; utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid); setUuid(refVal_setUuid);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("tag")))) 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; utility::string_t refVal_setTag;
ok &= ModelBase::fromJson(fieldValue, refVal_setTag); ok &= ModelBase::fromJson(fieldValue, refVal_setTag);
setTag(refVal_setTag); setTag(refVal_setTag);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("type")))) 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; int32_t refVal_setType;
ok &= ModelBase::fromJson(fieldValue, refVal_setType); ok &= ModelBase::fromJson(fieldValue, refVal_setType);
setType(refVal_setType); setType(refVal_setType);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("privacy")))) 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; int32_t refVal_setPrivacy;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy); ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy);
setPrivacy(refVal_setPrivacy); setPrivacy(refVal_setPrivacy);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("owner_id")))) 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; utility::string_t refVal_setOwnerId;
ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId); ok &= ModelBase::fromJson(fieldValue, refVal_setOwnerId);
setOwnerId(refVal_setOwnerId); setOwnerId(refVal_setOwnerId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("verified")))) 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; bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified); ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
setVerified(refVal_setVerified); setVerified(refVal_setVerified);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("photo_url")))) 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; utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl); setPhotoUrl(refVal_setPhotoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("member_count")))) 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; int32_t refVal_setMemberCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount); ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount);
setMemberCount(refVal_setMemberCount); setMemberCount(refVal_setMemberCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("follower_count")))) 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; int32_t refVal_setFollowerCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setFollowerCount); ok &= ModelBase::fromJson(fieldValue, refVal_setFollowerCount);
setFollowerCount(refVal_setFollowerCount); setFollowerCount(refVal_setFollowerCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("view_count")))) 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; int32_t refVal_setViewCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount); ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount);
setViewCount(refVal_setViewCount); setViewCount(refVal_setViewCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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 void Group::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -344,63 +329,78 @@ void Group::toMultipart(std::shared_ptr<MultipartFormData> multipart, const util
} }
if (m_UuidIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{ {
utility::string_t refVal_setUuid; 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); setUuid(refVal_setUuid);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("tag")))) if (multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
{ {
utility::string_t refVal_setTag; 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); setTag(refVal_setTag);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("type")))) if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
{ {
int32_t refVal_setType; 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); setType(refVal_setType);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("privacy")))) if (multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
{ {
int32_t refVal_setPrivacy; 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); setPrivacy(refVal_setPrivacy);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("owner_id"))))
{ {
utility::string_t refVal_setOwnerId; 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); setOwnerId(refVal_setOwnerId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("verified")))) if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{ {
bool refVal_setVerified; 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); setVerified(refVal_setVerified);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{ {
utility::string_t refVal_setPhotoUrl; 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); setPhotoUrl(refVal_setPhotoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("member_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
{ {
int32_t refVal_setMemberCount; 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); setMemberCount(refVal_setMemberCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("follower_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("follower_count"))))
{ {
int32_t refVal_setFollowerCount; 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); setFollowerCount(refVal_setFollowerCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("view_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("view_count"))))
{ {
int32_t refVal_setViewCount; 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); setViewCount(refVal_setViewCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Group::getId() const utility::string_t Group::getId() const
{ {
return m_Id; return m_Id;
} }
void Group::setId(const utility::string_t &value) void Group::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -539,7 +555,6 @@ utility::string_t Group::getUuid() const
return m_Uuid; return m_Uuid;
} }
void Group::setUuid(const utility::string_t &value) void Group::setUuid(const utility::string_t &value)
{ {
m_Uuid = value; m_Uuid = value;
@ -560,7 +575,6 @@ utility::string_t Group::getName() const
return m_Name; return m_Name;
} }
void Group::setName(const utility::string_t &value) void Group::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -581,7 +595,6 @@ utility::string_t Group::getTag() const
return m_Tag; return m_Tag;
} }
void Group::setTag(const utility::string_t &value) void Group::setTag(const utility::string_t &value)
{ {
m_Tag = value; m_Tag = value;
@ -602,7 +615,6 @@ utility::string_t Group::getDescription() const
return m_Description; return m_Description;
} }
void Group::setDescription(const utility::string_t &value) void Group::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -663,7 +675,6 @@ utility::string_t Group::getOwnerId() const
return m_Owner_id; return m_Owner_id;
} }
void Group::setOwnerId(const utility::string_t &value) void Group::setOwnerId(const utility::string_t &value)
{ {
m_Owner_id = value; m_Owner_id = value;
@ -704,7 +715,6 @@ utility::string_t Group::getPhotoUrl() const
return m_Photo_url; return m_Photo_url;
} }
void Group::setPhotoUrl(const utility::string_t &value) void Group::setPhotoUrl(const utility::string_t &value)
{ {
m_Photo_url = value; m_Photo_url = value;
@ -725,7 +735,6 @@ utility::string_t Group::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void Group::setBannerUrl(const utility::string_t &value) void Group::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -806,7 +815,6 @@ utility::datetime Group::getCreated() const
return m_Created; return m_Created;
} }
void Group::setCreated(const utility::datetime &value) void Group::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -827,7 +835,6 @@ utility::datetime Group::getUpdated() const
return m_Updated; return m_Updated;
} }
void Group::setUpdated(const utility::datetime &value) void Group::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -846,5 +853,3 @@ void Group::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GroupGame.h" #include "tribufu++/model/GroupGame.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
GroupGame::GroupGame() GroupGame::GroupGame()
{ {
@ -94,7 +94,6 @@ bool GroupGame::fromJson(const web::json::value& val)
utility::string_t refVal_setGroupId; utility::string_t refVal_setGroupId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGroupId); ok &= ModelBase::fromJson(fieldValue, refVal_setGroupId);
setGroupId(refVal_setGroupId); setGroupId(refVal_setGroupId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("group")))) 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; std::shared_ptr<Group> refVal_setGroup;
ok &= ModelBase::fromJson(fieldValue, refVal_setGroup); ok &= ModelBase::fromJson(fieldValue, refVal_setGroup);
setGroup(refVal_setGroup); setGroup(refVal_setGroup);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("application_id")))) 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; utility::string_t refVal_setApplicationId;
ok &= ModelBase::fromJson(fieldValue, refVal_setApplicationId); ok &= ModelBase::fromJson(fieldValue, refVal_setApplicationId);
setApplicationId(refVal_setApplicationId); setApplicationId(refVal_setApplicationId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("application")))) 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; std::shared_ptr<Application> refVal_setApplication;
ok &= ModelBase::fromJson(fieldValue, refVal_setApplication); ok &= ModelBase::fromJson(fieldValue, refVal_setApplication);
setApplication(refVal_setApplication); setApplication(refVal_setApplication);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("stats")))) 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; std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromJson(fieldValue, refVal_setStats); ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
setStats(refVal_setStats); setStats(refVal_setStats);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("acquired")))) 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; utility::datetime refVal_setAcquired;
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired); ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
setAcquired(refVal_setAcquired); setAcquired(refVal_setAcquired);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_used")))) 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; utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed); ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
setLastUsed(refVal_setLastUsed); setLastUsed(refVal_setLastUsed);
} }
} }
return ok; 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 void GroupGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_Group_idIsSet) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("group_id"))))
{ {
utility::string_t refVal_setGroupId; 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); setGroupId(refVal_setGroupId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("group")))) if (multipart->hasContent(utility::conversions::to_string_t(U("group"))))
{ {
std::shared_ptr<Group> refVal_setGroup; 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); setGroup(refVal_setGroup);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("application_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("application_id"))))
{ {
utility::string_t refVal_setApplicationId; 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); setApplicationId(refVal_setApplicationId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("application")))) if (multipart->hasContent(utility::conversions::to_string_t(U("application"))))
{ {
std::shared_ptr<Application> refVal_setApplication; 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); setApplication(refVal_setApplication);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("stats")))) if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
{ {
std::shared_ptr<AnyType> refVal_setStats; 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); setStats(refVal_setStats);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired")))) if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
{ {
utility::datetime refVal_setAcquired; 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); setAcquired(refVal_setAcquired);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
{ {
utility::datetime refVal_setLastUsed; 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); setLastUsed(refVal_setLastUsed);
} }
return ok; return ok;
} }
utility::string_t GroupGame::getGroupId() const utility::string_t GroupGame::getGroupId() const
{ {
return m_Group_id; return m_Group_id;
} }
void GroupGame::setGroupId(const utility::string_t &value) void GroupGame::setGroupId(const utility::string_t &value)
{ {
m_Group_id = value; m_Group_id = value;
@ -284,7 +292,6 @@ std::shared_ptr<Group> GroupGame::getGroup() const
return m_Group; return m_Group;
} }
void GroupGame::setGroup(const std::shared_ptr<Group> &value) void GroupGame::setGroup(const std::shared_ptr<Group> &value)
{ {
m_Group = value; m_Group = value;
@ -305,7 +312,6 @@ utility::string_t GroupGame::getApplicationId() const
return m_Application_id; return m_Application_id;
} }
void GroupGame::setApplicationId(const utility::string_t &value) void GroupGame::setApplicationId(const utility::string_t &value)
{ {
m_Application_id = value; m_Application_id = value;
@ -326,7 +332,6 @@ std::shared_ptr<Application> GroupGame::getApplication() const
return m_Application; return m_Application;
} }
void GroupGame::setApplication(const std::shared_ptr<Application> &value) void GroupGame::setApplication(const std::shared_ptr<Application> &value)
{ {
m_Application = value; m_Application = value;
@ -347,7 +352,6 @@ std::shared_ptr<AnyType> GroupGame::getStats() const
return m_Stats; return m_Stats;
} }
void GroupGame::setStats(const std::shared_ptr<AnyType> &value) void GroupGame::setStats(const std::shared_ptr<AnyType> &value)
{ {
m_Stats = value; m_Stats = value;
@ -368,7 +372,6 @@ utility::datetime GroupGame::getAcquired() const
return m_Acquired; return m_Acquired;
} }
void GroupGame::setAcquired(const utility::datetime &value) void GroupGame::setAcquired(const utility::datetime &value)
{ {
m_Acquired = value; m_Acquired = value;
@ -389,7 +392,6 @@ utility::datetime GroupGame::getLastUsed() const
return m_Last_used; return m_Last_used;
} }
void GroupGame::setLastUsed(const utility::datetime &value) void GroupGame::setLastUsed(const utility::datetime &value)
{ {
m_Last_used = value; m_Last_used = value;
@ -408,5 +410,3 @@ void GroupGame::unsetLast_used()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GroupMember.h" #include "tribufu++/model/GroupMember.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
GroupMember::GroupMember() GroupMember::GroupMember()
{ {
@ -110,7 +110,6 @@ bool GroupMember::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("uuid")))) 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; utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid); setUuid(refVal_setUuid);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("display_name")))) 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; utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName); ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
setDisplayName(refVal_setDisplayName); setDisplayName(refVal_setDisplayName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("verified")))) 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; bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified); ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
setVerified(refVal_setVerified); setVerified(refVal_setVerified);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("photo_url")))) 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; utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl); setPhotoUrl(refVal_setPhotoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_online")))) 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; utility::datetime refVal_setLastOnline;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline); ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
setLastOnline(refVal_setLastOnline); setLastOnline(refVal_setLastOnline);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("rank")))) 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; std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromJson(fieldValue, refVal_setRank); ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
setRank(refVal_setRank); setRank(refVal_setRank);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("since")))) 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; utility::datetime refVal_setSince;
ok &= ModelBase::fromJson(fieldValue, refVal_setSince); ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
setSince(refVal_setSince); setSince(refVal_setSince);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -217,35 +210,43 @@ void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
} }
if (m_UuidIsSet) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{ {
utility::string_t refVal_setUuid; 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); setUuid(refVal_setUuid);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
{ {
utility::string_t refVal_setDisplayName; 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); setDisplayName(refVal_setDisplayName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("verified")))) if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{ {
bool refVal_setVerified; 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); setVerified(refVal_setVerified);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{ {
utility::string_t refVal_setPhotoUrl; 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); setPhotoUrl(refVal_setPhotoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
{ {
utility::datetime refVal_setLastOnline; 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); setLastOnline(refVal_setLastOnline);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("rank")))) if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
{ {
std::shared_ptr<GroupRank> refVal_setRank; 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); setRank(refVal_setRank);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("since")))) if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
{ {
utility::datetime refVal_setSince; 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); setSince(refVal_setSince);
} }
return ok; return ok;
} }
utility::string_t GroupMember::getId() const utility::string_t GroupMember::getId() const
{ {
return m_Id; return m_Id;
} }
void GroupMember::setId(const utility::string_t &value) void GroupMember::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -342,7 +351,6 @@ utility::string_t GroupMember::getUuid() const
return m_Uuid; return m_Uuid;
} }
void GroupMember::setUuid(const utility::string_t &value) void GroupMember::setUuid(const utility::string_t &value)
{ {
m_Uuid = value; m_Uuid = value;
@ -363,7 +371,6 @@ utility::string_t GroupMember::getName() const
return m_Name; return m_Name;
} }
void GroupMember::setName(const utility::string_t &value) void GroupMember::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -384,7 +391,6 @@ utility::string_t GroupMember::getDisplayName() const
return m_Display_name; return m_Display_name;
} }
void GroupMember::setDisplayName(const utility::string_t &value) void GroupMember::setDisplayName(const utility::string_t &value)
{ {
m_Display_name = value; m_Display_name = value;
@ -425,7 +431,6 @@ utility::string_t GroupMember::getPhotoUrl() const
return m_Photo_url; return m_Photo_url;
} }
void GroupMember::setPhotoUrl(const utility::string_t &value) void GroupMember::setPhotoUrl(const utility::string_t &value)
{ {
m_Photo_url = value; m_Photo_url = value;
@ -446,7 +451,6 @@ utility::datetime GroupMember::getLastOnline() const
return m_Last_online; return m_Last_online;
} }
void GroupMember::setLastOnline(const utility::datetime &value) void GroupMember::setLastOnline(const utility::datetime &value)
{ {
m_Last_online = value; m_Last_online = value;
@ -467,7 +471,6 @@ std::shared_ptr<GroupRank> GroupMember::getRank() const
return m_Rank; return m_Rank;
} }
void GroupMember::setRank(const std::shared_ptr<GroupRank> &value) void GroupMember::setRank(const std::shared_ptr<GroupRank> &value)
{ {
m_Rank = value; m_Rank = value;
@ -488,7 +491,6 @@ utility::datetime GroupMember::getSince() const
return m_Since; return m_Since;
} }
void GroupMember::setSince(const utility::datetime &value) void GroupMember::setSince(const utility::datetime &value)
{ {
m_Since = value; m_Since = value;
@ -507,5 +509,3 @@ void GroupMember::unsetSince()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/GroupRank.h" #include "tribufu++/model/GroupRank.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -118,5 +118,3 @@ void GroupRank::setValue(GroupRank::eGroupRank const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/HashViewModel.h" #include "tribufu++/model/HashViewModel.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
HashViewModel::HashViewModel() HashViewModel::HashViewModel()
{ {
@ -55,22 +55,24 @@ bool HashViewModel::fromJson(const web::json::value& val)
utility::string_t refVal_setValue; utility::string_t refVal_setValue;
ok &= ModelBase::fromJson(fieldValue, refVal_setValue); ok &= ModelBase::fromJson(fieldValue, refVal_setValue);
setValue(refVal_setValue); setValue(refVal_setValue);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_ValueIsSet) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("value"))))
{ {
utility::string_t refVal_setValue; 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); setValue(refVal_setValue);
} }
return ok; return ok;
} }
utility::string_t HashViewModel::getValue() const utility::string_t HashViewModel::getValue() const
{ {
return m_Value; return m_Value;
} }
void HashViewModel::setValue(const utility::string_t &value) void HashViewModel::setValue(const utility::string_t &value)
{ {
m_Value = value; m_Value = value;
@ -117,5 +119,3 @@ void HashViewModel::unsetValue()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/IntrospectRequest.h" #include "tribufu++/model/IntrospectRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
IntrospectRequest::IntrospectRequest() IntrospectRequest::IntrospectRequest()
{ {
@ -61,7 +61,6 @@ bool IntrospectRequest::fromJson(const web::json::value& val)
utility::string_t refVal_setToken; utility::string_t refVal_setToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setToken); ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
setToken(refVal_setToken); setToken(refVal_setToken);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint")))) 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; std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint); ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint); setTokenTypeHint(refVal_setTokenTypeHint);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_TokenIsSet) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("token"))))
{ {
utility::string_t refVal_setToken; 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); setToken(refVal_setToken);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint")))) if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
{ {
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint; 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); setTokenTypeHint(refVal_setTokenTypeHint);
} }
return ok; return ok;
} }
utility::string_t IntrospectRequest::getToken() const utility::string_t IntrospectRequest::getToken() const
{ {
return m_Token; return m_Token;
} }
void IntrospectRequest::setToken(const utility::string_t &value) void IntrospectRequest::setToken(const utility::string_t &value)
{ {
m_Token = value; m_Token = value;
@ -146,7 +151,6 @@ std::shared_ptr<TokenHintType> IntrospectRequest::getTokenTypeHint() const
return m_Token_type_hint; return m_Token_type_hint;
} }
void IntrospectRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value) void IntrospectRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value)
{ {
m_Token_type_hint = value; m_Token_type_hint = value;
@ -165,5 +169,3 @@ void IntrospectRequest::unsetToken_type_hint()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/IpAddress.h" #include "tribufu++/model/IpAddress.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
IpAddress::IpAddress() IpAddress::IpAddress()
{ {
@ -174,7 +174,6 @@ bool IpAddress::fromJson(const web::json::value& val)
utility::string_t refVal_setAddress; utility::string_t refVal_setAddress;
ok &= ModelBase::fromJson(fieldValue, refVal_setAddress); ok &= ModelBase::fromJson(fieldValue, refVal_setAddress);
setAddress(refVal_setAddress); setAddress(refVal_setAddress);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("version")))) 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; int32_t refVal_setVersion;
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion); ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
setVersion(refVal_setVersion); setVersion(refVal_setVersion);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("network")))) 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; utility::string_t refVal_setNetwork;
ok &= ModelBase::fromJson(fieldValue, refVal_setNetwork); ok &= ModelBase::fromJson(fieldValue, refVal_setNetwork);
setNetwork(refVal_setNetwork); setNetwork(refVal_setNetwork);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("reserved")))) 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; bool refVal_setReserved;
ok &= ModelBase::fromJson(fieldValue, refVal_setReserved); ok &= ModelBase::fromJson(fieldValue, refVal_setReserved);
setReserved(refVal_setReserved); setReserved(refVal_setReserved);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("asn")))) 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; utility::string_t refVal_setAsn;
ok &= ModelBase::fromJson(fieldValue, refVal_setAsn); ok &= ModelBase::fromJson(fieldValue, refVal_setAsn);
setAsn(refVal_setAsn); setAsn(refVal_setAsn);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("isp")))) 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; utility::string_t refVal_setIsp;
ok &= ModelBase::fromJson(fieldValue, refVal_setIsp); ok &= ModelBase::fromJson(fieldValue, refVal_setIsp);
setIsp(refVal_setIsp); setIsp(refVal_setIsp);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("continent")))) 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; utility::string_t refVal_setContinent;
ok &= ModelBase::fromJson(fieldValue, refVal_setContinent); ok &= ModelBase::fromJson(fieldValue, refVal_setContinent);
setContinent(refVal_setContinent); setContinent(refVal_setContinent);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("country")))) 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; utility::string_t refVal_setCountry;
ok &= ModelBase::fromJson(fieldValue, refVal_setCountry); ok &= ModelBase::fromJson(fieldValue, refVal_setCountry);
setCountry(refVal_setCountry); setCountry(refVal_setCountry);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("region")))) 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; utility::string_t refVal_setRegion;
ok &= ModelBase::fromJson(fieldValue, refVal_setRegion); ok &= ModelBase::fromJson(fieldValue, refVal_setRegion);
setRegion(refVal_setRegion); setRegion(refVal_setRegion);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("city")))) 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; utility::string_t refVal_setCity;
ok &= ModelBase::fromJson(fieldValue, refVal_setCity); ok &= ModelBase::fromJson(fieldValue, refVal_setCity);
setCity(refVal_setCity); setCity(refVal_setCity);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("postal_code")))) 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; utility::string_t refVal_setPostalCode;
ok &= ModelBase::fromJson(fieldValue, refVal_setPostalCode); ok &= ModelBase::fromJson(fieldValue, refVal_setPostalCode);
setPostalCode(refVal_setPostalCode); setPostalCode(refVal_setPostalCode);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("calling_code")))) 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; utility::string_t refVal_setCallingCode;
ok &= ModelBase::fromJson(fieldValue, refVal_setCallingCode); ok &= ModelBase::fromJson(fieldValue, refVal_setCallingCode);
setCallingCode(refVal_setCallingCode); setCallingCode(refVal_setCallingCode);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("tld")))) 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; utility::string_t refVal_setTld;
ok &= ModelBase::fromJson(fieldValue, refVal_setTld); ok &= ModelBase::fromJson(fieldValue, refVal_setTld);
setTld(refVal_setTld); setTld(refVal_setTld);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("language")))) 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; utility::string_t refVal_setLanguage;
ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage); ok &= ModelBase::fromJson(fieldValue, refVal_setLanguage);
setLanguage(refVal_setLanguage); setLanguage(refVal_setLanguage);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("timezone")))) 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; utility::string_t refVal_setTimezone;
ok &= ModelBase::fromJson(fieldValue, refVal_setTimezone); ok &= ModelBase::fromJson(fieldValue, refVal_setTimezone);
setTimezone(refVal_setTimezone); setTimezone(refVal_setTimezone);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("currency")))) 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; utility::string_t refVal_setCurrency;
ok &= ModelBase::fromJson(fieldValue, refVal_setCurrency); ok &= ModelBase::fromJson(fieldValue, refVal_setCurrency);
setCurrency(refVal_setCurrency); setCurrency(refVal_setCurrency);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("latitude")))) 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; float refVal_setLatitude;
ok &= ModelBase::fromJson(fieldValue, refVal_setLatitude); ok &= ModelBase::fromJson(fieldValue, refVal_setLatitude);
setLatitude(refVal_setLatitude); setLatitude(refVal_setLatitude);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("longitude")))) 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; float refVal_setLongitude;
ok &= ModelBase::fromJson(fieldValue, refVal_setLongitude); ok &= ModelBase::fromJson(fieldValue, refVal_setLongitude);
setLongitude(refVal_setLongitude); setLongitude(refVal_setLongitude);
} }
} }
return ok; 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 void IpAddress::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_AddressIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("address"))))
{ {
utility::string_t refVal_setAddress; 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); setAddress(refVal_setAddress);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("version")))) if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
{ {
int32_t refVal_setVersion; 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); setVersion(refVal_setVersion);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("network")))) if (multipart->hasContent(utility::conversions::to_string_t(U("network"))))
{ {
utility::string_t refVal_setNetwork; 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); setNetwork(refVal_setNetwork);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("reserved")))) if (multipart->hasContent(utility::conversions::to_string_t(U("reserved"))))
{ {
bool refVal_setReserved; 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); setReserved(refVal_setReserved);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("asn")))) if (multipart->hasContent(utility::conversions::to_string_t(U("asn"))))
{ {
utility::string_t refVal_setAsn; 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); setAsn(refVal_setAsn);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("isp")))) if (multipart->hasContent(utility::conversions::to_string_t(U("isp"))))
{ {
utility::string_t refVal_setIsp; 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); setIsp(refVal_setIsp);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("continent")))) if (multipart->hasContent(utility::conversions::to_string_t(U("continent"))))
{ {
utility::string_t refVal_setContinent; 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); setContinent(refVal_setContinent);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("country")))) if (multipart->hasContent(utility::conversions::to_string_t(U("country"))))
{ {
utility::string_t refVal_setCountry; 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); setCountry(refVal_setCountry);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("region")))) if (multipart->hasContent(utility::conversions::to_string_t(U("region"))))
{ {
utility::string_t refVal_setRegion; 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); setRegion(refVal_setRegion);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("city")))) if (multipart->hasContent(utility::conversions::to_string_t(U("city"))))
{ {
utility::string_t refVal_setCity; 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); setCity(refVal_setCity);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("postal_code")))) if (multipart->hasContent(utility::conversions::to_string_t(U("postal_code"))))
{ {
utility::string_t refVal_setPostalCode; 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); setPostalCode(refVal_setPostalCode);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("calling_code")))) if (multipart->hasContent(utility::conversions::to_string_t(U("calling_code"))))
{ {
utility::string_t refVal_setCallingCode; 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); setCallingCode(refVal_setCallingCode);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("tld")))) if (multipart->hasContent(utility::conversions::to_string_t(U("tld"))))
{ {
utility::string_t refVal_setTld; 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); setTld(refVal_setTld);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("language")))) if (multipart->hasContent(utility::conversions::to_string_t(U("language"))))
{ {
utility::string_t refVal_setLanguage; 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); setLanguage(refVal_setLanguage);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("timezone")))) if (multipart->hasContent(utility::conversions::to_string_t(U("timezone"))))
{ {
utility::string_t refVal_setTimezone; 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); setTimezone(refVal_setTimezone);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("currency")))) if (multipart->hasContent(utility::conversions::to_string_t(U("currency"))))
{ {
utility::string_t refVal_setCurrency; 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); setCurrency(refVal_setCurrency);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("latitude")))) if (multipart->hasContent(utility::conversions::to_string_t(U("latitude"))))
{ {
float refVal_setLatitude; 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); setLatitude(refVal_setLatitude);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("longitude")))) if (multipart->hasContent(utility::conversions::to_string_t(U("longitude"))))
{ {
float refVal_setLongitude; 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); setLongitude(refVal_setLongitude);
} }
return ok; return ok;
} }
utility::string_t IpAddress::getAddress() const utility::string_t IpAddress::getAddress() const
{ {
return m_Address; return m_Address;
} }
void IpAddress::setAddress(const utility::string_t &value) void IpAddress::setAddress(const utility::string_t &value)
{ {
m_Address = value; m_Address = value;
@ -615,7 +633,6 @@ utility::string_t IpAddress::getNetwork() const
return m_Network; return m_Network;
} }
void IpAddress::setNetwork(const utility::string_t &value) void IpAddress::setNetwork(const utility::string_t &value)
{ {
m_Network = value; m_Network = value;
@ -656,7 +673,6 @@ utility::string_t IpAddress::getAsn() const
return m_Asn; return m_Asn;
} }
void IpAddress::setAsn(const utility::string_t &value) void IpAddress::setAsn(const utility::string_t &value)
{ {
m_Asn = value; m_Asn = value;
@ -677,7 +693,6 @@ utility::string_t IpAddress::getIsp() const
return m_Isp; return m_Isp;
} }
void IpAddress::setIsp(const utility::string_t &value) void IpAddress::setIsp(const utility::string_t &value)
{ {
m_Isp = value; m_Isp = value;
@ -698,7 +713,6 @@ utility::string_t IpAddress::getContinent() const
return m_Continent; return m_Continent;
} }
void IpAddress::setContinent(const utility::string_t &value) void IpAddress::setContinent(const utility::string_t &value)
{ {
m_Continent = value; m_Continent = value;
@ -719,7 +733,6 @@ utility::string_t IpAddress::getCountry() const
return m_Country; return m_Country;
} }
void IpAddress::setCountry(const utility::string_t &value) void IpAddress::setCountry(const utility::string_t &value)
{ {
m_Country = value; m_Country = value;
@ -740,7 +753,6 @@ utility::string_t IpAddress::getRegion() const
return m_Region; return m_Region;
} }
void IpAddress::setRegion(const utility::string_t &value) void IpAddress::setRegion(const utility::string_t &value)
{ {
m_Region = value; m_Region = value;
@ -761,7 +773,6 @@ utility::string_t IpAddress::getCity() const
return m_City; return m_City;
} }
void IpAddress::setCity(const utility::string_t &value) void IpAddress::setCity(const utility::string_t &value)
{ {
m_City = value; m_City = value;
@ -782,7 +793,6 @@ utility::string_t IpAddress::getPostalCode() const
return m_Postal_code; return m_Postal_code;
} }
void IpAddress::setPostalCode(const utility::string_t &value) void IpAddress::setPostalCode(const utility::string_t &value)
{ {
m_Postal_code = value; m_Postal_code = value;
@ -803,7 +813,6 @@ utility::string_t IpAddress::getCallingCode() const
return m_Calling_code; return m_Calling_code;
} }
void IpAddress::setCallingCode(const utility::string_t &value) void IpAddress::setCallingCode(const utility::string_t &value)
{ {
m_Calling_code = value; m_Calling_code = value;
@ -824,7 +833,6 @@ utility::string_t IpAddress::getTld() const
return m_Tld; return m_Tld;
} }
void IpAddress::setTld(const utility::string_t &value) void IpAddress::setTld(const utility::string_t &value)
{ {
m_Tld = value; m_Tld = value;
@ -845,7 +853,6 @@ utility::string_t IpAddress::getLanguage() const
return m_Language; return m_Language;
} }
void IpAddress::setLanguage(const utility::string_t &value) void IpAddress::setLanguage(const utility::string_t &value)
{ {
m_Language = value; m_Language = value;
@ -866,7 +873,6 @@ utility::string_t IpAddress::getTimezone() const
return m_Timezone; return m_Timezone;
} }
void IpAddress::setTimezone(const utility::string_t &value) void IpAddress::setTimezone(const utility::string_t &value)
{ {
m_Timezone = value; m_Timezone = value;
@ -887,7 +893,6 @@ utility::string_t IpAddress::getCurrency() const
return m_Currency; return m_Currency;
} }
void IpAddress::setCurrency(const utility::string_t &value) void IpAddress::setCurrency(const utility::string_t &value)
{ {
m_Currency = value; m_Currency = value;
@ -946,5 +951,3 @@ void IpAddress::unsetLongitude()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/LeaderboardItem.h" #include "tribufu++/model/LeaderboardItem.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
LeaderboardItem::LeaderboardItem() LeaderboardItem::LeaderboardItem()
{ {
@ -90,7 +90,6 @@ bool LeaderboardItem::fromJson(const web::json::value& val)
utility::string_t refVal_setName; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("display_name")))) 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; utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName); ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
setDisplayName(refVal_setDisplayName); setDisplayName(refVal_setDisplayName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("photo_url")))) 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; utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl); setPhotoUrl(refVal_setPhotoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("level")))) 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; int32_t refVal_setLevel;
ok &= ModelBase::fromJson(fieldValue, refVal_setLevel); ok &= ModelBase::fromJson(fieldValue, refVal_setLevel);
setLevel(refVal_setLevel); setLevel(refVal_setLevel);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("experience")))) 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; double refVal_setExperience;
ok &= ModelBase::fromJson(fieldValue, refVal_setExperience); ok &= ModelBase::fromJson(fieldValue, refVal_setExperience);
setExperience(refVal_setExperience); setExperience(refVal_setExperience);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("points")))) 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; double refVal_setPoints;
ok &= ModelBase::fromJson(fieldValue, refVal_setPoints); ok &= ModelBase::fromJson(fieldValue, refVal_setPoints);
setPoints(refVal_setPoints); setPoints(refVal_setPoints);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
{ {
utility::string_t refVal_setDisplayName; 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); setDisplayName(refVal_setDisplayName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{ {
utility::string_t refVal_setPhotoUrl; 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); setPhotoUrl(refVal_setPhotoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("level")))) if (multipart->hasContent(utility::conversions::to_string_t(U("level"))))
{ {
int32_t refVal_setLevel; 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); setLevel(refVal_setLevel);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("experience")))) if (multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
{ {
double refVal_setExperience; 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); setExperience(refVal_setExperience);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("points")))) if (multipart->hasContent(utility::conversions::to_string_t(U("points"))))
{ {
double refVal_setPoints; 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); setPoints(refVal_setPoints);
} }
return ok; return ok;
} }
utility::string_t LeaderboardItem::getName() const utility::string_t LeaderboardItem::getName() const
{ {
return m_Name; return m_Name;
} }
void LeaderboardItem::setName(const utility::string_t &value) void LeaderboardItem::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -259,7 +267,6 @@ utility::string_t LeaderboardItem::getDisplayName() const
return m_Display_name; return m_Display_name;
} }
void LeaderboardItem::setDisplayName(const utility::string_t &value) void LeaderboardItem::setDisplayName(const utility::string_t &value)
{ {
m_Display_name = value; m_Display_name = value;
@ -280,7 +287,6 @@ utility::string_t LeaderboardItem::getPhotoUrl() const
return m_Photo_url; return m_Photo_url;
} }
void LeaderboardItem::setPhotoUrl(const utility::string_t &value) void LeaderboardItem::setPhotoUrl(const utility::string_t &value)
{ {
m_Photo_url = value; m_Photo_url = value;
@ -359,5 +365,3 @@ void LeaderboardItem::unsetPoints()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/LeaderboardOrder.h" #include "tribufu++/model/LeaderboardOrder.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -70,7 +70,8 @@ bool LeaderboardOrder::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -82,7 +83,8 @@ void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart,
multipart->add(ModelBase::toHttpContent(namePrefix, e)); 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; bool ok = true;
utility::string_t namePrefix = prefix; utility::string_t namePrefix = prefix;
@ -114,5 +116,3 @@ void LeaderboardOrder::setValue(LeaderboardOrder::eLeaderboardOrder const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/LoginProvider.h" #include "tribufu++/model/LoginProvider.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -90,7 +90,8 @@ bool LoginProvider::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -134,5 +135,3 @@ void LoginProvider::setValue(LoginProvider::eLoginProvider const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/LoginRequest.h" #include "tribufu++/model/LoginRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
LoginRequest::LoginRequest() LoginRequest::LoginRequest()
{ {
@ -62,7 +62,6 @@ bool LoginRequest::fromJson(const web::json::value& val)
utility::string_t refVal_setLogin; utility::string_t refVal_setLogin;
ok &= ModelBase::fromJson(fieldValue, refVal_setLogin); ok &= ModelBase::fromJson(fieldValue, refVal_setLogin);
setLogin(refVal_setLogin); setLogin(refVal_setLogin);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("password")))) 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; utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword); ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword); setPassword(refVal_setPassword);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_LoginIsSet) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("login"))))
{ {
utility::string_t refVal_setLogin; 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); setLogin(refVal_setLogin);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("password")))) if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{ {
utility::string_t refVal_setPassword; 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); setPassword(refVal_setPassword);
} }
return ok; return ok;
} }
utility::string_t LoginRequest::getLogin() const utility::string_t LoginRequest::getLogin() const
{ {
return m_Login; return m_Login;
} }
void LoginRequest::setLogin(const utility::string_t &value) void LoginRequest::setLogin(const utility::string_t &value)
{ {
m_Login = value; m_Login = value;
@ -147,7 +150,6 @@ utility::string_t LoginRequest::getPassword() const
return m_Password; return m_Password;
} }
void LoginRequest::setPassword(const utility::string_t &value) void LoginRequest::setPassword(const utility::string_t &value)
{ {
m_Password = value; m_Password = value;
@ -166,5 +168,3 @@ void LoginRequest::unsetPassword()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/LoginResponse.h" #include "tribufu++/model/LoginResponse.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
LoginResponse::LoginResponse() LoginResponse::LoginResponse()
{ {
@ -75,7 +75,6 @@ bool LoginResponse::fromJson(const web::json::value& val)
std::shared_ptr<UserInfo> refVal_setUser; std::shared_ptr<UserInfo> refVal_setUser;
ok &= ModelBase::fromJson(fieldValue, refVal_setUser); ok &= ModelBase::fromJson(fieldValue, refVal_setUser);
setUser(refVal_setUser); setUser(refVal_setUser);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("access_token")))) 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; utility::string_t refVal_setAccessToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setAccessToken); ok &= ModelBase::fromJson(fieldValue, refVal_setAccessToken);
setAccessToken(refVal_setAccessToken); setAccessToken(refVal_setAccessToken);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("refresh_token")))) 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; utility::string_t refVal_setRefreshToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken); ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken); setRefreshToken(refVal_setRefreshToken);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("expires_in")))) 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; int64_t refVal_setExpiresIn;
ok &= ModelBase::fromJson(fieldValue, refVal_setExpiresIn); ok &= ModelBase::fromJson(fieldValue, refVal_setExpiresIn);
setExpiresIn(refVal_setExpiresIn); setExpiresIn(refVal_setExpiresIn);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_UserIsSet) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("user"))))
{ {
std::shared_ptr<UserInfo> refVal_setUser; 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); setUser(refVal_setUser);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("access_token")))) if (multipart->hasContent(utility::conversions::to_string_t(U("access_token"))))
{ {
utility::string_t refVal_setAccessToken; 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); setAccessToken(refVal_setAccessToken);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token")))) if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
{ {
utility::string_t refVal_setRefreshToken; 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); setRefreshToken(refVal_setRefreshToken);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("expires_in")))) if (multipart->hasContent(utility::conversions::to_string_t(U("expires_in"))))
{ {
int64_t refVal_setExpiresIn; 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); setExpiresIn(refVal_setExpiresIn);
} }
return ok; return ok;
} }
std::shared_ptr<UserInfo> LoginResponse::getUser() const std::shared_ptr<UserInfo> LoginResponse::getUser() const
{ {
return m_User; return m_User;
} }
void LoginResponse::setUser(const std::shared_ptr<UserInfo> &value) void LoginResponse::setUser(const std::shared_ptr<UserInfo> &value)
{ {
m_User = value; m_User = value;
@ -202,7 +208,6 @@ utility::string_t LoginResponse::getAccessToken() const
return m_Access_token; return m_Access_token;
} }
void LoginResponse::setAccessToken(const utility::string_t &value) void LoginResponse::setAccessToken(const utility::string_t &value)
{ {
m_Access_token = value; m_Access_token = value;
@ -223,7 +228,6 @@ utility::string_t LoginResponse::getRefreshToken() const
return m_Refresh_token; return m_Refresh_token;
} }
void LoginResponse::setRefreshToken(const utility::string_t &value) void LoginResponse::setRefreshToken(const utility::string_t &value)
{ {
m_Refresh_token = value; m_Refresh_token = value;
@ -262,5 +266,3 @@ void LoginResponse::unsetExpires_in()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Package.h" #include "tribufu++/model/Package.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Package::Package() Package::Package()
{ {
@ -132,7 +132,6 @@ bool Package::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("image_url")))) 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; utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
setImageUrl(refVal_setImageUrl); setImageUrl(refVal_setImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("author_id")))) 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; utility::string_t refVal_setAuthorId;
ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorId); ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorId);
setAuthorId(refVal_setAuthorId); setAuthorId(refVal_setAuthorId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("version")))) 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; utility::string_t refVal_setVersion;
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion); ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
setVersion(refVal_setVersion); setVersion(refVal_setVersion);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("file_url")))) 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; utility::string_t refVal_setFileUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setFileUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setFileUrl);
setFileUrl(refVal_setFileUrl); setFileUrl(refVal_setFileUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("raw_size")))) 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; double refVal_setRawSize;
ok &= ModelBase::fromJson(fieldValue, refVal_setRawSize); ok &= ModelBase::fromJson(fieldValue, refVal_setRawSize);
setRawSize(refVal_setRawSize); setRawSize(refVal_setRawSize);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("download_count")))) 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; int32_t refVal_setDownloadCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount); ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
setDownloadCount(refVal_setDownloadCount); setDownloadCount(refVal_setDownloadCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_download")))) 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; utility::datetime refVal_setLastDownload;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastDownload); ok &= ModelBase::fromJson(fieldValue, refVal_setLastDownload);
setLastDownload(refVal_setLastDownload); setLastDownload(refVal_setLastDownload);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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 void Package::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -272,47 +261,58 @@ void Package::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
{ {
utility::string_t refVal_setImageUrl; 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); setImageUrl(refVal_setImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("author_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("author_id"))))
{ {
utility::string_t refVal_setAuthorId; 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); setAuthorId(refVal_setAuthorId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("version")))) if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
{ {
utility::string_t refVal_setVersion; 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); setVersion(refVal_setVersion);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("file_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("file_url"))))
{ {
utility::string_t refVal_setFileUrl; 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); setFileUrl(refVal_setFileUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("raw_size")))) if (multipart->hasContent(utility::conversions::to_string_t(U("raw_size"))))
{ {
double refVal_setRawSize; 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); setRawSize(refVal_setRawSize);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
{ {
int32_t refVal_setDownloadCount; 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); setDownloadCount(refVal_setDownloadCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_download")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_download"))))
{ {
utility::datetime refVal_setLastDownload; 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); setLastDownload(refVal_setLastDownload);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Package::getId() const utility::string_t Package::getId() const
{ {
return m_Id; return m_Id;
} }
void Package::setId(const utility::string_t &value) void Package::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -427,7 +440,6 @@ utility::string_t Package::getName() const
return m_Name; return m_Name;
} }
void Package::setName(const utility::string_t &value) void Package::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -448,7 +460,6 @@ utility::string_t Package::getDescription() const
return m_Description; return m_Description;
} }
void Package::setDescription(const utility::string_t &value) void Package::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -469,7 +480,6 @@ utility::string_t Package::getImageUrl() const
return m_Image_url; return m_Image_url;
} }
void Package::setImageUrl(const utility::string_t &value) void Package::setImageUrl(const utility::string_t &value)
{ {
m_Image_url = value; m_Image_url = value;
@ -490,7 +500,6 @@ utility::string_t Package::getAuthorId() const
return m_Author_id; return m_Author_id;
} }
void Package::setAuthorId(const utility::string_t &value) void Package::setAuthorId(const utility::string_t &value)
{ {
m_Author_id = value; m_Author_id = value;
@ -511,7 +520,6 @@ utility::string_t Package::getVersion() const
return m_Version; return m_Version;
} }
void Package::setVersion(const utility::string_t &value) void Package::setVersion(const utility::string_t &value)
{ {
m_Version = value; m_Version = value;
@ -532,7 +540,6 @@ utility::string_t Package::getFileUrl() const
return m_File_url; return m_File_url;
} }
void Package::setFileUrl(const utility::string_t &value) void Package::setFileUrl(const utility::string_t &value)
{ {
m_File_url = value; m_File_url = value;
@ -593,7 +600,6 @@ utility::datetime Package::getLastDownload() const
return m_Last_download; return m_Last_download;
} }
void Package::setLastDownload(const utility::datetime &value) void Package::setLastDownload(const utility::datetime &value)
{ {
m_Last_download = value; m_Last_download = value;
@ -614,7 +620,6 @@ utility::datetime Package::getCreated() const
return m_Created; return m_Created;
} }
void Package::setCreated(const utility::datetime &value) void Package::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -635,7 +640,6 @@ utility::datetime Package::getUpdated() const
return m_Updated; return m_Updated;
} }
void Package::setUpdated(const utility::datetime &value) void Package::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -654,5 +658,3 @@ void Package::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Profile.h" #include "tribufu++/model/Profile.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Profile::Profile() Profile::Profile()
{ {
@ -173,7 +173,6 @@ bool Profile::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("uuid")))) 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; utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid); setUuid(refVal_setUuid);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("display_name")))) 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; utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName); ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
setDisplayName(refVal_setDisplayName); setDisplayName(refVal_setDisplayName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("verified")))) 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; bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified); ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
setVerified(refVal_setVerified); setVerified(refVal_setVerified);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("level")))) 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; int32_t refVal_setLevel;
ok &= ModelBase::fromJson(fieldValue, refVal_setLevel); ok &= ModelBase::fromJson(fieldValue, refVal_setLevel);
setLevel(refVal_setLevel); setLevel(refVal_setLevel);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("experience")))) 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; double refVal_setExperience;
ok &= ModelBase::fromJson(fieldValue, refVal_setExperience); ok &= ModelBase::fromJson(fieldValue, refVal_setExperience);
setExperience(refVal_setExperience); setExperience(refVal_setExperience);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("public_birthday")))) 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; bool refVal_setPublicBirthday;
ok &= ModelBase::fromJson(fieldValue, refVal_setPublicBirthday); ok &= ModelBase::fromJson(fieldValue, refVal_setPublicBirthday);
setPublicBirthday(refVal_setPublicBirthday); setPublicBirthday(refVal_setPublicBirthday);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("birthday")))) 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; utility::datetime refVal_setBirthday;
ok &= ModelBase::fromJson(fieldValue, refVal_setBirthday); ok &= ModelBase::fromJson(fieldValue, refVal_setBirthday);
setBirthday(refVal_setBirthday); setBirthday(refVal_setBirthday);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("points")))) 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; double refVal_setPoints;
ok &= ModelBase::fromJson(fieldValue, refVal_setPoints); ok &= ModelBase::fromJson(fieldValue, refVal_setPoints);
setPoints(refVal_setPoints); setPoints(refVal_setPoints);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("location")))) 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; utility::string_t refVal_setLocation;
ok &= ModelBase::fromJson(fieldValue, refVal_setLocation); ok &= ModelBase::fromJson(fieldValue, refVal_setLocation);
setLocation(refVal_setLocation); setLocation(refVal_setLocation);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("photo_url")))) 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; utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl); setPhotoUrl(refVal_setPhotoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("banner_url")))) 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; utility::string_t refVal_setBannerUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setBannerUrl);
setBannerUrl(refVal_setBannerUrl); setBannerUrl(refVal_setBannerUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_online")))) 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; utility::datetime refVal_setLastOnline;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline); ok &= ModelBase::fromJson(fieldValue, refVal_setLastOnline);
setLastOnline(refVal_setLastOnline); setLastOnline(refVal_setLastOnline);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("biography")))) 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; utility::string_t refVal_setBiography;
ok &= ModelBase::fromJson(fieldValue, refVal_setBiography); ok &= ModelBase::fromJson(fieldValue, refVal_setBiography);
setBiography(refVal_setBiography); setBiography(refVal_setBiography);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("view_count")))) 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; int32_t refVal_setViewCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount); ok &= ModelBase::fromJson(fieldValue, refVal_setViewCount);
setViewCount(refVal_setViewCount); setViewCount(refVal_setViewCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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 void Profile::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{ {
utility::string_t namePrefix = prefix; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -379,71 +362,88 @@ void Profile::toMultipart(std::shared_ptr<MultipartFormData> multipart, const ut
} }
if (m_UuidIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{ {
utility::string_t refVal_setUuid; 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); setUuid(refVal_setUuid);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
{ {
utility::string_t refVal_setDisplayName; 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); setDisplayName(refVal_setDisplayName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("verified")))) if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{ {
bool refVal_setVerified; 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); setVerified(refVal_setVerified);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("level")))) if (multipart->hasContent(utility::conversions::to_string_t(U("level"))))
{ {
int32_t refVal_setLevel; 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); setLevel(refVal_setLevel);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("experience")))) if (multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
{ {
double refVal_setExperience; 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); setExperience(refVal_setExperience);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("public_birthday")))) if (multipart->hasContent(utility::conversions::to_string_t(U("public_birthday"))))
{ {
bool refVal_setPublicBirthday; 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); setPublicBirthday(refVal_setPublicBirthday);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("birthday")))) if (multipart->hasContent(utility::conversions::to_string_t(U("birthday"))))
{ {
utility::datetime refVal_setBirthday; 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); setBirthday(refVal_setBirthday);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("points")))) if (multipart->hasContent(utility::conversions::to_string_t(U("points"))))
{ {
double refVal_setPoints; 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); setPoints(refVal_setPoints);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("location")))) if (multipart->hasContent(utility::conversions::to_string_t(U("location"))))
{ {
utility::string_t refVal_setLocation; 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); setLocation(refVal_setLocation);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{ {
utility::string_t refVal_setPhotoUrl; 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); setPhotoUrl(refVal_setPhotoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("banner_url"))))
{ {
utility::string_t refVal_setBannerUrl; 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); setBannerUrl(refVal_setBannerUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
{ {
utility::datetime refVal_setLastOnline; 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); setLastOnline(refVal_setLastOnline);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("biography")))) if (multipart->hasContent(utility::conversions::to_string_t(U("biography"))))
{ {
utility::string_t refVal_setBiography; 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); setBiography(refVal_setBiography);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("view_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("view_count"))))
{ {
int32_t refVal_setViewCount; 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); setViewCount(refVal_setViewCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Profile::getId() const utility::string_t Profile::getId() const
{ {
return m_Id; return m_Id;
} }
void Profile::setId(const utility::string_t &value) void Profile::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -594,7 +612,6 @@ utility::string_t Profile::getUuid() const
return m_Uuid; return m_Uuid;
} }
void Profile::setUuid(const utility::string_t &value) void Profile::setUuid(const utility::string_t &value)
{ {
m_Uuid = value; m_Uuid = value;
@ -615,7 +632,6 @@ utility::string_t Profile::getName() const
return m_Name; return m_Name;
} }
void Profile::setName(const utility::string_t &value) void Profile::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -636,7 +652,6 @@ utility::string_t Profile::getDisplayName() const
return m_Display_name; return m_Display_name;
} }
void Profile::setDisplayName(const utility::string_t &value) void Profile::setDisplayName(const utility::string_t &value)
{ {
m_Display_name = value; m_Display_name = value;
@ -737,7 +752,6 @@ utility::datetime Profile::getBirthday() const
return m_Birthday; return m_Birthday;
} }
void Profile::setBirthday(const utility::datetime &value) void Profile::setBirthday(const utility::datetime &value)
{ {
m_Birthday = value; m_Birthday = value;
@ -778,7 +792,6 @@ utility::string_t Profile::getLocation() const
return m_Location; return m_Location;
} }
void Profile::setLocation(const utility::string_t &value) void Profile::setLocation(const utility::string_t &value)
{ {
m_Location = value; m_Location = value;
@ -799,7 +812,6 @@ utility::string_t Profile::getPhotoUrl() const
return m_Photo_url; return m_Photo_url;
} }
void Profile::setPhotoUrl(const utility::string_t &value) void Profile::setPhotoUrl(const utility::string_t &value)
{ {
m_Photo_url = value; m_Photo_url = value;
@ -820,7 +832,6 @@ utility::string_t Profile::getBannerUrl() const
return m_Banner_url; return m_Banner_url;
} }
void Profile::setBannerUrl(const utility::string_t &value) void Profile::setBannerUrl(const utility::string_t &value)
{ {
m_Banner_url = value; m_Banner_url = value;
@ -841,7 +852,6 @@ utility::datetime Profile::getLastOnline() const
return m_Last_online; return m_Last_online;
} }
void Profile::setLastOnline(const utility::datetime &value) void Profile::setLastOnline(const utility::datetime &value)
{ {
m_Last_online = value; m_Last_online = value;
@ -862,7 +872,6 @@ utility::string_t Profile::getBiography() const
return m_Biography; return m_Biography;
} }
void Profile::setBiography(const utility::string_t &value) void Profile::setBiography(const utility::string_t &value)
{ {
m_Biography = value; m_Biography = value;
@ -903,7 +912,6 @@ utility::datetime Profile::getCreated() const
return m_Created; return m_Created;
} }
void Profile::setCreated(const utility::datetime &value) void Profile::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -924,7 +932,6 @@ utility::datetime Profile::getUpdated() const
return m_Updated; return m_Updated;
} }
void Profile::setUpdated(const utility::datetime &value) void Profile::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -943,5 +950,3 @@ void Profile::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ProfileGame.h" #include "tribufu++/model/ProfileGame.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
ProfileGame::ProfileGame() ProfileGame::ProfileGame()
{ {
@ -87,12 +87,14 @@ web::json::value ProfileGame::toJson() const
if (m_Unlocked_achievementsIsSet) 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) 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) if (m_StatsIsSet)
{ {
@ -124,7 +126,6 @@ bool ProfileGame::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url")))) 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; utility::string_t refVal_setCapsuleImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
setCapsuleImageUrl(refVal_setCapsuleImageUrl); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("library_image_url")))) 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; utility::string_t refVal_setLibraryImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
setLibraryImageUrl(refVal_setLibraryImageUrl); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("slug")))) 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; utility::string_t refVal_setSlug;
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug); ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
setSlug(refVal_setSlug); setSlug(refVal_setSlug);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("time_used")))) 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; double refVal_setTimeUsed;
ok &= ModelBase::fromJson(fieldValue, refVal_setTimeUsed); ok &= ModelBase::fromJson(fieldValue, refVal_setTimeUsed);
setTimeUsed(refVal_setTimeUsed); setTimeUsed(refVal_setTimeUsed);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("unlocked_achievements")))) 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()) if (!fieldValue.is_null())
{ {
int32_t refVal_setUnlockedAchievements; int32_t refVal_setUnlockedAchievements;
ok &= ModelBase::fromJson(fieldValue, refVal_setUnlockedAchievements); ok &= ModelBase::fromJson(fieldValue, refVal_setUnlockedAchievements);
setUnlockedAchievements(refVal_setUnlockedAchievements); setUnlockedAchievements(refVal_setUnlockedAchievements);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("total_achievements")))) 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; int32_t refVal_setTotalAchievements;
ok &= ModelBase::fromJson(fieldValue, refVal_setTotalAchievements); ok &= ModelBase::fromJson(fieldValue, refVal_setTotalAchievements);
setTotalAchievements(refVal_setTotalAchievements); setTotalAchievements(refVal_setTotalAchievements);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("stats")))) 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; std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromJson(fieldValue, refVal_setStats); ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
setStats(refVal_setStats); setStats(refVal_setStats);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("acquired")))) 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; utility::datetime refVal_setAcquired;
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired); ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
setAcquired(refVal_setAcquired); setAcquired(refVal_setAcquired);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("last_used")))) 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; utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed); ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
setLastUsed(refVal_setLastUsed); setLastUsed(refVal_setLastUsed);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -253,43 +247,54 @@ void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, cons
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
{ {
utility::string_t refVal_setCapsuleImageUrl; 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); setCapsuleImageUrl(refVal_setCapsuleImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
{ {
utility::string_t refVal_setLibraryImageUrl; 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); setLibraryImageUrl(refVal_setLibraryImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("slug")))) if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
{ {
utility::string_t refVal_setSlug; 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); setSlug(refVal_setSlug);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("time_used")))) if (multipart->hasContent(utility::conversions::to_string_t(U("time_used"))))
{ {
double refVal_setTimeUsed; 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); setTimeUsed(refVal_setTimeUsed);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("unlocked_achievements")))) if (multipart->hasContent(utility::conversions::to_string_t(U("unlocked_achievements"))))
{ {
int32_t refVal_setUnlockedAchievements; 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); setUnlockedAchievements(refVal_setUnlockedAchievements);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("total_achievements")))) if (multipart->hasContent(utility::conversions::to_string_t(U("total_achievements"))))
{ {
int32_t refVal_setTotalAchievements; 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); setTotalAchievements(refVal_setTotalAchievements);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("stats")))) if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
{ {
std::shared_ptr<AnyType> refVal_setStats; 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); setStats(refVal_setStats);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired")))) if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
{ {
utility::datetime refVal_setAcquired; 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); setAcquired(refVal_setAcquired);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used")))) if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
{ {
utility::datetime refVal_setLastUsed; 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); setLastUsed(refVal_setLastUsed);
} }
return ok; return ok;
} }
utility::string_t ProfileGame::getId() const utility::string_t ProfileGame::getId() const
{ {
return m_Id; return m_Id;
} }
void ProfileGame::setId(const utility::string_t &value) void ProfileGame::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -398,7 +417,6 @@ utility::string_t ProfileGame::getName() const
return m_Name; return m_Name;
} }
void ProfileGame::setName(const utility::string_t &value) void ProfileGame::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -419,7 +437,6 @@ utility::string_t ProfileGame::getCapsuleImageUrl() const
return m_Capsule_image_url; return m_Capsule_image_url;
} }
void ProfileGame::setCapsuleImageUrl(const utility::string_t &value) void ProfileGame::setCapsuleImageUrl(const utility::string_t &value)
{ {
m_Capsule_image_url = value; m_Capsule_image_url = value;
@ -440,7 +457,6 @@ utility::string_t ProfileGame::getLibraryImageUrl() const
return m_Library_image_url; return m_Library_image_url;
} }
void ProfileGame::setLibraryImageUrl(const utility::string_t &value) void ProfileGame::setLibraryImageUrl(const utility::string_t &value)
{ {
m_Library_image_url = value; m_Library_image_url = value;
@ -461,7 +477,6 @@ utility::string_t ProfileGame::getSlug() const
return m_Slug; return m_Slug;
} }
void ProfileGame::setSlug(const utility::string_t &value) void ProfileGame::setSlug(const utility::string_t &value)
{ {
m_Slug = value; m_Slug = value;
@ -542,7 +557,6 @@ std::shared_ptr<AnyType> ProfileGame::getStats() const
return m_Stats; return m_Stats;
} }
void ProfileGame::setStats(const std::shared_ptr<AnyType> &value) void ProfileGame::setStats(const std::shared_ptr<AnyType> &value)
{ {
m_Stats = value; m_Stats = value;
@ -563,7 +577,6 @@ utility::datetime ProfileGame::getAcquired() const
return m_Acquired; return m_Acquired;
} }
void ProfileGame::setAcquired(const utility::datetime &value) void ProfileGame::setAcquired(const utility::datetime &value)
{ {
m_Acquired = value; m_Acquired = value;
@ -584,7 +597,6 @@ utility::datetime ProfileGame::getLastUsed() const
return m_Last_used; return m_Last_used;
} }
void ProfileGame::setLastUsed(const utility::datetime &value) void ProfileGame::setLastUsed(const utility::datetime &value)
{ {
m_Last_used = value; m_Last_used = value;
@ -603,5 +615,3 @@ void ProfileGame::unsetLast_used()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ProfileGroup.h" #include "tribufu++/model/ProfileGroup.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
ProfileGroup::ProfileGroup() ProfileGroup::ProfileGroup()
{ {
@ -117,7 +117,6 @@ bool ProfileGroup::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("uuid")))) 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; utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid); setUuid(refVal_setUuid);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("tag")))) 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; utility::string_t refVal_setTag;
ok &= ModelBase::fromJson(fieldValue, refVal_setTag); ok &= ModelBase::fromJson(fieldValue, refVal_setTag);
setTag(refVal_setTag); setTag(refVal_setTag);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("privacy")))) 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; int32_t refVal_setPrivacy;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy); ok &= ModelBase::fromJson(fieldValue, refVal_setPrivacy);
setPrivacy(refVal_setPrivacy); setPrivacy(refVal_setPrivacy);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("verified")))) 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; bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, refVal_setVerified); ok &= ModelBase::fromJson(fieldValue, refVal_setVerified);
setVerified(refVal_setVerified); setVerified(refVal_setVerified);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("photo_url")))) 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; utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl); setPhotoUrl(refVal_setPhotoUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("member_count")))) 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; int32_t refVal_setMemberCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount); ok &= ModelBase::fromJson(fieldValue, refVal_setMemberCount);
setMemberCount(refVal_setMemberCount); setMemberCount(refVal_setMemberCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("rank")))) 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; std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromJson(fieldValue, refVal_setRank); ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
setRank(refVal_setRank); setRank(refVal_setRank);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("since")))) 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; utility::datetime refVal_setSince;
ok &= ModelBase::fromJson(fieldValue, refVal_setSince); ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
setSince(refVal_setSince); setSince(refVal_setSince);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -235,39 +227,48 @@ void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
} }
if (m_UuidIsSet) 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) 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) 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) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{ {
utility::string_t refVal_setUuid; 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); setUuid(refVal_setUuid);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("tag")))) if (multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
{ {
utility::string_t refVal_setTag; 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); setTag(refVal_setTag);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("privacy")))) if (multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
{ {
int32_t refVal_setPrivacy; 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); setPrivacy(refVal_setPrivacy);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("verified")))) if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{ {
bool refVal_setVerified; 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); setVerified(refVal_setVerified);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{ {
utility::string_t refVal_setPhotoUrl; 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); setPhotoUrl(refVal_setPhotoUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("member_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
{ {
int32_t refVal_setMemberCount; 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); setMemberCount(refVal_setMemberCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("rank")))) if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
{ {
std::shared_ptr<GroupRank> refVal_setRank; 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); setRank(refVal_setRank);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("since")))) if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
{ {
utility::datetime refVal_setSince; 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); setSince(refVal_setSince);
} }
return ok; return ok;
} }
utility::string_t ProfileGroup::getId() const utility::string_t ProfileGroup::getId() const
{ {
return m_Id; return m_Id;
} }
void ProfileGroup::setId(const utility::string_t &value) void ProfileGroup::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -370,7 +380,6 @@ utility::string_t ProfileGroup::getUuid() const
return m_Uuid; return m_Uuid;
} }
void ProfileGroup::setUuid(const utility::string_t &value) void ProfileGroup::setUuid(const utility::string_t &value)
{ {
m_Uuid = value; m_Uuid = value;
@ -391,7 +400,6 @@ utility::string_t ProfileGroup::getName() const
return m_Name; return m_Name;
} }
void ProfileGroup::setName(const utility::string_t &value) void ProfileGroup::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -412,7 +420,6 @@ utility::string_t ProfileGroup::getTag() const
return m_Tag; return m_Tag;
} }
void ProfileGroup::setTag(const utility::string_t &value) void ProfileGroup::setTag(const utility::string_t &value)
{ {
m_Tag = value; m_Tag = value;
@ -473,7 +480,6 @@ utility::string_t ProfileGroup::getPhotoUrl() const
return m_Photo_url; return m_Photo_url;
} }
void ProfileGroup::setPhotoUrl(const utility::string_t &value) void ProfileGroup::setPhotoUrl(const utility::string_t &value)
{ {
m_Photo_url = value; m_Photo_url = value;
@ -514,7 +520,6 @@ std::shared_ptr<GroupRank> ProfileGroup::getRank() const
return m_Rank; return m_Rank;
} }
void ProfileGroup::setRank(const std::shared_ptr<GroupRank> &value) void ProfileGroup::setRank(const std::shared_ptr<GroupRank> &value)
{ {
m_Rank = value; m_Rank = value;
@ -535,7 +540,6 @@ utility::datetime ProfileGroup::getSince() const
return m_Since; return m_Since;
} }
void ProfileGroup::setSince(const utility::datetime &value) void ProfileGroup::setSince(const utility::datetime &value)
{ {
m_Since = value; m_Since = value;
@ -554,5 +558,3 @@ void ProfileGroup::unsetSince()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/RefreshRequest.h" #include "tribufu++/model/RefreshRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
RefreshRequest::RefreshRequest() RefreshRequest::RefreshRequest()
{ {
@ -55,30 +55,34 @@ bool RefreshRequest::fromJson(const web::json::value& val)
utility::string_t refVal_setRefreshToken; utility::string_t refVal_setRefreshToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken); ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken); setRefreshToken(refVal_setRefreshToken);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_Refresh_tokenIsSet) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
{ {
utility::string_t refVal_setRefreshToken; 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); setRefreshToken(refVal_setRefreshToken);
} }
return ok; return ok;
} }
utility::string_t RefreshRequest::getRefreshToken() const utility::string_t RefreshRequest::getRefreshToken() const
{ {
return m_Refresh_token; return m_Refresh_token;
} }
void RefreshRequest::setRefreshToken(const utility::string_t &value) void RefreshRequest::setRefreshToken(const utility::string_t &value)
{ {
m_Refresh_token = value; m_Refresh_token = value;
@ -117,5 +121,3 @@ void RefreshRequest::unsetRefresh_token()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/RegisterRequest.h" #include "tribufu++/model/RegisterRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
RegisterRequest::RegisterRequest() RegisterRequest::RegisterRequest()
{ {
@ -76,7 +76,6 @@ bool RegisterRequest::fromJson(const web::json::value& val)
utility::string_t refVal_setUuid; utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid); setUuid(refVal_setUuid);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("email")))) 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; utility::string_t refVal_setEmail;
ok &= ModelBase::fromJson(fieldValue, refVal_setEmail); ok &= ModelBase::fromJson(fieldValue, refVal_setEmail);
setEmail(refVal_setEmail); setEmail(refVal_setEmail);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("password")))) 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; utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword); ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword); setPassword(refVal_setPassword);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_UuidIsSet) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{ {
utility::string_t refVal_setUuid; 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); setUuid(refVal_setUuid);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("email")))) if (multipart->hasContent(utility::conversions::to_string_t(U("email"))))
{ {
utility::string_t refVal_setEmail; 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); setEmail(refVal_setEmail);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("password")))) if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{ {
utility::string_t refVal_setPassword; 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); setPassword(refVal_setPassword);
} }
return ok; return ok;
} }
utility::string_t RegisterRequest::getUuid() const utility::string_t RegisterRequest::getUuid() const
{ {
return m_Uuid; return m_Uuid;
} }
void RegisterRequest::setUuid(const utility::string_t &value) void RegisterRequest::setUuid(const utility::string_t &value)
{ {
m_Uuid = value; m_Uuid = value;
@ -203,7 +209,6 @@ utility::string_t RegisterRequest::getName() const
return m_Name; return m_Name;
} }
void RegisterRequest::setName(const utility::string_t &value) void RegisterRequest::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -224,7 +229,6 @@ utility::string_t RegisterRequest::getEmail() const
return m_Email; return m_Email;
} }
void RegisterRequest::setEmail(const utility::string_t &value) void RegisterRequest::setEmail(const utility::string_t &value)
{ {
m_Email = value; m_Email = value;
@ -245,7 +249,6 @@ utility::string_t RegisterRequest::getPassword() const
return m_Password; return m_Password;
} }
void RegisterRequest::setPassword(const utility::string_t &value) void RegisterRequest::setPassword(const utility::string_t &value)
{ {
m_Password = value; m_Password = value;
@ -264,5 +267,3 @@ void RegisterRequest::unsetPassword()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ResponseType.h" #include "tribufu++/model/ResponseType.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -70,7 +70,8 @@ bool ResponseType::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -114,5 +115,3 @@ void ResponseType::setValue(ResponseType::eResponseType const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/RevokeRequest.h" #include "tribufu++/model/RevokeRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
RevokeRequest::RevokeRequest() RevokeRequest::RevokeRequest()
{ {
@ -61,7 +61,6 @@ bool RevokeRequest::fromJson(const web::json::value& val)
utility::string_t refVal_setToken; utility::string_t refVal_setToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setToken); ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
setToken(refVal_setToken); setToken(refVal_setToken);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint")))) 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; std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint); ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint); setTokenTypeHint(refVal_setTokenTypeHint);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_TokenIsSet) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("token"))))
{ {
utility::string_t refVal_setToken; 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); setToken(refVal_setToken);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint")))) if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
{ {
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint; 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); setTokenTypeHint(refVal_setTokenTypeHint);
} }
return ok; return ok;
} }
utility::string_t RevokeRequest::getToken() const utility::string_t RevokeRequest::getToken() const
{ {
return m_Token; return m_Token;
} }
void RevokeRequest::setToken(const utility::string_t &value) void RevokeRequest::setToken(const utility::string_t &value)
{ {
m_Token = value; m_Token = value;
@ -146,7 +150,6 @@ std::shared_ptr<TokenHintType> RevokeRequest::getTokenTypeHint() const
return m_Token_type_hint; return m_Token_type_hint;
} }
void RevokeRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value) void RevokeRequest::setTokenTypeHint(const std::shared_ptr<TokenHintType> &value)
{ {
m_Token_type_hint = value; m_Token_type_hint = value;
@ -165,5 +168,3 @@ void RevokeRequest::unsetToken_type_hint()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/SearchRequest.h" #include "tribufu++/model/SearchRequest.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
SearchRequest::SearchRequest() SearchRequest::SearchRequest()
{ {
@ -75,7 +75,6 @@ bool SearchRequest::fromJson(const web::json::value& val)
std::shared_ptr<SearchType> refVal_setType; std::shared_ptr<SearchType> refVal_setType;
ok &= ModelBase::fromJson(fieldValue, refVal_setType); ok &= ModelBase::fromJson(fieldValue, refVal_setType);
setType(refVal_setType); setType(refVal_setType);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("query")))) 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; utility::string_t refVal_setQuery;
ok &= ModelBase::fromJson(fieldValue, refVal_setQuery); ok &= ModelBase::fromJson(fieldValue, refVal_setQuery);
setQuery(refVal_setQuery); setQuery(refVal_setQuery);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("page")))) 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; int32_t refVal_setPage;
ok &= ModelBase::fromJson(fieldValue, refVal_setPage); ok &= ModelBase::fromJson(fieldValue, refVal_setPage);
setPage(refVal_setPage); setPage(refVal_setPage);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("game_id")))) 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; utility::string_t refVal_setGameId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId); ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
setGameId(refVal_setGameId); setGameId(refVal_setGameId);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_TypeIsSet) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("type"))))
{ {
std::shared_ptr<SearchType> refVal_setType; 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); setType(refVal_setType);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("query")))) if (multipart->hasContent(utility::conversions::to_string_t(U("query"))))
{ {
utility::string_t refVal_setQuery; 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); setQuery(refVal_setQuery);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("page")))) if (multipart->hasContent(utility::conversions::to_string_t(U("page"))))
{ {
int32_t refVal_setPage; 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); setPage(refVal_setPage);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id")))) if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
{ {
utility::string_t refVal_setGameId; 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); setGameId(refVal_setGameId);
} }
return ok; return ok;
} }
std::shared_ptr<SearchType> SearchRequest::getType() const std::shared_ptr<SearchType> SearchRequest::getType() const
{ {
return m_Type; return m_Type;
} }
void SearchRequest::setType(const std::shared_ptr<SearchType> &value) void SearchRequest::setType(const std::shared_ptr<SearchType> &value)
{ {
m_Type = value; m_Type = value;
@ -202,7 +207,6 @@ utility::string_t SearchRequest::getQuery() const
return m_Query; return m_Query;
} }
void SearchRequest::setQuery(const utility::string_t &value) void SearchRequest::setQuery(const utility::string_t &value)
{ {
m_Query = value; m_Query = value;
@ -243,7 +247,6 @@ utility::string_t SearchRequest::getGameId() const
return m_Game_id; return m_Game_id;
} }
void SearchRequest::setGameId(const utility::string_t &value) void SearchRequest::setGameId(const utility::string_t &value)
{ {
m_Game_id = value; m_Game_id = value;
@ -262,5 +265,3 @@ void SearchRequest::unsetGame_id()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/SearchType.h" #include "tribufu++/model/SearchType.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -78,7 +78,8 @@ bool SearchType::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -122,5 +123,3 @@ void SearchType::setValue(SearchType::eSearchType const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ServerMetrics.h" #include "tribufu++/model/ServerMetrics.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
ServerMetrics::ServerMetrics() ServerMetrics::ServerMetrics()
{ {
@ -69,7 +69,6 @@ bool ServerMetrics::fromJson(const web::json::value& val)
int32_t refVal_setServerCount; int32_t refVal_setServerCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount); ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
setServerCount(refVal_setServerCount); setServerCount(refVal_setServerCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("package_count")))) 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; int32_t refVal_setPackageCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setPackageCount); ok &= ModelBase::fromJson(fieldValue, refVal_setPackageCount);
setPackageCount(refVal_setPackageCount); setPackageCount(refVal_setPackageCount);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("country_count")))) 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; int32_t refVal_setCountryCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setCountryCount); ok &= ModelBase::fromJson(fieldValue, refVal_setCountryCount);
setCountryCount(refVal_setCountryCount); setCountryCount(refVal_setCountryCount);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
if (m_Server_countIsSet) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("server_count"))))
{ {
int32_t refVal_setServerCount; 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); setServerCount(refVal_setServerCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("package_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("package_count"))))
{ {
int32_t refVal_setPackageCount; 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); setPackageCount(refVal_setPackageCount);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("country_count")))) if (multipart->hasContent(utility::conversions::to_string_t(U("country_count"))))
{ {
int32_t refVal_setCountryCount; 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); setCountryCount(refVal_setCountryCount);
} }
return ok; return ok;
} }
int32_t ServerMetrics::getServerCount() const int32_t ServerMetrics::getServerCount() const
{ {
return m_Server_count; return m_Server_count;
@ -212,5 +219,3 @@ void ServerMetrics::unsetCountry_count()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/ServerStatus.h" #include "tribufu++/model/ServerStatus.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -74,7 +74,8 @@ bool ServerStatus::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -118,5 +119,3 @@ void ServerStatus::setValue(ServerStatus::eServerStatus const value)
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/Subscription.h" #include "tribufu++/model/Subscription.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
Subscription::Subscription() Subscription::Subscription()
{ {
@ -96,7 +96,6 @@ bool Subscription::fromJson(const web::json::value& val)
utility::string_t refVal_setId; utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId); ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId); setId(refVal_setId);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("name")))) 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; utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName); ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName); setName(refVal_setName);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("description")))) 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; utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription); setDescription(refVal_setDescription);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("image_url")))) 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; utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl); ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
setImageUrl(refVal_setImageUrl); setImageUrl(refVal_setImageUrl);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("prices")))) 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; std::map<utility::string_t, double> refVal_setPrices;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrices); ok &= ModelBase::fromJson(fieldValue, refVal_setPrices);
setPrices(refVal_setPrices); setPrices(refVal_setPrices);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("created")))) 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; utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, refVal_setCreated); ok &= ModelBase::fromJson(fieldValue, refVal_setCreated);
setCreated(refVal_setCreated); setCreated(refVal_setCreated);
} }
} }
if (val.has_field(utility::conversions::to_string_t(U("updated")))) 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; utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated); ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated); setUpdated(refVal_setUpdated);
} }
} }
return ok; 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; 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(".")); namePrefix += utility::conversions::to_string_t(U("."));
} }
@ -181,27 +176,33 @@ void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
} }
if (m_NameIsSet) 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) 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) 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) 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) 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) 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; bool ok = true;
utility::string_t namePrefix = prefix; 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(".")); 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")))) if (multipart->hasContent(utility::conversions::to_string_t(U("id"))))
{ {
utility::string_t refVal_setId; 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); setId(refVal_setId);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("name")))) if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{ {
utility::string_t refVal_setName; 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); setName(refVal_setName);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("description")))) if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{ {
utility::string_t refVal_setDescription; 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); setDescription(refVal_setDescription);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url")))) if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
{ {
utility::string_t refVal_setImageUrl; 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); setImageUrl(refVal_setImageUrl);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("prices")))) if (multipart->hasContent(utility::conversions::to_string_t(U("prices"))))
{ {
std::map<utility::string_t, double> refVal_setPrices; 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); setPrices(refVal_setPrices);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("created")))) if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{ {
utility::datetime refVal_setCreated; 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); setCreated(refVal_setCreated);
} }
if (multipart->hasContent(utility::conversions::to_string_t(U("updated")))) if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{ {
utility::datetime refVal_setUpdated; 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); setUpdated(refVal_setUpdated);
} }
return ok; return ok;
} }
utility::string_t Subscription::getId() const utility::string_t Subscription::getId() const
{ {
return m_Id; return m_Id;
} }
void Subscription::setId(const utility::string_t &value) void Subscription::setId(const utility::string_t &value)
{ {
m_Id = value; m_Id = value;
@ -286,7 +293,6 @@ utility::string_t Subscription::getName() const
return m_Name; return m_Name;
} }
void Subscription::setName(const utility::string_t &value) void Subscription::setName(const utility::string_t &value)
{ {
m_Name = value; m_Name = value;
@ -307,7 +313,6 @@ utility::string_t Subscription::getDescription() const
return m_Description; return m_Description;
} }
void Subscription::setDescription(const utility::string_t &value) void Subscription::setDescription(const utility::string_t &value)
{ {
m_Description = value; m_Description = value;
@ -328,7 +333,6 @@ utility::string_t Subscription::getImageUrl() const
return m_Image_url; return m_Image_url;
} }
void Subscription::setImageUrl(const utility::string_t &value) void Subscription::setImageUrl(const utility::string_t &value)
{ {
m_Image_url = value; m_Image_url = value;
@ -369,7 +373,6 @@ utility::datetime Subscription::getCreated() const
return m_Created; return m_Created;
} }
void Subscription::setCreated(const utility::datetime &value) void Subscription::setCreated(const utility::datetime &value)
{ {
m_Created = value; m_Created = value;
@ -390,7 +393,6 @@ utility::datetime Subscription::getUpdated() const
return m_Updated; return m_Updated;
} }
void Subscription::setUpdated(const utility::datetime &value) void Subscription::setUpdated(const utility::datetime &value)
{ {
m_Updated = value; m_Updated = value;
@ -409,5 +411,3 @@ void Subscription::unsetUpdated()
} }
} }

View File

@ -10,12 +10,12 @@
* Do not edit the class manually. * Do not edit the class manually.
*/ */
#include "tribufu++/model/TokenHintType.h" #include "tribufu++/model/TokenHintType.h"
namespace tribufu { namespace tribufu
namespace models { {
namespace models
{
namespace namespace
{ {
@ -70,7 +70,8 @@ bool TokenHintType::fromJson(const web::json::value& val)
return true; 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; utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.')) 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