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,17 +19,19 @@
#ifndef TRIBUFU_MODELS_AnyType_H_
#define TRIBUFU_MODELS_AnyType_H_
#include "tribufu++/Object.h"
#include <cpprest/details/basic_types.h>
#include <cpprest/json.h>
namespace tribufu {
namespace models {
namespace tribufu
{
namespace models
{
class AnyType : public Object {
public:
class AnyType : public Object
{
public:
AnyType();
virtual ~AnyType();
@ -45,11 +47,11 @@ public:
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
private:
private:
web::json::value m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_AnyType_H_ */

View File

@ -19,38 +19,39 @@
#ifndef TRIBUFU_API_ApiClient_H_
#define TRIBUFU_API_ApiClient_H_
#include "tribufu++/ApiConfiguration.h"
#include "tribufu++/ApiException.h"
#include "tribufu++/IHttpBody.h"
#include "tribufu++/HttpContent.h"
#include "tribufu++/IHttpBody.h"
#if defined (_WIN32) || defined (_WIN64)
#if defined(_WIN32) || defined(_WIN64)
#undef U
#endif
#include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h>
#include <functional>
#include <memory>
#include <vector>
#include <functional>
namespace tribufu {
namespace api {
using namespace tribufu::models;
class ApiClient
namespace tribufu
{
public:
ApiClient( std::shared_ptr<const ApiConfiguration> configuration = nullptr );
namespace api
{
using namespace tribufu::models;
class ApiClient
{
public:
ApiClient(std::shared_ptr<const ApiConfiguration> configuration = nullptr);
virtual ~ApiClient();
typedef std::function<void(web::http::status_code, const web::http::http_headers&)> ResponseHandlerType;
typedef std::function<void(web::http::status_code, const web::http::http_headers &)> ResponseHandlerType;
const ResponseHandlerType& getResponseHandler() const;
void setResponseHandler(const ResponseHandlerType& responseHandler);
const ResponseHandlerType &getResponseHandler() const;
void setResponseHandler(const ResponseHandlerType &responseHandler);
std::shared_ptr<const ApiConfiguration> getConfiguration() const;
void setConfiguration(std::shared_ptr<const ApiConfiguration> configuration);
@ -62,50 +63,43 @@ public:
static utility::string_t parameterToString(double value);
static utility::string_t parameterToString(const utility::datetime &value);
static utility::string_t parameterToString(bool value);
template<class T>
static utility::string_t parameterToString(const std::vector<T>& value);
template<class T>
static utility::string_t parameterToString(const std::shared_ptr<T>& value);
template <class T> static utility::string_t parameterToString(const std::vector<T> &value);
template <class T> static utility::string_t parameterToString(const std::shared_ptr<T> &value);
pplx::task<web::http::http_response> callApi(
const utility::string_t& path,
const utility::string_t& method,
const std::map<utility::string_t, utility::string_t>& queryParams,
const utility::string_t &path, const utility::string_t &method,
const std::map<utility::string_t, utility::string_t> &queryParams,
const std::shared_ptr<IHttpBody> postBody,
const std::map<utility::string_t, utility::string_t>& headerParams,
const std::map<utility::string_t, utility::string_t>& formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>>& fileParams,
const utility::string_t& contentType
) const;
protected:
const std::map<utility::string_t, utility::string_t> &headerParams,
const std::map<utility::string_t, utility::string_t> &formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams,
const utility::string_t &contentType) const;
protected:
ResponseHandlerType m_ResponseHandler;
std::shared_ptr<const ApiConfiguration> m_Configuration;
};
};
template<class T>
utility::string_t ApiClient::parameterToString(const std::vector<T>& value)
{
template <class T> utility::string_t ApiClient::parameterToString(const std::vector<T> &value)
{
utility::stringstream_t ss;
for( size_t i = 0; i < value.size(); i++)
for (size_t i = 0; i < value.size(); i++)
{
if( i > 0) ss << utility::conversions::to_string_t(", ");
if (i > 0)
ss << utility::conversions::to_string_t(", ");
ss << ApiClient::parameterToString(value[i]);
}
return ss.str();
}
}
template<class T>
utility::string_t ApiClient::parameterToString(const std::shared_ptr<T>& value)
{
template <class T> utility::string_t ApiClient::parameterToString(const std::shared_ptr<T> &value)
{
return parameterToString(*value.get());
}
}
}
}
}
#endif /* TRIBUFU_API_ApiClient_H_ */

View File

@ -19,45 +19,45 @@
#ifndef TRIBUFU_API_ApiConfiguration_H_
#define TRIBUFU_API_ApiConfiguration_H_
#include <cpprest/details/basic_types.h>
#include <cpprest/http_client.h>
#include <map>
namespace tribufu {
namespace api {
class ApiConfiguration
namespace tribufu
{
public:
namespace api
{
class ApiConfiguration
{
public:
ApiConfiguration();
virtual ~ApiConfiguration();
const web::http::client::http_client_config& getHttpConfig() const;
void setHttpConfig( web::http::client::http_client_config& value );
const web::http::client::http_client_config &getHttpConfig() const;
void setHttpConfig(web::http::client::http_client_config &value);
utility::string_t getBaseUrl() const;
void setBaseUrl( const utility::string_t value );
void setBaseUrl(const utility::string_t value);
utility::string_t getUserAgent() const;
void setUserAgent( const utility::string_t value );
void setUserAgent(const utility::string_t value);
std::map<utility::string_t, utility::string_t>& getDefaultHeaders();
const std::map<utility::string_t, utility::string_t>& getDefaultHeaders() const;
std::map<utility::string_t, utility::string_t> &getDefaultHeaders();
const std::map<utility::string_t, utility::string_t> &getDefaultHeaders() const;
utility::string_t getApiKey( const utility::string_t& prefix) const;
void setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey );
utility::string_t getApiKey(const utility::string_t &prefix) const;
void setApiKey(const utility::string_t &prefix, const utility::string_t &apiKey);
protected:
protected:
utility::string_t m_BaseUrl;
std::map<utility::string_t, utility::string_t> m_DefaultHeaders;
std::map<utility::string_t, utility::string_t> m_ApiKeys;
web::http::client::http_client_config m_HttpConfig;
utility::string_t m_UserAgent;
};
};
}
}
}
#endif /* TRIBUFU_API_ApiConfiguration_H_ */

View File

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

View File

@ -19,48 +19,48 @@
#ifndef TRIBUFU_MODELS_HttpContent_H_
#define TRIBUFU_MODELS_HttpContent_H_
#include <cpprest/details/basic_types.h>
#include <memory>
namespace tribufu {
namespace models {
class HttpContent
namespace tribufu
{
public:
namespace models
{
class HttpContent
{
public:
HttpContent();
virtual ~HttpContent();
virtual utility::string_t getContentDisposition() const;
virtual void setContentDisposition( const utility::string_t& value );
virtual void setContentDisposition(const utility::string_t &value);
virtual utility::string_t getName() const;
virtual void setName( const utility::string_t& value );
virtual void setName(const utility::string_t &value);
virtual utility::string_t getFileName() const;
virtual void setFileName( const utility::string_t& value );
virtual void setFileName(const utility::string_t &value);
virtual utility::string_t getContentType() const;
virtual void setContentType( const utility::string_t& value );
virtual void setContentType(const utility::string_t &value);
virtual std::shared_ptr<std::istream> getData() const;
virtual void setData( std::shared_ptr<std::istream> value );
virtual void setData(std::shared_ptr<std::istream> value);
virtual void writeTo( std::ostream& stream );
virtual void writeTo(std::ostream &stream);
protected:
protected:
// NOTE: no utility::string_t here because those strings can only contain ascii
utility::string_t m_ContentDisposition;
utility::string_t m_Name;
utility::string_t m_FileName;
utility::string_t m_ContentType;
std::shared_ptr<std::istream> m_Data;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_HttpContent_H_ */

View File

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

View File

@ -19,28 +19,28 @@
#ifndef TRIBUFU_MODELS_JsonBody_H_
#define TRIBUFU_MODELS_JsonBody_H_
#include "tribufu++/IHttpBody.h"
#include <cpprest/json.h>
namespace tribufu {
namespace models {
class JsonBody
: public IHttpBody
namespace tribufu
{
public:
JsonBody( const web::json::value& value );
namespace models
{
class JsonBody : public IHttpBody
{
public:
JsonBody(const web::json::value &value);
virtual ~JsonBody();
void writeTo( std::ostream& target ) override;
void writeTo(std::ostream &target) override;
protected:
protected:
web::json::value m_Json;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_JsonBody_H_ */

View File

@ -19,8 +19,6 @@
#ifndef TRIBUFU_MODELS_ModelBase_H_
#define TRIBUFU_MODELS_ModelBase_H_
#include "tribufu++/HttpContent.h"
#include "tribufu++/MultipartFormData.h"
@ -31,256 +29,260 @@
#include <set>
#include <vector>
namespace tribufu {
namespace models {
class ModelBase
namespace tribufu
{
public:
namespace models
{
class ModelBase
{
public:
ModelBase();
virtual ~ModelBase();
virtual void validate() = 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 bool fromMultiPart( std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix ) = 0;
virtual void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const = 0;
virtual bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) = 0;
virtual bool isSet() const;
static utility::string_t toString( const bool val );
static utility::string_t toString( const float val );
static utility::string_t toString( const double val );
static utility::string_t toString( const int32_t val );
static utility::string_t toString( const int64_t val );
static utility::string_t toString( const utility::string_t &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 std::shared_ptr<HttpContent>& val );
template <typename T>
static utility::string_t toString( const std::shared_ptr<T>& val );
template <typename T>
static utility::string_t toString( const std::vector<T> & val );
template <typename T>
static utility::string_t toString( const std::set<T> & val );
static utility::string_t toString(const bool val);
static utility::string_t toString(const float val);
static utility::string_t toString(const double val);
static utility::string_t toString(const int32_t val);
static utility::string_t toString(const int64_t val);
static utility::string_t toString(const utility::string_t &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 std::shared_ptr<HttpContent> &val);
template <typename T> static utility::string_t toString(const std::shared_ptr<T> &val);
template <typename T> static utility::string_t toString(const std::vector<T> &val);
template <typename T> static utility::string_t toString(const std::set<T> &val);
static web::json::value toJson( bool val );
static web::json::value toJson( float val );
static web::json::value toJson( double val );
static web::json::value toJson( int32_t val );
static web::json::value toJson( int64_t val );
static web::json::value toJson( const utility::string_t& 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 std::shared_ptr<HttpContent>& val );
template<typename T>
static web::json::value toJson( const std::shared_ptr<T>& val );
static web::json::value toJson( const std::shared_ptr<utility::datetime>& val );
template<typename T>
static web::json::value toJson( const std::vector<T>& val );
template<typename T>
static web::json::value toJson( const std::set<T>& val );
template<typename T>
static web::json::value toJson( const std::map<utility::string_t, T>& val );
static web::json::value toJson(bool val);
static web::json::value toJson(float val);
static web::json::value toJson(double val);
static web::json::value toJson(int32_t val);
static web::json::value toJson(int64_t val);
static web::json::value toJson(const utility::string_t &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 std::shared_ptr<HttpContent> &val);
template <typename T> static web::json::value toJson(const std::shared_ptr<T> &val);
static web::json::value toJson(const std::shared_ptr<utility::datetime> &val);
template <typename T> static web::json::value toJson(const std::vector<T> &val);
template <typename T> static web::json::value toJson(const std::set<T> &val);
template <typename T> static web::json::value toJson(const std::map<utility::string_t, T> &val);
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, double & );
static bool fromString( const utility::string_t& val, int32_t & );
static bool fromString( const utility::string_t& val, int64_t & );
static bool fromString( const utility::string_t& val, utility::string_t & );
static bool fromString( const utility::string_t& val, utility::datetime & );
static bool fromString( const utility::string_t& val, web::json::value & );
static bool fromString( const utility::string_t& val, std::shared_ptr<HttpContent> & );
template<typename T>
static bool fromString( const utility::string_t& val, std::shared_ptr<T>& );
static bool fromString( const utility::string_t& val, std::shared_ptr<utility::datetime>& outVal );
template<typename T>
static bool fromString( const utility::string_t& val, std::vector<T> & );
template<typename T>
static bool fromString( const utility::string_t& val, std::set<T> & );
template<typename T>
static bool fromString( const utility::string_t& val, std::map<utility::string_t, T> & );
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, double &);
static bool fromString(const utility::string_t &val, int32_t &);
static bool fromString(const utility::string_t &val, int64_t &);
static bool fromString(const utility::string_t &val, utility::string_t &);
static bool fromString(const utility::string_t &val, utility::datetime &);
static bool fromString(const utility::string_t &val, web::json::value &);
static bool fromString(const utility::string_t &val, std::shared_ptr<HttpContent> &);
template <typename T> static bool fromString(const utility::string_t &val, std::shared_ptr<T> &);
static bool fromString(const utility::string_t &val, std::shared_ptr<utility::datetime> &outVal);
template <typename T> static bool fromString(const utility::string_t &val, std::vector<T> &);
template <typename T> static bool fromString(const utility::string_t &val, std::set<T> &);
template <typename T>
static bool fromString(const utility::string_t &val, std::map<utility::string_t, T> &);
static bool fromJson( const web::json::value& val, bool & );
static bool fromJson( const web::json::value& val, float & );
static bool fromJson( const web::json::value& val, double & );
static bool fromJson( const web::json::value& val, int32_t & );
static bool fromJson( const web::json::value& val, int64_t & );
static bool fromJson( const web::json::value& val, utility::string_t & );
static bool fromJson( const web::json::value& val, utility::datetime & );
static bool fromJson( const web::json::value& val, web::json::value & );
static bool fromJson( const web::json::value& val, std::shared_ptr<HttpContent> & );
template<typename T>
static bool fromJson( const web::json::value& val, std::shared_ptr<T>& );
static bool fromJson( const web::json::value& val, std::shared_ptr<utility::datetime> &outVal );
template<typename T>
static bool fromJson( const web::json::value& val, std::vector<T> & );
template<typename T>
static bool fromJson( const web::json::value& val, std::set<T> & );
template<typename T>
static bool fromJson( const web::json::value& val, std::map<utility::string_t, T> & );
static bool fromJson(const web::json::value &val, bool &);
static bool fromJson(const web::json::value &val, float &);
static bool fromJson(const web::json::value &val, double &);
static bool fromJson(const web::json::value &val, int32_t &);
static bool fromJson(const web::json::value &val, int64_t &);
static bool fromJson(const web::json::value &val, utility::string_t &);
static bool fromJson(const web::json::value &val, utility::datetime &);
static bool fromJson(const web::json::value &val, web::json::value &);
static bool fromJson(const web::json::value &val, std::shared_ptr<HttpContent> &);
template <typename T> static bool fromJson(const web::json::value &val, std::shared_ptr<T> &);
static bool fromJson(const web::json::value &val, std::shared_ptr<utility::datetime> &outVal);
template <typename T> static bool fromJson(const web::json::value &val, std::vector<T> &);
template <typename T> static bool fromJson(const web::json::value &val, std::set<T> &);
template <typename T> static bool fromJson(const web::json::value &val, std::map<utility::string_t, T> &);
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, bool value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, float value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, double value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, int32_t value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, int64_t value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, const utility::string_t &value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, const utility::datetime &value,
const utility::string_t &contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, const web::json::value &value,
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
static std::shared_ptr<HttpContent> toHttpContent(const utility::string_t &name,
const std::shared_ptr<HttpContent> &);
template <typename T>
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, const std::shared_ptr<T> &,
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
static std::shared_ptr<HttpContent> toHttpContent(
const utility::string_t &name, const std::shared_ptr<utility::datetime> &value,
const utility::string_t &contentType = utility::conversions::to_string_t("application/json"));
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(""));
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(""));
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, bool value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, float value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, double value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int32_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, int64_t value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const utility::string_t& value, const utility::string_t& contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const utility::datetime& value, const utility::string_t& contentType = utility::conversions::to_string_t(""));
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const web::json::value& value, const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::shared_ptr<HttpContent>& );
static 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, double &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, int64_t &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, int32_t &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, utility::string_t &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, utility::datetime &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, web::json::value &);
static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent> &);
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &);
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::vector<T> &);
template <typename T> static bool fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T> &);
template <typename T>
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::shared_ptr<T>& , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
static std::shared_ptr<HttpContent> toHttpContent(const utility::string_t& name, const std::shared_ptr<utility::datetime>& value , const utility::string_t& contentType = utility::conversions::to_string_t("application/json") );
template <typename T>
static std::shared_ptr<HttpContent> toHttpContent( const utility::string_t& name, const std::vector<T>& value, const utility::string_t& contentType = utility::conversions::to_string_t("") );
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("") );
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 bool fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> &);
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, double & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, int64_t & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, int32_t & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, utility::string_t & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, utility::datetime & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, web::json::value & );
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_ptr<HttpContent>& );
template <typename T>
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_ptr<T>& );
template <typename T>
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::vector<T> & );
template <typename T>
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::set<T> & );
template <typename T>
static bool fromHttpContent( std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> & );
static utility::string_t toBase64(utility::string_t value);
static utility::string_t toBase64(std::shared_ptr<std::istream> value);
static std::shared_ptr<std::istream> fromBase64(const utility::string_t &encoded);
static utility::string_t toBase64( utility::string_t value );
static utility::string_t toBase64( std::shared_ptr<std::istream> value );
static std::shared_ptr<std::istream> fromBase64( const utility::string_t& encoded );
protected:
protected:
bool m_IsSet;
};
};
template <typename T>
utility::string_t ModelBase::toString( const std::shared_ptr<T>& val )
{
template <typename T> utility::string_t ModelBase::toString(const std::shared_ptr<T> &val)
{
utility::stringstream_t ss;
if( val != nullptr )
if (val != nullptr)
{
val->toJson().serialize(ss);
}
return utility::string_t(ss.str());
}
}
// std::vector to string
template<typename T>
utility::string_t ModelBase::toString( const std::vector<T> & val )
{
utility::string_t strArray;
for ( const auto &item : val )
// std::vector to string
template <typename T> utility::string_t ModelBase::toString(const std::vector<T> &val)
{
strArray.append( toString(item) + "," );
utility::string_t strArray;
for (const auto &item : val)
{
strArray.append(toString(item) + ",");
}
if (val.count() > 0)
{
strArray.pop_back();
}
return strArray;
}
}
// std::set to string
template<typename T>
utility::string_t ModelBase::toString( const std::set<T> & val )
{
utility::string_t strArray;
for ( const auto &item : val )
// std::set to string
template <typename T> utility::string_t ModelBase::toString(const std::set<T> &val)
{
strArray.append( toString(item) + "," );
utility::string_t strArray;
for (const auto &item : val)
{
strArray.append(toString(item) + ",");
}
if (val.count() > 0)
{
strArray.pop_back();
}
return strArray;
}
}
template<typename T>
web::json::value ModelBase::toJson( const std::shared_ptr<T>& val )
{
template <typename T> web::json::value ModelBase::toJson(const std::shared_ptr<T> &val)
{
web::json::value retVal;
if(val != nullptr)
if (val != nullptr)
{
retVal = val->toJson();
}
return retVal;
}
}
// std::vector to json
template<typename T>
web::json::value ModelBase::toJson( const std::vector<T>& value )
{
std::vector<web::json::value> ret;
for ( const auto& x : value )
// std::vector to json
template <typename T> web::json::value ModelBase::toJson(const std::vector<T> &value)
{
ret.push_back( toJson(x) );
std::vector<web::json::value> ret;
for (const auto &x : value)
{
ret.push_back(toJson(x));
}
return web::json::value::array(ret);
}
}
// std::set to json
template<typename T>
web::json::value ModelBase::toJson( const std::set<T>& value )
{
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector to get an array.
std::vector<web::json::value> ret;
for ( const auto& x : value )
// std::set to json
template <typename T> web::json::value ModelBase::toJson(const std::set<T> &value)
{
ret.push_back( toJson(x) );
// There's no prototype web::json::value::array(...) taking a std::set parameter. Converting to std::vector
// to get an array.
std::vector<web::json::value> ret;
for (const auto &x : value)
{
ret.push_back(toJson(x));
}
return web::json::value::array(ret);
}
}
template<typename T>
web::json::value ModelBase::toJson( const std::map<utility::string_t, T>& val )
{
template <typename T> web::json::value ModelBase::toJson(const std::map<utility::string_t, T> &val)
{
web::json::value obj;
for ( const auto &itemkey : val )
for (const auto &itemkey : val)
{
obj[itemkey.first] = toJson( itemkey.second );
obj[itemkey.first] = toJson(itemkey.second);
}
return obj;
}
template<typename T>
bool ModelBase::fromString( const utility::string_t& val, std::shared_ptr<T>& outVal )
{
}
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::shared_ptr<T> &outVal)
{
bool ok = false;
if(outVal == nullptr)
if (outVal == nullptr)
{
outVal = std::make_shared<T>();
}
if( outVal != nullptr )
if (outVal != nullptr)
{
ok = outVal->fromJson(web::json::value::parse(val));
}
return ok;
}
template<typename T>
bool ModelBase::fromString(const utility::string_t& val, std::vector<T>& outVal )
{
}
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::vector<T> &outVal)
{
bool ok = true;
web::json::value jsonValue = web::json::value::parse(val);
if (jsonValue.is_array())
{
for (const web::json::value& jitem : jsonValue.as_array())
for (const web::json::value &jitem : jsonValue.as_array())
{
T item;
ok &= fromJson(jitem, item);
@ -294,15 +296,14 @@ bool ModelBase::fromString(const utility::string_t& val, std::vector<T>& outVal
outVal.push_back(item);
}
return ok;
}
template<typename T>
bool ModelBase::fromString(const utility::string_t& val, std::set<T>& outVal )
{
}
template <typename T> bool ModelBase::fromString(const utility::string_t &val, std::set<T> &outVal)
{
bool ok = true;
web::json::value jsonValue = web::json::value::parse(val);
if (jsonValue.is_array())
{
for (const web::json::value& jitem : jsonValue.as_array())
for (const web::json::value &jitem : jsonValue.as_array())
{
T item;
ok &= fromJson(jitem, item);
@ -316,50 +317,48 @@ bool ModelBase::fromString(const utility::string_t& val, std::set<T>& outVal )
outVal.insert(item);
}
return ok;
}
template<typename T>
bool ModelBase::fromString(const utility::string_t& val, std::map<utility::string_t, T>& outVal )
{
}
template <typename T>
bool ModelBase::fromString(const utility::string_t &val, std::map<utility::string_t, T> &outVal)
{
bool ok = false;
web::json::value jsonValue = web::json::value::parse(val);
if (jsonValue.is_array())
{
for (const web::json::value& jitem : jsonValue.as_array())
for (const web::json::value &jitem : jsonValue.as_array())
{
T item;
ok &= fromJson(jitem, item);
outVal.insert({ val, item });
outVal.insert({val, item});
}
}
else
{
T item;
ok = fromJson(jsonValue, item);
outVal.insert({ val, item });
outVal.insert({val, item});
}
return ok;
}
template<typename T>
bool ModelBase::fromJson( const web::json::value& val, std::shared_ptr<T> &outVal )
{
}
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::shared_ptr<T> &outVal)
{
bool ok = false;
if(outVal == nullptr)
if (outVal == nullptr)
{
outVal = std::make_shared<T>();
}
if( outVal != nullptr )
if (outVal != nullptr)
{
ok = outVal->fromJson(val);
}
return ok;
}
template<typename T>
bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
{
}
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::vector<T> &outVal)
{
bool ok = true;
if (val.is_array())
{
for (const web::json::value & jitem : val.as_array())
for (const web::json::value &jitem : val.as_array())
{
T item;
ok &= fromJson(jitem, item);
@ -371,14 +370,13 @@ bool ModelBase::fromJson( const web::json::value& val, std::vector<T> &outVal )
ok = false;
}
return ok;
}
template<typename T>
bool ModelBase::fromJson(const web::json::value& val, std::set<T>& outVal )
{
}
template <typename T> bool ModelBase::fromJson(const web::json::value &val, std::set<T> &outVal)
{
bool ok = true;
if (val.is_array())
{
for (const web::json::value& jitem : val.as_array())
for (const web::json::value &jitem : val.as_array())
{
T item;
ok &= fromJson(jitem, item);
@ -392,15 +390,15 @@ bool ModelBase::fromJson(const web::json::value& val, std::set<T>& outVal )
outVal.insert(item);
}
return ok;
}
template<typename T>
bool ModelBase::fromJson( const web::json::value& jval, std::map<utility::string_t, T> &outVal )
{
}
template <typename T>
bool ModelBase::fromJson(const web::json::value &jval, std::map<utility::string_t, T> &outVal)
{
bool ok = true;
if ( jval.is_object() )
if (jval.is_object())
{
auto obj = jval.as_object();
for( auto objItr = obj.begin() ; objItr != obj.end() ; objItr++ )
for (auto objItr = obj.begin(); objItr != obj.end(); objItr++)
{
T itemVal;
ok &= fromJson(objItr->second, itemVal);
@ -412,91 +410,104 @@ bool ModelBase::fromJson( const web::json::value& jval, std::map<utility::string
ok = false;
}
return ok;
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t& name, const std::shared_ptr<T>& value , const utility::string_t& contentType )
{
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
if (value != nullptr )
}
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)
{
content->setName( name );
content->setContentDisposition( utility::conversions::to_string_t("form-data") );
content->setContentType( contentType );
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(value->toJson().serialize()) ) );
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
if (value != nullptr)
{
content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType);
content->setData(std::make_shared<std::stringstream>(
utility::conversions::to_utf8string(value->toJson().serialize())));
}
return content;
}
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::vector<T>& value, const utility::string_t& contentType )
{
web::json::value json_array = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName( name );
content->setContentDisposition( utility::conversions::to_string_t("form-data") );
content->setContentType( contentType );
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(json_array.serialize()) ) );
return content;
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::set<T>& value, const utility::string_t& contentType )
{
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
const std::vector<T> &value,
const utility::string_t &contentType)
{
web::json::value json_array = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType);
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(json_array.serialize()) ) );
content->setData(
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(json_array.serialize())));
return content;
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent( const utility::string_t& name, const std::map<utility::string_t, T>& value, const utility::string_t& contentType )
{
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name, const std::set<T> &value,
const utility::string_t &contentType)
{
web::json::value json_array = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType);
content->setData(
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(json_array.serialize())));
return content;
}
template <typename T>
std::shared_ptr<HttpContent> ModelBase::toHttpContent(const utility::string_t &name,
const std::map<utility::string_t, T> &value,
const utility::string_t &contentType)
{
web::json::value jobj = ModelBase::toJson(value);
std::shared_ptr<HttpContent> content = std::make_shared<HttpContent>();
content->setName( name );
content->setContentDisposition( utility::conversions::to_string_t("form-data") );
content->setContentType( contentType );
content->setData( std::make_shared<std::stringstream>( utility::conversions::to_utf8string(jobj.serialize()) ) );
content->setName(name);
content->setContentDisposition(utility::conversions::to_string_t("form-data"));
content->setContentType(contentType);
content->setData(
std::make_shared<std::stringstream>(utility::conversions::to_utf8string(jobj.serialize())));
return content;
}
template <typename T>
bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::shared_ptr<T>& outVal )
{
}
template <typename T>
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::shared_ptr<T> &outVal)
{
utility::string_t str;
if(val == nullptr) return false;
if( outVal == nullptr )
if (val == nullptr)
return false;
if (outVal == nullptr)
{
outVal = std::make_shared<T>();
}
ModelBase::fromHttpContent(val, str);
return fromString(str, outVal);
}
template <typename T>
bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::vector<T> & outVal )
{
}
template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::vector<T> &outVal)
{
utility::string_t str;
if (val == nullptr) return false;
if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str);
return fromString(str, outVal);
}
template <typename T>
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T>& outVal )
{
}
template <typename T> bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::set<T> &outVal)
{
utility::string_t str;
if (val == nullptr) return false;
if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str);
return fromString(str, outVal);
}
template <typename T>
bool ModelBase::fromHttpContent( std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> & outVal )
{
}
template <typename T>
bool ModelBase::fromHttpContent(std::shared_ptr<HttpContent> val, std::map<utility::string_t, T> &outVal)
{
utility::string_t str;
if (val == nullptr) return false;
if (val == nullptr)
return false;
ModelBase::fromHttpContent(val, str);
return fromString(str, outVal);
}
}
}
}
}
#endif /* TRIBUFU_MODELS_ModelBase_H_ */

View File

@ -19,40 +19,40 @@
#ifndef TRIBUFU_MODELS_MultipartFormData_H_
#define TRIBUFU_MODELS_MultipartFormData_H_
#include "tribufu++/IHttpBody.h"
#include "tribufu++/HttpContent.h"
#include "tribufu++/IHttpBody.h"
#include <cpprest/details/basic_types.h>
#include <vector>
#include <map>
#include <memory>
#include <vector>
namespace tribufu {
namespace models {
class MultipartFormData
: public IHttpBody
namespace tribufu
{
public:
namespace models
{
class MultipartFormData : public IHttpBody
{
public:
MultipartFormData();
MultipartFormData(const utility::string_t& boundary);
MultipartFormData(const utility::string_t &boundary);
virtual ~MultipartFormData();
virtual void add( std::shared_ptr<HttpContent> content );
virtual void add(std::shared_ptr<HttpContent> content);
virtual utility::string_t getBoundary();
virtual std::shared_ptr<HttpContent> getContent(const utility::string_t& name) const;
virtual bool hasContent(const utility::string_t& name) const;
virtual void writeTo( std::ostream& target );
virtual std::shared_ptr<HttpContent> getContent(const utility::string_t &name) const;
virtual bool hasContent(const utility::string_t &name) const;
virtual void writeTo(std::ostream &target);
protected:
protected:
std::vector<std::shared_ptr<HttpContent>> m_Contents;
utility::string_t m_Boundary;
std::map<utility::string_t, std::shared_ptr<HttpContent>> m_ContentLookup;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_MultipartFormData_H_ */

View File

@ -19,18 +19,19 @@
#ifndef TRIBUFU_MODELS_Object_H_
#define TRIBUFU_MODELS_Object_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include <cpprest/json.h>
namespace tribufu {
namespace models {
class Object : public ModelBase
namespace tribufu
{
public:
namespace models
{
class Object : public ModelBase
{
public:
Object();
virtual ~Object();
@ -39,21 +40,23 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Object manipulation
web::json::value getValue(const utility::string_t& key) const;
void setValue(const utility::string_t& key, const web::json::value& value);
web::json::value getValue(const utility::string_t &key) const;
void setValue(const utility::string_t &key, const web::json::value &value);
private:
private:
web::json::value m_object;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Object_H_ */

View File

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

View File

@ -23,19 +23,18 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/AnyType.h"
#include "tribufu++/model/LoginProvider.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Account
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Account : public ModelBase
{
public:
Account();
virtual ~Account();
@ -45,35 +44,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Account members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
std::shared_ptr<LoginProvider> getProvider() const;
bool providerIsSet() const;
void unsetProvider();
void setProvider(const std::shared_ptr<LoginProvider>& value);
void setProvider(const std::shared_ptr<LoginProvider> &value);
utility::string_t getUserId() const;
bool userIdIsSet() const;
void unsetUser_id();
void setUserId(const utility::string_t& value);
void setUserId(const utility::string_t &value);
bool isAuthorized() const;
bool authorizedIsSet() const;
@ -83,20 +82,19 @@ public:
std::shared_ptr<AnyType> getFields() const;
bool fieldsIsSet() const;
void unsetFields();
void setFields(const std::shared_ptr<AnyType>& value);
void setFields(const std::shared_ptr<AnyType> &value);
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -120,11 +118,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Account_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ApplicationType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Application
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Application : public ModelBase
{
public:
Application();
virtual ~Application();
@ -44,70 +43,70 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Application members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
std::shared_ptr<ApplicationType> getType() const;
bool typeIsSet() const;
void unsetType();
void setType(const std::shared_ptr<ApplicationType>& value);
void setType(const std::shared_ptr<ApplicationType> &value);
utility::string_t getOrganizationId() const;
bool organizationIdIsSet() const;
void unsetOrganization_id();
void setOrganizationId(const utility::string_t& value);
void setOrganizationId(const utility::string_t &value);
utility::string_t getIconUrl() const;
bool iconUrlIsSet() const;
void unsetIcon_url();
void setIconUrl(const utility::string_t& value);
void setIconUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::string_t getCapsuleImageUrl() const;
bool capsuleImageUrlIsSet() const;
void unsetCapsule_image_url();
void setCapsuleImageUrl(const utility::string_t& value);
void setCapsuleImageUrl(const utility::string_t &value);
utility::string_t getLibraryImageUrl() const;
bool libraryImageUrlIsSet() const;
void unsetLibrary_image_url();
void setLibraryImageUrl(const utility::string_t& value);
void setLibraryImageUrl(const utility::string_t &value);
utility::string_t getParentId() const;
bool parentIdIsSet() const;
void unsetParent_id();
void setParentId(const utility::string_t& value);
void setParentId(const utility::string_t &value);
utility::string_t getSlug() const;
bool slugIsSet() const;
void unsetSlug();
void setSlug(const utility::string_t& value);
void setSlug(const utility::string_t &value);
int32_t getVisibility() const;
bool visibilityIsSet() const;
@ -117,7 +116,7 @@ public:
utility::string_t getPassword() const;
bool passwordIsSet() const;
void unsetPassword();
void setPassword(const utility::string_t& value);
void setPassword(const utility::string_t &value);
int32_t getPrimary() const;
bool primaryIsSet() const;
@ -147,15 +146,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -215,11 +213,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Application_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_ApplicationType_H_
#define TRIBUFU_MODELS_ApplicationType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class ApplicationType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class ApplicationType : public ModelBase
{
public:
ApplicationType();
virtual ~ApplicationType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eApplicationType
{
@ -56,9 +56,9 @@ public:
protected:
eApplicationType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_ApplicationType_H_ */

View File

@ -23,19 +23,18 @@
#include "tribufu++/ModelBase.h"
#include "tribufu++/model/CodeChallengeMethod.h"
#include "tribufu++/model/ResponseType.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/CodeChallengeMethod.h"
namespace tribufu {
namespace models {
class AuthorizeRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class AuthorizeRequest : public ModelBase
{
public:
AuthorizeRequest();
virtual ~AuthorizeRequest();
@ -45,53 +44,52 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// AuthorizeRequest members
std::shared_ptr<ResponseType> getResponseType() const;
bool responseTypeIsSet() const;
void unsetResponse_type();
void setResponseType(const std::shared_ptr<ResponseType>& value);
void setResponseType(const std::shared_ptr<ResponseType> &value);
utility::string_t getClientId() const;
bool clientIdIsSet() const;
void unsetClient_id();
void setClientId(const utility::string_t& value);
void setClientId(const utility::string_t &value);
utility::string_t getCodeChallenge() const;
bool codeChallengeIsSet() const;
void unsetCode_challenge();
void setCodeChallenge(const utility::string_t& value);
void setCodeChallenge(const utility::string_t &value);
std::shared_ptr<CodeChallengeMethod> getCodeChallengeMethod() const;
bool codeChallengeMethodIsSet() const;
void unsetCode_challenge_method();
void setCodeChallengeMethod(const std::shared_ptr<CodeChallengeMethod>& value);
void setCodeChallengeMethod(const std::shared_ptr<CodeChallengeMethod> &value);
utility::string_t getRedirectUri() const;
bool redirectUriIsSet() const;
void unsetRedirect_uri();
void setRedirectUri(const utility::string_t& value);
void setRedirectUri(const utility::string_t &value);
utility::string_t getScope() const;
bool scopeIsSet() const;
void unsetScope();
void setScope(const utility::string_t& value);
void setScope(const utility::string_t &value);
utility::string_t getState() const;
bool stateIsSet() const;
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;
bool m_Response_typeIsSet;
@ -112,11 +110,9 @@ protected:
utility::string_t m_State;
bool m_StateIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_AuthorizeRequest_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_CodeChallengeMethod_H_
#define TRIBUFU_MODELS_CodeChallengeMethod_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class CodeChallengeMethod
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class CodeChallengeMethod : public ModelBase
{
public:
CodeChallengeMethod();
virtual ~CodeChallengeMethod();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eCodeChallengeMethod
{
@ -56,9 +56,9 @@ public:
protected:
eCodeChallengeMethod m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_CodeChallengeMethod_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_CryptoViewModel_H_
#define TRIBUFU_MODELS_CryptoViewModel_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class CryptoViewModel
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class CryptoViewModel : public ModelBase
{
public:
CryptoViewModel();
virtual ~CryptoViewModel();
@ -42,38 +40,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// CryptoViewModel members
utility::string_t getEncoded() const;
bool encodedIsSet() const;
void unsetEncoded();
void setEncoded(const utility::string_t& value);
void setEncoded(const utility::string_t &value);
utility::string_t getDecoded() const;
bool decodedIsSet() const;
void unsetDecoded();
void setDecoded(const utility::string_t& value);
void setDecoded(const utility::string_t &value);
protected:
protected:
utility::string_t m_Encoded;
bool m_EncodedIsSet;
utility::string_t m_Decoded;
bool m_DecodedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_CryptoViewModel_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ApplicationType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Game
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Game : public ModelBase
{
public:
Game();
virtual ~Game();
@ -44,16 +43,16 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Game members
int32_t getGamePort() const;
bool gamePortIsSet() const;
void unsetGame_port();
@ -92,77 +91,77 @@ public:
utility::string_t getRustGamedigId() const;
bool rustGamedigIdIsSet() const;
void unsetRust_gamedig_id();
void setRustGamedigId(const utility::string_t& value);
void setRustGamedigId(const utility::string_t &value);
utility::string_t getNodeGamedigId() const;
bool nodeGamedigIdIsSet() const;
void unsetNode_gamedig_id();
void setNodeGamedigId(const utility::string_t& value);
void setNodeGamedigId(const utility::string_t &value);
utility::string_t getServerConnectUrl() const;
bool serverConnectUrlIsSet() const;
void unsetServer_connect_url();
void setServerConnectUrl(const utility::string_t& value);
void setServerConnectUrl(const utility::string_t &value);
utility::string_t getServerTags() const;
bool serverTagsIsSet() const;
void unsetServer_tags();
void setServerTags(const utility::string_t& value);
void setServerTags(const utility::string_t &value);
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
std::shared_ptr<ApplicationType> getType() const;
bool typeIsSet() const;
void unsetType();
void setType(const std::shared_ptr<ApplicationType>& value);
void setType(const std::shared_ptr<ApplicationType> &value);
utility::string_t getOrganizationId() const;
bool organizationIdIsSet() const;
void unsetOrganization_id();
void setOrganizationId(const utility::string_t& value);
void setOrganizationId(const utility::string_t &value);
utility::string_t getIconUrl() const;
bool iconUrlIsSet() const;
void unsetIcon_url();
void setIconUrl(const utility::string_t& value);
void setIconUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::string_t getCapsuleImageUrl() const;
bool capsuleImageUrlIsSet() const;
void unsetCapsule_image_url();
void setCapsuleImageUrl(const utility::string_t& value);
void setCapsuleImageUrl(const utility::string_t &value);
utility::string_t getLibraryImageUrl() const;
bool libraryImageUrlIsSet() const;
void unsetLibrary_image_url();
void setLibraryImageUrl(const utility::string_t& value);
void setLibraryImageUrl(const utility::string_t &value);
utility::string_t getParentId() const;
bool parentIdIsSet() const;
void unsetParent_id();
void setParentId(const utility::string_t& value);
void setParentId(const utility::string_t &value);
utility::string_t getSlug() const;
bool slugIsSet() const;
void unsetSlug();
void setSlug(const utility::string_t& value);
void setSlug(const utility::string_t &value);
int32_t getVisibility() const;
bool visibilityIsSet() const;
@ -172,7 +171,7 @@ public:
utility::string_t getPassword() const;
bool passwordIsSet() const;
void unsetPassword();
void setPassword(const utility::string_t& value);
void setPassword(const utility::string_t &value);
int32_t getPrimary() const;
bool primaryIsSet() const;
@ -202,15 +201,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
int32_t m_Game_port;
bool m_Game_portIsSet;
@ -303,11 +301,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Game_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/ServerStatus.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class GameServer
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class GameServer : public ModelBase
{
public:
GameServer();
virtual ~GameServer();
@ -44,35 +43,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// GameServer members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
utility::string_t getAddress() const;
bool addressIsSet() const;
void unsetAddress();
void setAddress(const utility::string_t& value);
void setAddress(const utility::string_t &value);
int32_t getGamePort() const;
bool gamePortIsSet() const;
@ -87,17 +86,17 @@ public:
utility::string_t getGameId() const;
bool gameIdIsSet() const;
void unsetGame_id();
void setGameId(const utility::string_t& value);
void setGameId(const utility::string_t &value);
utility::string_t getGameIconUrl() const;
bool gameIconUrlIsSet() const;
void unsetGame_icon_url();
void setGameIconUrl(const utility::string_t& value);
void setGameIconUrl(const utility::string_t &value);
utility::string_t getVersion() const;
bool versionIsSet() const;
void unsetVersion();
void setVersion(const utility::string_t& value);
void setVersion(const utility::string_t &value);
bool isFeatured() const;
bool featuredIsSet() const;
@ -107,22 +106,22 @@ public:
utility::string_t getClusterId() const;
bool clusterIdIsSet() const;
void unsetCluster_id();
void setClusterId(const utility::string_t& value);
void setClusterId(const utility::string_t &value);
utility::string_t getWebsiteUrl() const;
bool websiteUrlIsSet() const;
void unsetWebsite_url();
void setWebsiteUrl(const utility::string_t& value);
void setWebsiteUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::string_t getOwnerId() const;
bool ownerIdIsSet() const;
void unsetOwner_id();
void setOwnerId(const utility::string_t& value);
void setOwnerId(const utility::string_t &value);
double getUptime() const;
bool uptimeIsSet() const;
@ -132,7 +131,7 @@ public:
std::shared_ptr<ServerStatus> getStatus() const;
bool statusIsSet() const;
void unsetStatus();
void setStatus(const std::shared_ptr<ServerStatus>& value);
void setStatus(const std::shared_ptr<ServerStatus> &value);
int32_t getPing() const;
bool pingIsSet() const;
@ -142,7 +141,7 @@ public:
utility::string_t getMap() const;
bool mapIsSet() const;
void unsetmap();
void setMap(const utility::string_t& value);
void setMap(const utility::string_t &value);
int32_t getUsedSlots() const;
bool usedSlotsIsSet() const;
@ -157,22 +156,22 @@ public:
utility::string_t getMotd() const;
bool motdIsSet() const;
void unsetMotd();
void setMotd(const utility::string_t& value);
void setMotd(const utility::string_t &value);
utility::string_t getPlayers() const;
bool playersIsSet() const;
void unsetPlayers();
void setPlayers(const utility::string_t& value);
void setPlayers(const utility::string_t &value);
utility::datetime getLastOnline() const;
bool lastOnlineIsSet() const;
void unsetLast_online();
void setLastOnline(const utility::datetime& value);
void setLastOnline(const utility::datetime &value);
utility::string_t getCountry() const;
bool countryIsSet() const;
void unsetCountry();
void setCountry(const utility::string_t& value);
void setCountry(const utility::string_t &value);
bool isSteam() const;
bool steamIsSet() const;
@ -182,17 +181,17 @@ public:
utility::string_t getDiscordServerId() const;
bool discordServerIdIsSet() const;
void unsetDiscord_server_id();
void setDiscordServerId(const utility::string_t& value);
void setDiscordServerId(const utility::string_t &value);
utility::string_t getYoutubeVideoUrl() const;
bool youtubeVideoUrlIsSet() const;
void unsetYoutube_video_url();
void setYoutubeVideoUrl(const utility::string_t& value);
void setYoutubeVideoUrl(const utility::string_t &value);
utility::string_t getTags() const;
bool tagsIsSet() const;
void unsetTags();
void setTags(const utility::string_t& value);
void setTags(const utility::string_t &value);
int32_t getCommentCount() const;
bool commentCountIsSet() const;
@ -202,15 +201,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -303,11 +301,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GameServer_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_GameServerCluster_H_
#define TRIBUFU_MODELS_GameServerCluster_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class GameServerCluster
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class GameServerCluster : public ModelBase
{
public:
GameServerCluster();
virtual ~GameServerCluster();
@ -42,65 +40,65 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// GameServerCluster members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
utility::string_t getGameId() const;
bool gameIdIsSet() const;
void unsetGame_id();
void setGameId(const utility::string_t& value);
void setGameId(const utility::string_t &value);
utility::string_t getWebsiteUrl() const;
bool websiteUrlIsSet() const;
void unsetWebsite_url();
void setWebsiteUrl(const utility::string_t& value);
void setWebsiteUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::string_t getOwnerId() const;
bool ownerIdIsSet() const;
void unsetOwner_id();
void setOwnerId(const utility::string_t& value);
void setOwnerId(const utility::string_t &value);
utility::string_t getDiscordServerId() const;
bool discordServerIdIsSet() const;
void unsetDiscord_server_id();
void setDiscordServerId(const utility::string_t& value);
void setDiscordServerId(const utility::string_t &value);
utility::string_t getYoutubeVideoUrl() const;
bool youtubeVideoUrlIsSet() const;
void unsetYoutube_video_url();
void setYoutubeVideoUrl(const utility::string_t& value);
void setYoutubeVideoUrl(const utility::string_t &value);
utility::string_t getTags() const;
bool tagsIsSet() const;
void unsetTags();
void setTags(const utility::string_t& value);
void setTags(const utility::string_t &value);
int32_t getCommentCount() const;
bool commentCountIsSet() const;
@ -115,15 +113,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -165,11 +162,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GameServerCluster_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_GrantType_H_
#define TRIBUFU_MODELS_GrantType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class GrantType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class GrantType : public ModelBase
{
public:
GrantType();
virtual ~GrantType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eGrantType
{
@ -58,9 +58,9 @@ public:
protected:
eGrantType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GrantType_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_Group_H_
#define TRIBUFU_MODELS_Group_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Group
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Group : public ModelBase
{
public:
Group();
virtual ~Group();
@ -42,40 +40,40 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Group members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getTag() const;
bool tagIsSet() const;
void unsetTag();
void setTag(const utility::string_t& value);
void setTag(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
int32_t getType() const;
bool typeIsSet() const;
@ -90,7 +88,7 @@ public:
utility::string_t getOwnerId() const;
bool ownerIdIsSet() const;
void unsetOwner_id();
void setOwnerId(const utility::string_t& value);
void setOwnerId(const utility::string_t &value);
bool isVerified() const;
bool verifiedIsSet() const;
@ -100,12 +98,12 @@ public:
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
int32_t getMemberCount() const;
bool memberCountIsSet() const;
@ -125,15 +123,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -181,11 +178,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Group_H_ */

View File

@ -19,25 +19,24 @@
#ifndef TRIBUFU_MODELS_GroupGame_H_
#define TRIBUFU_MODELS_GroupGame_H_
#include "tribufu++/ModelBase.h"
#include "tribufu++/model/Application.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/Group.h"
#include "tribufu++/AnyType.h"
#include "tribufu++/model/Application.h"
#include "tribufu++/model/Group.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Group;
class Application;
class GroupGame
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Group;
class Application;
class GroupGame : public ModelBase
{
public:
GroupGame();
virtual ~GroupGame();
@ -47,53 +46,52 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// GroupGame members
utility::string_t getGroupId() const;
bool groupIdIsSet() const;
void unsetGroup_id();
void setGroupId(const utility::string_t& value);
void setGroupId(const utility::string_t &value);
std::shared_ptr<Group> getGroup() const;
bool groupIsSet() const;
void unsetGroup();
void setGroup(const std::shared_ptr<Group>& value);
void setGroup(const std::shared_ptr<Group> &value);
utility::string_t getApplicationId() const;
bool applicationIdIsSet() const;
void unsetApplication_id();
void setApplicationId(const utility::string_t& value);
void setApplicationId(const utility::string_t &value);
std::shared_ptr<Application> getApplication() const;
bool applicationIsSet() const;
void unsetApplication();
void setApplication(const std::shared_ptr<Application>& value);
void setApplication(const std::shared_ptr<Application> &value);
std::shared_ptr<AnyType> getStats() const;
bool statsIsSet() const;
void unsetStats();
void setStats(const std::shared_ptr<AnyType>& value);
void setStats(const std::shared_ptr<AnyType> &value);
utility::datetime getAcquired() const;
bool acquiredIsSet() const;
void unsetAcquired();
void setAcquired(const utility::datetime& value);
void setAcquired(const utility::datetime &value);
utility::datetime getLastUsed() const;
bool lastUsedIsSet() const;
void unsetLast_used();
void setLastUsed(const utility::datetime& value);
void setLastUsed(const utility::datetime &value);
protected:
protected:
utility::string_t m_Group_id;
bool m_Group_idIsSet;
@ -114,11 +112,9 @@ protected:
utility::datetime m_Last_used;
bool m_Last_usedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GroupGame_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GroupRank.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class GroupMember
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class GroupMember : public ModelBase
{
public:
GroupMember();
virtual ~GroupMember();
@ -44,35 +43,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// GroupMember members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDisplayName() const;
bool displayNameIsSet() const;
void unsetDisplay_name();
void setDisplayName(const utility::string_t& value);
void setDisplayName(const utility::string_t &value);
bool isVerified() const;
bool verifiedIsSet() const;
@ -82,25 +81,24 @@ public:
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
utility::datetime getLastOnline() const;
bool lastOnlineIsSet() const;
void unsetLast_online();
void setLastOnline(const utility::datetime& value);
void setLastOnline(const utility::datetime &value);
std::shared_ptr<GroupRank> getRank() const;
bool rankIsSet() const;
void unsetRank();
void setRank(const std::shared_ptr<GroupRank>& value);
void setRank(const std::shared_ptr<GroupRank> &value);
utility::datetime getSince() const;
bool sinceIsSet() const;
void unsetSince();
void setSince(const utility::datetime& value);
void setSince(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -127,11 +125,9 @@ protected:
utility::datetime m_Since;
bool m_SinceIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GroupMember_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_GroupRank_H_
#define TRIBUFU_MODELS_GroupRank_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class GroupRank
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class GroupRank : public ModelBase
{
public:
GroupRank();
virtual ~GroupRank();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eGroupRank
{
@ -57,9 +57,9 @@ public:
protected:
eGroupRank m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_GroupRank_H_ */

View File

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

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/TokenHintType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class IntrospectRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class IntrospectRequest : public ModelBase
{
public:
IntrospectRequest();
virtual ~IntrospectRequest();
@ -44,38 +43,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// IntrospectRequest members
utility::string_t getToken() const;
bool tokenIsSet() const;
void unsetToken();
void setToken(const utility::string_t& value);
void setToken(const utility::string_t &value);
std::shared_ptr<TokenHintType> getTokenTypeHint() const;
bool tokenTypeHintIsSet() const;
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;
bool m_TokenIsSet;
std::shared_ptr<TokenHintType> m_Token_type_hint;
bool m_Token_type_hintIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_IntrospectRequest_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_IpAddress_H_
#define TRIBUFU_MODELS_IpAddress_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class IpAddress
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class IpAddress : public ModelBase
{
public:
IpAddress();
virtual ~IpAddress();
@ -42,20 +40,20 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// IpAddress members
utility::string_t getAddress() const;
bool addressIsSet() const;
void unsetAddress();
void setAddress(const utility::string_t& value);
void setAddress(const utility::string_t &value);
int32_t getVersion() const;
bool versionIsSet() const;
@ -65,7 +63,7 @@ public:
utility::string_t getNetwork() const;
bool networkIsSet() const;
void unsetNetwork();
void setNetwork(const utility::string_t& value);
void setNetwork(const utility::string_t &value);
bool isReserved() const;
bool reservedIsSet() const;
@ -75,62 +73,62 @@ public:
utility::string_t getAsn() const;
bool asnIsSet() const;
void unsetAsn();
void setAsn(const utility::string_t& value);
void setAsn(const utility::string_t &value);
utility::string_t getIsp() const;
bool ispIsSet() const;
void unsetIsp();
void setIsp(const utility::string_t& value);
void setIsp(const utility::string_t &value);
utility::string_t getContinent() const;
bool continentIsSet() const;
void unsetContinent();
void setContinent(const utility::string_t& value);
void setContinent(const utility::string_t &value);
utility::string_t getCountry() const;
bool countryIsSet() const;
void unsetCountry();
void setCountry(const utility::string_t& value);
void setCountry(const utility::string_t &value);
utility::string_t getRegion() const;
bool regionIsSet() const;
void unsetRegion();
void setRegion(const utility::string_t& value);
void setRegion(const utility::string_t &value);
utility::string_t getCity() const;
bool cityIsSet() const;
void unsetCity();
void setCity(const utility::string_t& value);
void setCity(const utility::string_t &value);
utility::string_t getPostalCode() const;
bool postalCodeIsSet() const;
void unsetPostal_code();
void setPostalCode(const utility::string_t& value);
void setPostalCode(const utility::string_t &value);
utility::string_t getCallingCode() const;
bool callingCodeIsSet() const;
void unsetCalling_code();
void setCallingCode(const utility::string_t& value);
void setCallingCode(const utility::string_t &value);
utility::string_t getTld() const;
bool tldIsSet() const;
void unsetTld();
void setTld(const utility::string_t& value);
void setTld(const utility::string_t &value);
utility::string_t getLanguage() const;
bool languageIsSet() const;
void unsetLanguage();
void setLanguage(const utility::string_t& value);
void setLanguage(const utility::string_t &value);
utility::string_t getTimezone() const;
bool timezoneIsSet() const;
void unsetTimezone();
void setTimezone(const utility::string_t& value);
void setTimezone(const utility::string_t &value);
utility::string_t getCurrency() const;
bool currencyIsSet() const;
void unsetCurrency();
void setCurrency(const utility::string_t& value);
void setCurrency(const utility::string_t &value);
float getLatitude() const;
bool latitudeIsSet() const;
@ -142,8 +140,7 @@ public:
void unsetLongitude();
void setLongitude(float value);
protected:
protected:
utility::string_t m_Address;
bool m_AddressIsSet;
@ -197,11 +194,9 @@ protected:
float m_Longitude;
bool m_LongitudeIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_IpAddress_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_LeaderboardItem_H_
#define TRIBUFU_MODELS_LeaderboardItem_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class LeaderboardItem
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class LeaderboardItem : public ModelBase
{
public:
LeaderboardItem();
virtual ~LeaderboardItem();
@ -42,30 +40,30 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// LeaderboardItem members
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDisplayName() const;
bool displayNameIsSet() const;
void unsetDisplay_name();
void setDisplayName(const utility::string_t& value);
void setDisplayName(const utility::string_t &value);
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
int32_t getLevel() const;
bool levelIsSet() const;
@ -82,8 +80,7 @@ public:
void unsetPoints();
void setPoints(double value);
protected:
protected:
utility::string_t m_Name;
bool m_NameIsSet;
@ -101,11 +98,9 @@ protected:
double m_Points;
bool m_PointsIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_LeaderboardItem_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_LeaderboardOrder_H_
#define TRIBUFU_MODELS_LeaderboardOrder_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class LeaderboardOrder
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class LeaderboardOrder : public ModelBase
{
public:
LeaderboardOrder();
virtual ~LeaderboardOrder();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eLeaderboardOrder
{
@ -56,9 +56,9 @@ public:
protected:
eLeaderboardOrder m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_LeaderboardOrder_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_LoginProvider_H_
#define TRIBUFU_MODELS_LoginProvider_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class LoginProvider
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class LoginProvider : public ModelBase
{
public:
LoginProvider();
virtual ~LoginProvider();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eLoginProvider
{
@ -61,9 +61,9 @@ public:
protected:
eLoginProvider m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_LoginProvider_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_LoginRequest_H_
#define TRIBUFU_MODELS_LoginRequest_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class LoginRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class LoginRequest : public ModelBase
{
public:
LoginRequest();
virtual ~LoginRequest();
@ -42,38 +40,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// LoginRequest members
utility::string_t getLogin() const;
bool loginIsSet() const;
void unsetLogin();
void setLogin(const utility::string_t& value);
void setLogin(const utility::string_t &value);
utility::string_t getPassword() const;
bool passwordIsSet() const;
void unsetPassword();
void setPassword(const utility::string_t& value);
void setPassword(const utility::string_t &value);
protected:
protected:
utility::string_t m_Login;
bool m_LoginIsSet;
utility::string_t m_Password;
bool m_PasswordIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_LoginRequest_H_ */

View File

@ -19,22 +19,21 @@
#ifndef TRIBUFU_MODELS_LoginResponse_H_
#define TRIBUFU_MODELS_LoginResponse_H_
#include "tribufu++/ModelBase.h"
#include "tribufu++/model/UserInfo.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class UserInfo;
class LoginResponse
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class UserInfo;
class LoginResponse : public ModelBase
{
public:
LoginResponse();
virtual ~LoginResponse();
@ -44,38 +43,37 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// LoginResponse members
std::shared_ptr<UserInfo> getUser() const;
bool userIsSet() const;
void unsetUser();
void setUser(const std::shared_ptr<UserInfo>& value);
void setUser(const std::shared_ptr<UserInfo> &value);
utility::string_t getAccessToken() const;
bool accessTokenIsSet() const;
void unsetAccess_token();
void setAccessToken(const utility::string_t& value);
void setAccessToken(const utility::string_t &value);
utility::string_t getRefreshToken() const;
bool refreshTokenIsSet() const;
void unsetRefresh_token();
void setRefreshToken(const utility::string_t& value);
void setRefreshToken(const utility::string_t &value);
int64_t getExpiresIn() const;
bool expiresInIsSet() const;
void unsetExpires_in();
void setExpiresIn(int64_t value);
protected:
protected:
std::shared_ptr<UserInfo> m_User;
bool m_UserIsSet;
@ -87,11 +85,9 @@ protected:
int64_t m_Expires_in;
bool m_Expires_inIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_LoginResponse_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_Package_H_
#define TRIBUFU_MODELS_Package_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Package
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Package : public ModelBase
{
public:
Package();
virtual ~Package();
@ -42,50 +40,50 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Package members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
utility::string_t getImageUrl() const;
bool imageUrlIsSet() const;
void unsetImage_url();
void setImageUrl(const utility::string_t& value);
void setImageUrl(const utility::string_t &value);
utility::string_t getAuthorId() const;
bool authorIdIsSet() const;
void unsetAuthor_id();
void setAuthorId(const utility::string_t& value);
void setAuthorId(const utility::string_t &value);
utility::string_t getVersion() const;
bool versionIsSet() const;
void unsetVersion();
void setVersion(const utility::string_t& value);
void setVersion(const utility::string_t &value);
utility::string_t getFileUrl() const;
bool fileUrlIsSet() const;
void unsetFile_url();
void setFileUrl(const utility::string_t& value);
void setFileUrl(const utility::string_t &value);
double getRawSize() const;
bool rawSizeIsSet() const;
@ -100,20 +98,19 @@ public:
utility::datetime getLastDownload() const;
bool lastDownloadIsSet() const;
void unsetLast_download();
void setLastDownload(const utility::datetime& value);
void setLastDownload(const utility::datetime &value);
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -149,11 +146,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Package_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_Profile_H_
#define TRIBUFU_MODELS_Profile_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class Profile
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Profile : public ModelBase
{
public:
Profile();
virtual ~Profile();
@ -42,35 +40,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Profile members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDisplayName() const;
bool displayNameIsSet() const;
void unsetDisplay_name();
void setDisplayName(const utility::string_t& value);
void setDisplayName(const utility::string_t &value);
bool isVerified() const;
bool verifiedIsSet() const;
@ -95,7 +93,7 @@ public:
utility::datetime getBirthday() const;
bool birthdayIsSet() const;
void unsetBirthday();
void setBirthday(const utility::datetime& value);
void setBirthday(const utility::datetime &value);
double getPoints() const;
bool pointsIsSet() const;
@ -105,27 +103,27 @@ public:
utility::string_t getLocation() const;
bool locationIsSet() const;
void unsetLocation();
void setLocation(const utility::string_t& value);
void setLocation(const utility::string_t &value);
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::datetime getLastOnline() const;
bool lastOnlineIsSet() const;
void unsetLast_online();
void setLastOnline(const utility::datetime& value);
void setLastOnline(const utility::datetime &value);
utility::string_t getBiography() const;
bool biographyIsSet() const;
void unsetBiography();
void setBiography(const utility::string_t& value);
void setBiography(const utility::string_t &value);
int32_t getViewCount() const;
bool viewCountIsSet() const;
@ -135,15 +133,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -197,11 +194,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Profile_H_ */

View File

@ -19,21 +19,19 @@
#ifndef TRIBUFU_MODELS_ProfileGame_H_
#define TRIBUFU_MODELS_ProfileGame_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/AnyType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class ProfileGame
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class ProfileGame : public ModelBase
{
public:
ProfileGame();
virtual ~ProfileGame();
@ -43,40 +41,40 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// ProfileGame members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getCapsuleImageUrl() const;
bool capsuleImageUrlIsSet() const;
void unsetCapsule_image_url();
void setCapsuleImageUrl(const utility::string_t& value);
void setCapsuleImageUrl(const utility::string_t &value);
utility::string_t getLibraryImageUrl() const;
bool libraryImageUrlIsSet() const;
void unsetLibrary_image_url();
void setLibraryImageUrl(const utility::string_t& value);
void setLibraryImageUrl(const utility::string_t &value);
utility::string_t getSlug() const;
bool slugIsSet() const;
void unsetSlug();
void setSlug(const utility::string_t& value);
void setSlug(const utility::string_t &value);
double getTimeUsed() const;
bool timeUsedIsSet() const;
@ -96,20 +94,19 @@ public:
std::shared_ptr<AnyType> getStats() const;
bool statsIsSet() const;
void unsetStats();
void setStats(const std::shared_ptr<AnyType>& value);
void setStats(const std::shared_ptr<AnyType> &value);
utility::datetime getAcquired() const;
bool acquiredIsSet() const;
void unsetAcquired();
void setAcquired(const utility::datetime& value);
void setAcquired(const utility::datetime &value);
utility::datetime getLastUsed() const;
bool lastUsedIsSet() const;
void unsetLast_used();
void setLastUsed(const utility::datetime& value);
void setLastUsed(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -142,11 +139,9 @@ protected:
utility::datetime m_Last_used;
bool m_Last_usedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_ProfileGame_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GroupRank.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class ProfileGroup
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class ProfileGroup : public ModelBase
{
public:
ProfileGroup();
virtual ~ProfileGroup();
@ -44,35 +43,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// ProfileGroup members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getTag() const;
bool tagIsSet() const;
void unsetTag();
void setTag(const utility::string_t& value);
void setTag(const utility::string_t &value);
int32_t getPrivacy() const;
bool privacyIsSet() const;
@ -87,7 +86,7 @@ public:
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
int32_t getMemberCount() const;
bool memberCountIsSet() const;
@ -97,15 +96,14 @@ public:
std::shared_ptr<GroupRank> getRank() const;
bool rankIsSet() const;
void unsetRank();
void setRank(const std::shared_ptr<GroupRank>& value);
void setRank(const std::shared_ptr<GroupRank> &value);
utility::datetime getSince() const;
bool sinceIsSet() const;
void unsetSince();
void setSince(const utility::datetime& value);
void setSince(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -135,11 +133,9 @@ protected:
utility::datetime m_Since;
bool m_SinceIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_ProfileGroup_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_RefreshRequest_H_
#define TRIBUFU_MODELS_RefreshRequest_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class RefreshRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class RefreshRequest : public ModelBase
{
public:
RefreshRequest();
virtual ~RefreshRequest();
@ -42,30 +40,27 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// RefreshRequest members
utility::string_t getRefreshToken() const;
bool refreshTokenIsSet() const;
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;
bool m_Refresh_tokenIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_RefreshRequest_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_RegisterRequest_H_
#define TRIBUFU_MODELS_RegisterRequest_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class RegisterRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class RegisterRequest : public ModelBase
{
public:
RegisterRequest();
virtual ~RegisterRequest();
@ -42,38 +40,37 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// RegisterRequest members
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getEmail() const;
bool emailIsSet() const;
void unsetEmail();
void setEmail(const utility::string_t& value);
void setEmail(const utility::string_t &value);
utility::string_t getPassword() const;
bool passwordIsSet() const;
void unsetPassword();
void setPassword(const utility::string_t& value);
void setPassword(const utility::string_t &value);
protected:
protected:
utility::string_t m_Uuid;
bool m_UuidIsSet;
@ -85,11 +82,9 @@ protected:
utility::string_t m_Password;
bool m_PasswordIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_RegisterRequest_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_ResponseType_H_
#define TRIBUFU_MODELS_ResponseType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class ResponseType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class ResponseType : public ModelBase
{
public:
ResponseType();
virtual ~ResponseType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eResponseType
{
@ -56,9 +56,9 @@ public:
protected:
eResponseType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_ResponseType_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/TokenHintType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class RevokeRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class RevokeRequest : public ModelBase
{
public:
RevokeRequest();
virtual ~RevokeRequest();
@ -44,38 +43,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// RevokeRequest members
utility::string_t getToken() const;
bool tokenIsSet() const;
void unsetToken();
void setToken(const utility::string_t& value);
void setToken(const utility::string_t &value);
std::shared_ptr<TokenHintType> getTokenTypeHint() const;
bool tokenTypeHintIsSet() const;
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;
bool m_TokenIsSet;
std::shared_ptr<TokenHintType> m_Token_type_hint;
bool m_Token_type_hintIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_RevokeRequest_H_ */

View File

@ -26,15 +26,14 @@
#include "tribufu++/model/SearchType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class SearchRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class SearchRequest : public ModelBase
{
public:
SearchRequest();
virtual ~SearchRequest();
@ -44,25 +43,25 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// SearchRequest members
std::shared_ptr<SearchType> getType() const;
bool typeIsSet() const;
void unsetType();
void setType(const std::shared_ptr<SearchType>& value);
void setType(const std::shared_ptr<SearchType> &value);
utility::string_t getQuery() const;
bool queryIsSet() const;
void unsetQuery();
void setQuery(const utility::string_t& value);
void setQuery(const utility::string_t &value);
int32_t getPage() const;
bool pageIsSet() const;
@ -72,10 +71,9 @@ public:
utility::string_t getGameId() const;
bool gameIdIsSet() const;
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;
bool m_TypeIsSet;
@ -87,11 +85,9 @@ protected:
utility::string_t m_Game_id;
bool m_Game_idIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_SearchRequest_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_SearchType_H_
#define TRIBUFU_MODELS_SearchType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class SearchType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class SearchType : public ModelBase
{
public:
SearchType();
virtual ~SearchType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eSearchType
{
@ -58,9 +58,9 @@ public:
protected:
eSearchType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_SearchType_H_ */

View File

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

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_ServerStatus_H_
#define TRIBUFU_MODELS_ServerStatus_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class ServerStatus
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class ServerStatus : public ModelBase
{
public:
ServerStatus();
virtual ~ServerStatus();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eServerStatus
{
@ -57,9 +57,9 @@ public:
protected:
eServerStatus m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_ServerStatus_H_ */

View File

@ -19,21 +19,19 @@
#ifndef TRIBUFU_MODELS_Subscription_H_
#define TRIBUFU_MODELS_Subscription_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include <map>
namespace tribufu {
namespace models {
class Subscription
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class Subscription : public ModelBase
{
public:
Subscription();
virtual ~Subscription();
@ -43,35 +41,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// Subscription members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDescription() const;
bool descriptionIsSet() const;
void unsetDescription();
void setDescription(const utility::string_t& value);
void setDescription(const utility::string_t &value);
utility::string_t getImageUrl() const;
bool imageUrlIsSet() const;
void unsetImage_url();
void setImageUrl(const utility::string_t& value);
void setImageUrl(const utility::string_t &value);
std::map<utility::string_t, double> getPrices() const;
bool pricesIsSet() const;
@ -81,15 +79,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -110,11 +107,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_Subscription_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_TokenHintType_H_
#define TRIBUFU_MODELS_TokenHintType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class TokenHintType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class TokenHintType : public ModelBase
{
public:
TokenHintType();
virtual ~TokenHintType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eTokenHintType
{
@ -56,9 +56,9 @@ public:
protected:
eTokenHintType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_TokenHintType_H_ */

View File

@ -23,18 +23,17 @@
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
#include "tribufu++/model/GrantType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class TokenRequest
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class TokenRequest : public ModelBase
{
public:
TokenRequest();
virtual ~TokenRequest();
@ -44,58 +43,57 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// TokenRequest members
std::shared_ptr<GrantType> getGrantType() const;
bool grantTypeIsSet() const;
void unsetGrant_type();
void setGrantType(const std::shared_ptr<GrantType>& value);
void setGrantType(const std::shared_ptr<GrantType> &value);
utility::string_t getCode() const;
bool codeIsSet() const;
void unsetCode();
void setCode(const utility::string_t& value);
void setCode(const utility::string_t &value);
utility::string_t getUsername() const;
bool usernameIsSet() const;
void unsetUsername();
void setUsername(const utility::string_t& value);
void setUsername(const utility::string_t &value);
utility::string_t getPassword() const;
bool passwordIsSet() const;
void unsetPassword();
void setPassword(const utility::string_t& value);
void setPassword(const utility::string_t &value);
utility::string_t getRefreshToken() const;
bool refreshTokenIsSet() const;
void unsetRefresh_token();
void setRefreshToken(const utility::string_t& value);
void setRefreshToken(const utility::string_t &value);
utility::string_t getClientId() const;
bool clientIdIsSet() const;
void unsetClient_id();
void setClientId(const utility::string_t& value);
void setClientId(const utility::string_t &value);
utility::string_t getRedirectUri() const;
bool redirectUriIsSet() const;
void unsetRedirect_uri();
void setRedirectUri(const utility::string_t& value);
void setRedirectUri(const utility::string_t &value);
utility::string_t getCodeVerifier() const;
bool codeVerifierIsSet() const;
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;
bool m_Grant_typeIsSet;
@ -119,11 +117,9 @@ protected:
utility::string_t m_Code_verifier;
bool m_Code_verifierIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_TokenRequest_H_ */

View File

@ -26,15 +26,14 @@
#include "tribufu++/model/TokenType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class TokenResponse
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class TokenResponse : public ModelBase
{
public:
TokenResponse();
virtual ~TokenResponse();
@ -44,48 +43,47 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// TokenResponse members
std::shared_ptr<TokenType> getTokenType() const;
bool tokenTypeIsSet() const;
void unsetToken_type();
void setTokenType(const std::shared_ptr<TokenType>& value);
void setTokenType(const std::shared_ptr<TokenType> &value);
utility::string_t getAccessToken() const;
bool accessTokenIsSet() const;
void unsetAccess_token();
void setAccessToken(const utility::string_t& value);
void setAccessToken(const utility::string_t &value);
utility::string_t getRefreshToken() const;
bool refreshTokenIsSet() const;
void unsetRefresh_token();
void setRefreshToken(const utility::string_t& value);
void setRefreshToken(const utility::string_t &value);
utility::string_t getScope() const;
bool scopeIsSet() const;
void unsetScope();
void setScope(const utility::string_t& value);
void setScope(const utility::string_t &value);
utility::string_t getState() const;
bool stateIsSet() const;
void unsetState();
void setState(const utility::string_t& value);
void setState(const utility::string_t &value);
int64_t getExpiresIn() const;
bool expiresInIsSet() const;
void unsetExpires_in();
void setExpiresIn(int64_t value);
protected:
protected:
std::shared_ptr<TokenType> m_Token_type;
bool m_Token_typeIsSet;
@ -103,11 +101,9 @@ protected:
int64_t m_Expires_in;
bool m_Expires_inIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_TokenResponse_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_TokenType_H_
#define TRIBUFU_MODELS_TokenType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class TokenType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class TokenType : public ModelBase
{
public:
TokenType();
virtual ~TokenType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eTokenType
{
@ -55,9 +55,9 @@ public:
protected:
eTokenType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_TokenType_H_ */

View File

@ -19,20 +19,18 @@
#ifndef TRIBUFU_MODELS_UpdateProfile_H_
#define TRIBUFU_MODELS_UpdateProfile_H_
#include "tribufu++/ModelBase.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class UpdateProfile
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class UpdateProfile : public ModelBase
{
public:
UpdateProfile();
virtual ~UpdateProfile();
@ -42,38 +40,35 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// UpdateProfile members
utility::string_t getDisplayName() const;
bool displayNameIsSet() const;
void unsetDisplay_name();
void setDisplayName(const utility::string_t& value);
void setDisplayName(const utility::string_t &value);
utility::string_t getBiography() const;
bool biographyIsSet() const;
void unsetBiography();
void setBiography(const utility::string_t& value);
void setBiography(const utility::string_t &value);
protected:
protected:
utility::string_t m_Display_name;
bool m_Display_nameIsSet;
utility::string_t m_Biography;
bool m_BiographyIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_UpdateProfile_H_ */

View File

@ -26,15 +26,14 @@
#include "tribufu++/model/UserType.h"
#include <cpprest/details/basic_types.h>
namespace tribufu {
namespace models {
class UserInfo
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class UserInfo : public ModelBase
{
public:
UserInfo();
virtual ~UserInfo();
@ -44,55 +43,55 @@ public:
void validate() override;
web::json::value toJson() const override;
bool fromJson(const web::json::value& json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
bool fromJson(const web::json::value &json) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
/////////////////////////////////////////////
/// UserInfo members
utility::string_t getId() const;
bool idIsSet() const;
void unsetId();
void setId(const utility::string_t& value);
void setId(const utility::string_t &value);
utility::string_t getUuid() const;
bool uuidIsSet() const;
void unsetUuid();
void setUuid(const utility::string_t& value);
void setUuid(const utility::string_t &value);
utility::string_t getName() const;
bool nameIsSet() const;
void unsetName();
void setName(const utility::string_t& value);
void setName(const utility::string_t &value);
utility::string_t getDisplayName() const;
bool displayNameIsSet() const;
void unsetDisplay_name();
void setDisplayName(const utility::string_t& value);
void setDisplayName(const utility::string_t &value);
utility::string_t getEmail() const;
bool emailIsSet() const;
void unsetEmail();
void setEmail(const utility::string_t& value);
void setEmail(const utility::string_t &value);
std::shared_ptr<UserType> getType() const;
bool typeIsSet() const;
void unsetType();
void setType(const std::shared_ptr<UserType>& value);
void setType(const std::shared_ptr<UserType> &value);
utility::string_t getFlags() const;
bool flagsIsSet() const;
void unsetFlags();
void setFlags(const utility::string_t& value);
void setFlags(const utility::string_t &value);
utility::string_t getPermissions() const;
bool permissionsIsSet() const;
void unsetPermissions();
void setPermissions(const utility::string_t& value);
void setPermissions(const utility::string_t &value);
bool isVerified() const;
bool verifiedIsSet() const;
@ -117,7 +116,7 @@ public:
utility::datetime getBirthday() const;
bool birthdayIsSet() const;
void unsetBirthday();
void setBirthday(const utility::datetime& value);
void setBirthday(const utility::datetime &value);
double getPoints() const;
bool pointsIsSet() const;
@ -127,42 +126,42 @@ public:
utility::string_t getLocation() const;
bool locationIsSet() const;
void unsetLocation();
void setLocation(const utility::string_t& value);
void setLocation(const utility::string_t &value);
utility::string_t getLanguage() const;
bool languageIsSet() const;
void unsetLanguage();
void setLanguage(const utility::string_t& value);
void setLanguage(const utility::string_t &value);
utility::string_t getTimezone() const;
bool timezoneIsSet() const;
void unsetTimezone();
void setTimezone(const utility::string_t& value);
void setTimezone(const utility::string_t &value);
utility::string_t getCurrency() const;
bool currencyIsSet() const;
void unsetCurrency();
void setCurrency(const utility::string_t& value);
void setCurrency(const utility::string_t &value);
utility::string_t getPhotoUrl() const;
bool photoUrlIsSet() const;
void unsetPhoto_url();
void setPhotoUrl(const utility::string_t& value);
void setPhotoUrl(const utility::string_t &value);
utility::string_t getBannerUrl() const;
bool bannerUrlIsSet() const;
void unsetBanner_url();
void setBannerUrl(const utility::string_t& value);
void setBannerUrl(const utility::string_t &value);
utility::datetime getLastOnline() const;
bool lastOnlineIsSet() const;
void unsetLast_online();
void setLastOnline(const utility::datetime& value);
void setLastOnline(const utility::datetime &value);
utility::string_t getBiography() const;
bool biographyIsSet() const;
void unsetBiography();
void setBiography(const utility::string_t& value);
void setBiography(const utility::string_t &value);
int32_t getViewCount() const;
bool viewCountIsSet() const;
@ -172,15 +171,14 @@ public:
utility::datetime getCreated() const;
bool createdIsSet() const;
void unsetCreated();
void setCreated(const utility::datetime& value);
void setCreated(const utility::datetime &value);
utility::datetime getUpdated() const;
bool updatedIsSet() const;
void unsetUpdated();
void setUpdated(const utility::datetime& value);
void setUpdated(const utility::datetime &value);
protected:
protected:
utility::string_t m_Id;
bool m_IdIsSet;
@ -255,11 +253,9 @@ protected:
utility::datetime m_Updated;
bool m_UpdatedIsSet;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_UserInfo_H_ */

View File

@ -19,18 +19,16 @@
#ifndef TRIBUFU_MODELS_UserType_H_
#define TRIBUFU_MODELS_UserType_H_
#include "tribufu++/ModelBase.h"
namespace tribufu {
namespace models {
class UserType
: public ModelBase
namespace tribufu
{
public:
namespace models
{
class UserType : public ModelBase
{
public:
UserType();
virtual ~UserType();
@ -40,10 +38,12 @@ public:
void validate() 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;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
void toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) const override;
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &namePrefix) override;
enum class eUserType
{
@ -56,9 +56,9 @@ public:
protected:
eUserType m_value;
};
};
}
}
}
#endif /* TRIBUFU_MODELS_UserType_H_ */

View File

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

View File

@ -12,38 +12,53 @@
#include "tribufu++/AnyType.h"
namespace tribufu {
namespace models {
namespace tribufu
{
namespace models
{
AnyType::AnyType() { m_value = web::json::value::null(); }
AnyType::AnyType()
{
m_value = web::json::value::null();
}
AnyType::~AnyType() {}
AnyType::~AnyType()
{
}
void AnyType::validate() {}
void AnyType::validate()
{
}
web::json::value AnyType::toJson() const { return m_value; }
web::json::value AnyType::toJson() const
{
return m_value;
}
bool AnyType::fromJson(const web::json::value &val) {
bool AnyType::fromJson(const web::json::value &val)
{
m_value = val;
m_IsSet = true;
return isSet();
}
}
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const {
if (m_value.is_object()) {
void AnyType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{
if (m_value.is_object())
{
return Object::toMultipart(multipart, prefix);
}
throw std::runtime_error("AnyType::toMultipart: unsupported type");
}
}
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) {
if (m_value.is_object()) {
bool AnyType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
if (m_value.is_object())
{
return Object::fromMultiPart(multipart, prefix);
}
return false;
}
}
}
}
}

View File

@ -11,102 +11,101 @@
*/
#include "tribufu++/ApiClient.h"
#include "tribufu++/MultipartFormData.h"
#include "tribufu++/ModelBase.h"
#include "tribufu++/MultipartFormData.h"
#include <sstream>
#include <limits>
#include <iomanip>
#include <limits>
#include <sstream>
template <typename T>
utility::string_t toString(const T value)
template <typename T> utility::string_t toString(const T value)
{
utility::ostringstream_t out;
out << std::setprecision(std::numeric_limits<T>::digits10) << std::fixed << value;
return out.str();
}
namespace tribufu {
namespace api {
using namespace tribufu::models;
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration )
: m_Configuration(configuration)
namespace tribufu
{
}
ApiClient::~ApiClient()
{
}
namespace api
{
const ApiClient::ResponseHandlerType& ApiClient::getResponseHandler() const {
using namespace tribufu::models;
ApiClient::ApiClient(std::shared_ptr<const ApiConfiguration> configuration) : m_Configuration(configuration)
{
}
ApiClient::~ApiClient()
{
}
const ApiClient::ResponseHandlerType &ApiClient::getResponseHandler() const
{
return m_ResponseHandler;
}
}
void ApiClient::setResponseHandler(const ResponseHandlerType& responseHandler) {
void ApiClient::setResponseHandler(const ResponseHandlerType &responseHandler)
{
m_ResponseHandler = responseHandler;
}
}
std::shared_ptr<const ApiConfiguration> ApiClient::getConfiguration() const
{
std::shared_ptr<const ApiConfiguration> ApiClient::getConfiguration() const
{
return m_Configuration;
}
void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configuration)
{
}
void ApiClient::setConfiguration(std::shared_ptr<const ApiConfiguration> configuration)
{
m_Configuration = configuration;
}
}
utility::string_t ApiClient::parameterToString(utility::string_t value)
{
utility::string_t ApiClient::parameterToString(utility::string_t value)
{
return value;
}
utility::string_t ApiClient::parameterToString(int64_t value)
{
}
utility::string_t ApiClient::parameterToString(int64_t value)
{
std::stringstream valueAsStringStream;
valueAsStringStream << value;
return utility::conversions::to_string_t(valueAsStringStream.str());
}
utility::string_t ApiClient::parameterToString(int32_t value)
{
}
utility::string_t ApiClient::parameterToString(int32_t value)
{
std::stringstream valueAsStringStream;
valueAsStringStream << value;
return utility::conversions::to_string_t(valueAsStringStream.str());
}
}
utility::string_t ApiClient::parameterToString(float value)
{
utility::string_t ApiClient::parameterToString(float value)
{
return utility::conversions::to_string_t(toString(value));
}
}
utility::string_t ApiClient::parameterToString(double value)
{
utility::string_t ApiClient::parameterToString(double value)
{
return utility::conversions::to_string_t(toString(value));
}
}
utility::string_t ApiClient::parameterToString(const utility::datetime &value)
{
utility::string_t ApiClient::parameterToString(const utility::datetime &value)
{
return utility::conversions::to_string_t(value.to_string(utility::datetime::ISO_8601));
}
}
utility::string_t ApiClient::parameterToString(bool value)
{
utility::string_t ApiClient::parameterToString(bool value)
{
std::stringstream valueAsStringStream;
valueAsStringStream << std::boolalpha << value;
return utility::conversions::to_string_t(valueAsStringStream.str());
}
}
pplx::task<web::http::http_response> ApiClient::callApi(
const utility::string_t& path,
const utility::string_t& method,
const std::map<utility::string_t, utility::string_t>& queryParams,
pplx::task<web::http::http_response> ApiClient::callApi(
const utility::string_t &path, const utility::string_t &method,
const std::map<utility::string_t, utility::string_t> &queryParams,
const std::shared_ptr<IHttpBody> postBody,
const std::map<utility::string_t, utility::string_t>& headerParams,
const std::map<utility::string_t, utility::string_t>& formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>>& fileParams,
const utility::string_t& contentType
) const
{
const std::map<utility::string_t, utility::string_t> &headerParams,
const std::map<utility::string_t, utility::string_t> &formParams,
const std::map<utility::string_t, std::shared_ptr<HttpContent>> &fileParams,
const utility::string_t &contentType) const
{
if (postBody != nullptr && formParams.size() != 0)
{
throw ApiException(400, utility::conversions::to_string_t("Cannot have body and form params"));
@ -119,13 +118,14 @@ pplx::task<web::http::http_response> ApiClient::callApi(
if (fileParams.size() > 0 && contentType != utility::conversions::to_string_t("multipart/form-data"))
{
throw ApiException(400, utility::conversions::to_string_t("Operations with file parameters must be called with multipart/form-data"));
throw ApiException(400, utility::conversions::to_string_t(
"Operations with file parameters must be called with multipart/form-data"));
}
web::http::client::http_client client(m_Configuration->getBaseUrl(), m_Configuration->getHttpConfig());
web::http::http_request request;
for (const auto& kvp : headerParams)
for (const auto &kvp : headerParams)
{
request.headers().add(kvp.first, kvp.second);
}
@ -133,11 +133,11 @@ pplx::task<web::http::http_response> ApiClient::callApi(
if (fileParams.size() > 0)
{
MultipartFormData uploadData;
for (const auto& kvp : formParams)
for (const auto &kvp : formParams)
{
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
}
for (const auto& kvp : fileParams)
for (const auto &kvp : fileParams)
{
uploadData.add(ModelBase::toHttpContent(kvp.first, kvp.second));
}
@ -145,7 +145,9 @@ pplx::task<web::http::http_response> ApiClient::callApi(
uploadData.writeTo(data);
auto bodyString = data.str();
const auto length = bodyString.size();
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, utility::conversions::to_string_t("multipart/form-data; boundary=") + uploadData.getBoundary());
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length,
utility::conversions::to_string_t("multipart/form-data; boundary=") +
uploadData.getBoundary());
}
else
{
@ -155,14 +157,15 @@ pplx::task<web::http::http_response> ApiClient::callApi(
postBody->writeTo(data);
auto bodyString = data.str();
const auto length = bodyString.size();
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length, contentType);
request.set_body(concurrency::streams::bytestream::open_istream(std::move(bodyString)), length,
contentType);
}
else
{
if (contentType == utility::conversions::to_string_t("application/json"))
{
web::json::value body_data = web::json::value::object();
for (auto& kvp : formParams)
for (auto &kvp : formParams)
{
body_data[kvp.first] = ModelBase::toJson(kvp.second);
}
@ -174,32 +177,33 @@ pplx::task<web::http::http_response> ApiClient::callApi(
else
{
web::http::uri_builder formData;
for (const auto& kvp : formParams)
for (const auto &kvp : formParams)
{
formData.append_query(kvp.first, kvp.second);
}
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"));
}
}
}
}
web::http::uri_builder builder(path);
for (const auto& kvp : queryParams)
for (const auto &kvp : queryParams)
{
builder.append_query(kvp.first, kvp.second);
}
request.set_request_uri(builder.to_uri());
request.set_method(method);
if ( !request.headers().has( web::http::header_names::user_agent ) )
if (!request.headers().has(web::http::header_names::user_agent))
{
request.headers().add( web::http::header_names::user_agent, m_Configuration->getUserAgent() );
request.headers().add(web::http::header_names::user_agent, m_Configuration->getUserAgent());
}
return client.request(request);
}
}
}
}
}

View File

@ -12,71 +12,73 @@
#include "tribufu++/ApiConfiguration.h"
namespace tribufu {
namespace api {
ApiConfiguration::ApiConfiguration()
namespace tribufu
{
}
namespace api
{
ApiConfiguration::~ApiConfiguration()
{
}
ApiConfiguration::ApiConfiguration()
{
}
const web::http::client::http_client_config& ApiConfiguration::getHttpConfig() const
{
ApiConfiguration::~ApiConfiguration()
{
}
const web::http::client::http_client_config &ApiConfiguration::getHttpConfig() const
{
return m_HttpConfig;
}
}
void ApiConfiguration::setHttpConfig( web::http::client::http_client_config& value )
{
void ApiConfiguration::setHttpConfig(web::http::client::http_client_config &value)
{
m_HttpConfig = value;
}
}
utility::string_t ApiConfiguration::getBaseUrl() const
{
utility::string_t ApiConfiguration::getBaseUrl() const
{
return m_BaseUrl;
}
}
void ApiConfiguration::setBaseUrl( const utility::string_t value )
{
void ApiConfiguration::setBaseUrl(const utility::string_t value)
{
m_BaseUrl = value;
}
}
utility::string_t ApiConfiguration::getUserAgent() const
{
utility::string_t ApiConfiguration::getUserAgent() const
{
return m_UserAgent;
}
}
void ApiConfiguration::setUserAgent( const utility::string_t value )
{
void ApiConfiguration::setUserAgent(const utility::string_t value)
{
m_UserAgent = value;
}
}
std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHeaders()
{
std::map<utility::string_t, utility::string_t> &ApiConfiguration::getDefaultHeaders()
{
return m_DefaultHeaders;
}
}
const std::map<utility::string_t, utility::string_t>& ApiConfiguration::getDefaultHeaders() const
{
const std::map<utility::string_t, utility::string_t> &ApiConfiguration::getDefaultHeaders() const
{
return m_DefaultHeaders;
}
}
utility::string_t ApiConfiguration::getApiKey( const utility::string_t& prefix) const
{
utility::string_t ApiConfiguration::getApiKey(const utility::string_t &prefix) const
{
auto result = m_ApiKeys.find(prefix);
if( result != m_ApiKeys.end() )
if (result != m_ApiKeys.end())
{
return result->second;
}
return utility::conversions::to_string_t("");
}
}
void ApiConfiguration::setApiKey( const utility::string_t& prefix, const utility::string_t& apiKey )
{
void ApiConfiguration::setApiKey(const utility::string_t &prefix, const utility::string_t &apiKey)
{
m_ApiKeys[prefix] = apiKey;
}
}
}
}
}

View File

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

View File

@ -12,72 +12,74 @@
#include "tribufu++/HttpContent.h"
namespace tribufu {
namespace models {
HttpContent::HttpContent()
namespace tribufu
{
}
namespace models
{
HttpContent::~HttpContent()
{
}
HttpContent::HttpContent()
{
}
utility::string_t HttpContent::getContentDisposition() const
{
HttpContent::~HttpContent()
{
}
utility::string_t HttpContent::getContentDisposition() const
{
return m_ContentDisposition;
}
}
void HttpContent::setContentDisposition( const utility::string_t & value )
{
void HttpContent::setContentDisposition(const utility::string_t &value)
{
m_ContentDisposition = value;
}
}
utility::string_t HttpContent::getName() const
{
utility::string_t HttpContent::getName() const
{
return m_Name;
}
}
void HttpContent::setName( const utility::string_t & value )
{
void HttpContent::setName(const utility::string_t &value)
{
m_Name = value;
}
}
utility::string_t HttpContent::getFileName() const
{
utility::string_t HttpContent::getFileName() const
{
return m_FileName;
}
}
void HttpContent::setFileName( const utility::string_t & value )
{
void HttpContent::setFileName(const utility::string_t &value)
{
m_FileName = value;
}
}
utility::string_t HttpContent::getContentType() const
{
utility::string_t HttpContent::getContentType() const
{
return m_ContentType;
}
}
void HttpContent::setContentType( const utility::string_t & value )
{
void HttpContent::setContentType(const utility::string_t &value)
{
m_ContentType = value;
}
}
std::shared_ptr<std::istream> HttpContent::getData() const
{
std::shared_ptr<std::istream> HttpContent::getData() const
{
return m_Data;
}
}
void HttpContent::setData( std::shared_ptr<std::istream> value )
{
void HttpContent::setData(std::shared_ptr<std::istream> value)
{
m_Data = value;
}
}
void HttpContent::writeTo( std::ostream& stream )
{
m_Data->seekg( 0, m_Data->beg );
void HttpContent::writeTo(std::ostream &stream)
{
m_Data->seekg(0, m_Data->beg);
stream << m_Data->rdbuf();
}
}
}
}
}

View File

@ -12,22 +12,23 @@
#include "tribufu++/JsonBody.h"
namespace tribufu {
namespace models {
JsonBody::JsonBody( const web::json::value& json)
: m_Json(json)
namespace tribufu
{
}
namespace models
{
JsonBody::~JsonBody()
{
}
JsonBody::JsonBody(const web::json::value &json) : m_Json(json)
{
}
void JsonBody::writeTo( std::ostream& target )
{
JsonBody::~JsonBody()
{
}
void JsonBody::writeTo(std::ostream &target)
{
m_Json.serialize(target);
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -16,76 +16,79 @@
#include <boost/uuid/random_generator.hpp>
#include <boost/uuid/uuid_io.hpp>
namespace tribufu {
namespace models {
MultipartFormData::MultipartFormData()
namespace tribufu
{
namespace models
{
MultipartFormData::MultipartFormData()
{
utility::stringstream_t uuidString;
uuidString << boost::uuids::random_generator()();
m_Boundary = uuidString.str();
}
}
MultipartFormData::MultipartFormData(const utility::string_t& boundary)
: m_Boundary(boundary)
{
MultipartFormData::MultipartFormData(const utility::string_t &boundary) : m_Boundary(boundary)
{
}
}
MultipartFormData::~MultipartFormData()
{
}
MultipartFormData::~MultipartFormData()
{
}
utility::string_t MultipartFormData::getBoundary()
{
utility::string_t MultipartFormData::getBoundary()
{
return m_Boundary;
}
}
void MultipartFormData::add( std::shared_ptr<HttpContent> content )
{
m_Contents.push_back( content );
void MultipartFormData::add(std::shared_ptr<HttpContent> content)
{
m_Contents.push_back(content);
m_ContentLookup[content->getName()] = content;
}
}
bool MultipartFormData::hasContent(const utility::string_t& name) const
{
bool MultipartFormData::hasContent(const utility::string_t &name) const
{
return m_ContentLookup.find(name) != m_ContentLookup.end();
}
}
std::shared_ptr<HttpContent> MultipartFormData::getContent(const utility::string_t& name) const
{
std::shared_ptr<HttpContent> MultipartFormData::getContent(const utility::string_t &name) const
{
auto result = m_ContentLookup.find(name);
if(result == m_ContentLookup.end())
if (result == m_ContentLookup.end())
{
return std::shared_ptr<HttpContent>(nullptr);
}
return result->second;
}
}
void MultipartFormData::writeTo( std::ostream& target )
{
for ( size_t i = 0; i < m_Contents.size(); i++ )
void MultipartFormData::writeTo(std::ostream &target)
{
for (size_t i = 0; i < m_Contents.size(); i++)
{
std::shared_ptr<HttpContent> content = m_Contents[i];
// boundary
target << "\r\n" << "--" << utility::conversions::to_utf8string( m_Boundary ) << "\r\n";
target << "\r\n"
<< "--" << utility::conversions::to_utf8string(m_Boundary) << "\r\n";
// headers
target << "Content-Disposition: " << utility::conversions::to_utf8string( content->getContentDisposition() );
if ( content->getName().size() > 0 )
target << "Content-Disposition: "
<< utility::conversions::to_utf8string(content->getContentDisposition());
if (content->getName().size() > 0)
{
target << "; name=\"" << utility::conversions::to_utf8string( content->getName() ) << "\"";
target << "; name=\"" << utility::conversions::to_utf8string(content->getName()) << "\"";
}
if ( content->getFileName().size() > 0 )
if (content->getFileName().size() > 0)
{
target << "; filename=\"" << utility::conversions::to_utf8string( content->getFileName() ) << "\"";
target << "; filename=\"" << utility::conversions::to_utf8string(content->getFileName()) << "\"";
}
target << "\r\n";
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";
@ -93,17 +96,17 @@ void MultipartFormData::writeTo( std::ostream& target )
// body
std::shared_ptr<std::istream> data = content->getData();
data->seekg( 0, data->end );
std::vector<char> dataBytes( data->tellg() );
data->seekg(0, data->end);
std::vector<char> dataBytes(data->tellg());
data->seekg( 0, data->beg );
data->read( &dataBytes[0], dataBytes.size() );
data->seekg(0, data->beg);
data->read(&dataBytes[0], dataBytes.size());
std::copy( dataBytes.begin(), dataBytes.end(), std::ostreambuf_iterator<char>( target ) );
std::copy(dataBytes.begin(), dataBytes.end(), std::ostreambuf_iterator<char>(target));
}
target << "\r\n--" << utility::conversions::to_utf8string( m_Boundary ) << "--\r\n";
}
target << "\r\n--" << utility::conversions::to_utf8string(m_Boundary) << "--\r\n";
}
}
}
}

View File

@ -12,77 +12,81 @@
#include "tribufu++/Object.h"
namespace tribufu {
namespace models {
Object::Object()
namespace tribufu
{
namespace models
{
Object::Object()
{
m_object = web::json::value::object();
}
}
Object::~Object()
{
}
Object::~Object()
{
}
void Object::validate()
{
void Object::validate()
{
}
}
web::json::value Object::toJson() const
{
web::json::value Object::toJson() const
{
return m_object;
}
}
bool Object::fromJson(const web::json::value& val)
{
bool Object::fromJson(const web::json::value &val)
{
if (val.is_object())
{
m_object = val;
m_IsSet = true;
}
return isSet();
}
}
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;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
{
namePrefix += utility::conversions::to_string_t(".");
}
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object));
}
multipart->add(
ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t("object"), m_object));
}
bool Object::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool Object::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t("."))
{
namePrefix += utility::conversions::to_string_t(".");
}
if( ModelBase::fromHttpContent(multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object ) )
if (ModelBase::fromHttpContent(
multipart->getContent(namePrefix + utility::conversions::to_string_t("object")), m_object))
{
m_IsSet = true;
}
return isSet();
}
}
web::json::value Object::getValue(const utility::string_t& key) const
{
web::json::value Object::getValue(const utility::string_t &key) const
{
return m_object.at(key);
}
}
void Object::setValue(const utility::string_t& key, const web::json::value& value)
{
if( !value.is_null() )
void Object::setValue(const utility::string_t &key, const web::json::value &value)
{
if (!value.is_null())
{
m_object[key] = value;
m_IsSet = true;
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/Account.h"
namespace tribufu {
namespace models {
Account::Account()
namespace tribufu
{
namespace models
{
Account::Account()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Name = utility::conversions::to_string_t("");
@ -33,429 +33,428 @@ Account::Account()
m_CreatedIsSet = false;
m_Updated = utility::datetime();
m_UpdatedIsSet = false;
}
}
Account::~Account()
{
}
Account::~Account()
{
}
void Account::validate()
{
void Account::validate()
{
// TODO: implement validation
}
}
web::json::value Account::toJson() const
{
web::json::value Account::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_ProviderIsSet)
if (m_ProviderIsSet)
{
val[utility::conversions::to_string_t(U("provider"))] = ModelBase::toJson(m_Provider);
}
if(m_User_idIsSet)
if (m_User_idIsSet)
{
val[utility::conversions::to_string_t(U("user_id"))] = ModelBase::toJson(m_User_id);
}
if(m_AuthorizedIsSet)
if (m_AuthorizedIsSet)
{
val[utility::conversions::to_string_t(U("authorized"))] = ModelBase::toJson(m_Authorized);
}
if(m_FieldsIsSet)
if (m_FieldsIsSet)
{
val[utility::conversions::to_string_t(U("fields"))] = ModelBase::toJson(m_Fields);
}
if(m_CreatedIsSet)
if (m_CreatedIsSet)
{
val[utility::conversions::to_string_t(U("created"))] = ModelBase::toJson(m_Created);
}
if(m_UpdatedIsSet)
if (m_UpdatedIsSet)
{
val[utility::conversions::to_string_t(U("updated"))] = ModelBase::toJson(m_Updated);
}
return val;
}
}
bool Account::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool Account::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("provider"))))
if (val.has_field(utility::conversions::to_string_t(U("provider"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("provider")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("provider")));
if (!fieldValue.is_null())
{
std::shared_ptr<LoginProvider> refVal_setProvider;
ok &= ModelBase::fromJson(fieldValue, refVal_setProvider);
setProvider(refVal_setProvider);
}
}
if(val.has_field(utility::conversions::to_string_t(U("user_id"))))
if (val.has_field(utility::conversions::to_string_t(U("user_id"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("user_id")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("user_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setUserId;
ok &= ModelBase::fromJson(fieldValue, refVal_setUserId);
setUserId(refVal_setUserId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("authorized"))))
if (val.has_field(utility::conversions::to_string_t(U("authorized"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("authorized")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("authorized")));
if (!fieldValue.is_null())
{
bool refVal_setAuthorized;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("fields")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("fields")));
if (!fieldValue.is_null())
{
std::shared_ptr<AnyType> refVal_setFields;
ok &= ModelBase::fromJson(fieldValue, refVal_setFields);
setFields(refVal_setFields);
}
}
if(val.has_field(utility::conversions::to_string_t(U("created"))))
if (val.has_field(utility::conversions::to_string_t(U("created"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
}
return ok;
}
}
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;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool Account::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool Account::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("provider"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("provider"))))
{
std::shared_ptr<LoginProvider> refVal_setProvider;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("provider"))), refVal_setProvider );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("provider"))), refVal_setProvider);
setProvider(refVal_setProvider);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("user_id"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("user_id"))))
{
utility::string_t refVal_setUserId;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_id"))), refVal_setUserId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user_id"))),
refVal_setUserId);
setUserId(refVal_setUserId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("authorized"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("authorized"))))
{
bool refVal_setAuthorized;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("authorized"))), refVal_setAuthorized );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("authorized"))), refVal_setAuthorized);
setAuthorized(refVal_setAuthorized);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("fields"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("fields"))))
{
std::shared_ptr<AnyType> refVal_setFields;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fields"))), refVal_setFields );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("fields"))),
refVal_setFields);
setFields(refVal_setFields);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("created"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
refVal_setCreated);
setCreated(refVal_setCreated);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
return ok;
}
}
utility::string_t Account::getId() const
{
utility::string_t Account::getId() const
{
return m_Id;
}
}
void Account::setId(const utility::string_t& value)
{
void Account::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool Account::idIsSet() const
{
bool Account::idIsSet() const
{
return m_IdIsSet;
}
}
void Account::unsetId()
{
void Account::unsetId()
{
m_IdIsSet = false;
}
utility::string_t Account::getName() const
{
}
utility::string_t Account::getName() const
{
return m_Name;
}
}
void Account::setName(const utility::string_t& value)
{
void Account::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool Account::nameIsSet() const
{
bool Account::nameIsSet() const
{
return m_NameIsSet;
}
}
void Account::unsetName()
{
void Account::unsetName()
{
m_NameIsSet = false;
}
std::shared_ptr<LoginProvider> Account::getProvider() const
{
}
std::shared_ptr<LoginProvider> Account::getProvider() const
{
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_ProviderIsSet = true;
}
}
bool Account::providerIsSet() const
{
bool Account::providerIsSet() const
{
return m_ProviderIsSet;
}
}
void Account::unsetProvider()
{
void Account::unsetProvider()
{
m_ProviderIsSet = false;
}
utility::string_t Account::getUserId() const
{
}
utility::string_t Account::getUserId() const
{
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_idIsSet = true;
}
}
bool Account::userIdIsSet() const
{
bool Account::userIdIsSet() const
{
return m_User_idIsSet;
}
}
void Account::unsetUser_id()
{
void Account::unsetUser_id()
{
m_User_idIsSet = false;
}
bool Account::isAuthorized() const
{
}
bool Account::isAuthorized() const
{
return m_Authorized;
}
}
void Account::setAuthorized(bool value)
{
void Account::setAuthorized(bool value)
{
m_Authorized = value;
m_AuthorizedIsSet = true;
}
}
bool Account::authorizedIsSet() const
{
bool Account::authorizedIsSet() const
{
return m_AuthorizedIsSet;
}
}
void Account::unsetAuthorized()
{
void Account::unsetAuthorized()
{
m_AuthorizedIsSet = false;
}
std::shared_ptr<AnyType> Account::getFields() const
{
}
std::shared_ptr<AnyType> Account::getFields() const
{
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_FieldsIsSet = true;
}
}
bool Account::fieldsIsSet() const
{
bool Account::fieldsIsSet() const
{
return m_FieldsIsSet;
}
}
void Account::unsetFields()
{
void Account::unsetFields()
{
m_FieldsIsSet = false;
}
utility::datetime Account::getCreated() const
{
}
utility::datetime Account::getCreated() const
{
return m_Created;
}
}
void Account::setCreated(const utility::datetime& value)
{
void Account::setCreated(const utility::datetime &value)
{
m_Created = value;
m_CreatedIsSet = true;
}
}
bool Account::createdIsSet() const
{
bool Account::createdIsSet() const
{
return m_CreatedIsSet;
}
}
void Account::unsetCreated()
{
void Account::unsetCreated()
{
m_CreatedIsSet = false;
}
utility::datetime Account::getUpdated() const
{
}
utility::datetime Account::getUpdated() const
{
return m_Updated;
}
}
void Account::setUpdated(const utility::datetime& value)
{
void Account::setUpdated(const utility::datetime &value)
{
m_Updated = value;
m_UpdatedIsSet = true;
}
}
bool Account::updatedIsSet() const
{
bool Account::updatedIsSet() const
{
return m_UpdatedIsSet;
}
}
void Account::unsetUpdated()
{
void Account::unsetUpdated()
{
m_UpdatedIsSet = false;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,28 +10,28 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ApplicationType.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
ApplicationType::eApplicationType toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
ApplicationType::eApplicationType toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("application")))
return ApplicationType::eApplicationType::ApplicationType_APPLICATION;
if (val == utility::conversions::to_string_t(U("game")))
return ApplicationType::eApplicationType::ApplicationType_GAME;
return {};
}
}
EnumUnderlyingType fromEnum(ApplicationType::eApplicationType e)
{
EnumUnderlyingType fromEnum(ApplicationType::eApplicationType e)
{
switch (e)
{
case ApplicationType::eApplicationType::ApplicationType_APPLICATION:
@ -42,36 +42,37 @@ EnumUnderlyingType fromEnum(ApplicationType::eApplicationType e)
break;
}
return {};
}
}
}
}
ApplicationType::ApplicationType()
{
}
ApplicationType::ApplicationType()
{
}
ApplicationType::~ApplicationType()
{
}
ApplicationType::~ApplicationType()
{
}
void ApplicationType::validate()
{
void ApplicationType::validate()
{
// TODO: implement validation
}
}
web::json::value ApplicationType::toJson() const
{
web::json::value ApplicationType::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool ApplicationType::fromJson(const web::json::value& val)
{
bool ApplicationType::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -80,10 +81,11 @@ void ApplicationType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool ApplicationType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ApplicationType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -100,19 +102,17 @@ bool ApplicationType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart
}
}
return ok;
}
}
ApplicationType::eApplicationType ApplicationType::getValue() const
{
ApplicationType::eApplicationType ApplicationType::getValue() const
{
return m_value;
}
}
void ApplicationType::setValue(ApplicationType::eApplicationType const value)
{
void ApplicationType::setValue(ApplicationType::eApplicationType const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/AuthorizeRequest.h"
namespace tribufu {
namespace models {
AuthorizeRequest::AuthorizeRequest()
namespace tribufu
{
namespace models
{
AuthorizeRequest::AuthorizeRequest()
{
m_Response_typeIsSet = false;
m_Client_id = utility::conversions::to_string_t("");
m_Client_idIsSet = false;
@ -31,383 +31,390 @@ AuthorizeRequest::AuthorizeRequest()
m_ScopeIsSet = false;
m_State = utility::conversions::to_string_t("");
m_StateIsSet = false;
}
}
AuthorizeRequest::~AuthorizeRequest()
{
}
AuthorizeRequest::~AuthorizeRequest()
{
}
void AuthorizeRequest::validate()
{
void AuthorizeRequest::validate()
{
// TODO: implement validation
}
}
web::json::value AuthorizeRequest::toJson() const
{
web::json::value AuthorizeRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_Response_typeIsSet)
if (m_Response_typeIsSet)
{
val[utility::conversions::to_string_t(U("response_type"))] = ModelBase::toJson(m_Response_type);
}
if(m_Client_idIsSet)
if (m_Client_idIsSet)
{
val[utility::conversions::to_string_t(U("client_id"))] = ModelBase::toJson(m_Client_id);
}
if(m_Code_challengeIsSet)
if (m_Code_challengeIsSet)
{
val[utility::conversions::to_string_t(U("code_challenge"))] = ModelBase::toJson(m_Code_challenge);
}
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)
{
val[utility::conversions::to_string_t(U("redirect_uri"))] = ModelBase::toJson(m_Redirect_uri);
}
if(m_ScopeIsSet)
if (m_ScopeIsSet)
{
val[utility::conversions::to_string_t(U("scope"))] = ModelBase::toJson(m_Scope);
}
if(m_StateIsSet)
if (m_StateIsSet)
{
val[utility::conversions::to_string_t(U("state"))] = ModelBase::toJson(m_State);
}
return val;
}
}
bool AuthorizeRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("response_type"))))
bool AuthorizeRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("response_type")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("response_type"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("response_type")));
if (!fieldValue.is_null())
{
std::shared_ptr<ResponseType> refVal_setResponseType;
ok &= ModelBase::fromJson(fieldValue, refVal_setResponseType);
setResponseType(refVal_setResponseType);
}
}
if(val.has_field(utility::conversions::to_string_t(U("client_id"))))
if (val.has_field(utility::conversions::to_string_t(U("client_id"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("client_id")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("client_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setClientId;
ok &= ModelBase::fromJson(fieldValue, refVal_setClientId);
setClientId(refVal_setClientId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("code_challenge"))))
if (val.has_field(utility::conversions::to_string_t(U("code_challenge"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("code_challenge")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("code_challenge")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setCodeChallenge;
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallenge);
setCodeChallenge(refVal_setCodeChallenge);
}
}
if(val.has_field(utility::conversions::to_string_t(U("code_challenge_method"))))
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")));
if(!fieldValue.is_null())
const web::json::value &fieldValue =
val.at(utility::conversions::to_string_t(U("code_challenge_method")));
if (!fieldValue.is_null())
{
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod;
ok &= ModelBase::fromJson(fieldValue, refVal_setCodeChallengeMethod);
setCodeChallengeMethod(refVal_setCodeChallengeMethod);
}
}
if(val.has_field(utility::conversions::to_string_t(U("redirect_uri"))))
if (val.has_field(utility::conversions::to_string_t(U("redirect_uri"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("redirect_uri")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("redirect_uri")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setRedirectUri;
ok &= ModelBase::fromJson(fieldValue, refVal_setRedirectUri);
setRedirectUri(refVal_setRedirectUri);
}
}
if(val.has_field(utility::conversions::to_string_t(U("scope"))))
if (val.has_field(utility::conversions::to_string_t(U("scope"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("scope")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("scope")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setScope;
ok &= ModelBase::fromJson(fieldValue, refVal_setScope);
setScope(refVal_setScope);
}
}
if(val.has_field(utility::conversions::to_string_t(U("state"))))
if (val.has_field(utility::conversions::to_string_t(U("state"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("state")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("state")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setState;
ok &= ModelBase::fromJson(fieldValue, refVal_setState);
setState(refVal_setState);
}
}
return ok;
}
}
void AuthorizeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void AuthorizeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_Response_typeIsSet)
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;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("response_type"))), refVal_setResponseType );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("response_type"))),
refVal_setResponseType);
setResponseType(refVal_setResponseType);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("client_id"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("client_id"))))
{
utility::string_t refVal_setClientId;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("client_id"))), refVal_setClientId );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("client_id"))), refVal_setClientId);
setClientId(refVal_setClientId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("code_challenge"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge"))))
{
utility::string_t refVal_setCodeChallenge;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code_challenge"))), refVal_setCodeChallenge );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("code_challenge"))),
refVal_setCodeChallenge);
setCodeChallenge(refVal_setCodeChallenge);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("code_challenge_method"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("code_challenge_method"))))
{
std::shared_ptr<CodeChallengeMethod> refVal_setCodeChallengeMethod;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code_challenge_method"))), refVal_setCodeChallengeMethod );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("code_challenge_method"))),
refVal_setCodeChallengeMethod);
setCodeChallengeMethod(refVal_setCodeChallengeMethod);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("redirect_uri"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("redirect_uri"))))
{
utility::string_t refVal_setRedirectUri;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("redirect_uri"))), refVal_setRedirectUri );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("redirect_uri"))), refVal_setRedirectUri);
setRedirectUri(refVal_setRedirectUri);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("scope"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("scope"))))
{
utility::string_t refVal_setScope;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("scope"))), refVal_setScope );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("scope"))),
refVal_setScope);
setScope(refVal_setScope);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("state"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("state"))))
{
utility::string_t refVal_setState;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("state"))), refVal_setState );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("state"))),
refVal_setState);
setState(refVal_setState);
}
return ok;
}
}
std::shared_ptr<ResponseType> AuthorizeRequest::getResponseType() const
{
std::shared_ptr<ResponseType> AuthorizeRequest::getResponseType() const
{
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_typeIsSet = true;
}
}
bool AuthorizeRequest::responseTypeIsSet() const
{
bool AuthorizeRequest::responseTypeIsSet() const
{
return m_Response_typeIsSet;
}
}
void AuthorizeRequest::unsetResponse_type()
{
void AuthorizeRequest::unsetResponse_type()
{
m_Response_typeIsSet = false;
}
utility::string_t AuthorizeRequest::getClientId() const
{
}
utility::string_t AuthorizeRequest::getClientId() const
{
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_idIsSet = true;
}
}
bool AuthorizeRequest::clientIdIsSet() const
{
bool AuthorizeRequest::clientIdIsSet() const
{
return m_Client_idIsSet;
}
}
void AuthorizeRequest::unsetClient_id()
{
void AuthorizeRequest::unsetClient_id()
{
m_Client_idIsSet = false;
}
utility::string_t AuthorizeRequest::getCodeChallenge() const
{
}
utility::string_t AuthorizeRequest::getCodeChallenge() const
{
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_challengeIsSet = true;
}
}
bool AuthorizeRequest::codeChallengeIsSet() const
{
bool AuthorizeRequest::codeChallengeIsSet() const
{
return m_Code_challengeIsSet;
}
}
void AuthorizeRequest::unsetCode_challenge()
{
void AuthorizeRequest::unsetCode_challenge()
{
m_Code_challengeIsSet = false;
}
std::shared_ptr<CodeChallengeMethod> AuthorizeRequest::getCodeChallengeMethod() const
{
}
std::shared_ptr<CodeChallengeMethod> AuthorizeRequest::getCodeChallengeMethod() const
{
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_methodIsSet = true;
}
}
bool AuthorizeRequest::codeChallengeMethodIsSet() const
{
bool AuthorizeRequest::codeChallengeMethodIsSet() const
{
return m_Code_challenge_methodIsSet;
}
}
void AuthorizeRequest::unsetCode_challenge_method()
{
void AuthorizeRequest::unsetCode_challenge_method()
{
m_Code_challenge_methodIsSet = false;
}
utility::string_t AuthorizeRequest::getRedirectUri() const
{
}
utility::string_t AuthorizeRequest::getRedirectUri() const
{
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_uriIsSet = true;
}
}
bool AuthorizeRequest::redirectUriIsSet() const
{
bool AuthorizeRequest::redirectUriIsSet() const
{
return m_Redirect_uriIsSet;
}
}
void AuthorizeRequest::unsetRedirect_uri()
{
void AuthorizeRequest::unsetRedirect_uri()
{
m_Redirect_uriIsSet = false;
}
utility::string_t AuthorizeRequest::getScope() const
{
}
utility::string_t AuthorizeRequest::getScope() const
{
return m_Scope;
}
}
void AuthorizeRequest::setScope(const utility::string_t& value)
{
void AuthorizeRequest::setScope(const utility::string_t &value)
{
m_Scope = value;
m_ScopeIsSet = true;
}
}
bool AuthorizeRequest::scopeIsSet() const
{
bool AuthorizeRequest::scopeIsSet() const
{
return m_ScopeIsSet;
}
}
void AuthorizeRequest::unsetScope()
{
void AuthorizeRequest::unsetScope()
{
m_ScopeIsSet = false;
}
utility::string_t AuthorizeRequest::getState() const
{
}
utility::string_t AuthorizeRequest::getState() const
{
return m_State;
}
}
void AuthorizeRequest::setState(const utility::string_t& value)
{
void AuthorizeRequest::setState(const utility::string_t &value)
{
m_State = value;
m_StateIsSet = true;
}
}
bool AuthorizeRequest::stateIsSet() const
{
bool AuthorizeRequest::stateIsSet() const
{
return m_StateIsSet;
}
}
void AuthorizeRequest::unsetState()
{
void AuthorizeRequest::unsetState()
{
m_StateIsSet = false;
}
}
}
}
}

View File

@ -10,28 +10,28 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/CodeChallengeMethod.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
CodeChallengeMethod::eCodeChallengeMethod toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
CodeChallengeMethod::eCodeChallengeMethod toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("plain")))
return CodeChallengeMethod::eCodeChallengeMethod::CodeChallengeMethod_PLAIN;
if (val == utility::conversions::to_string_t(U("S256")))
return CodeChallengeMethod::eCodeChallengeMethod::CodeChallengeMethod_S256;
return {};
}
}
EnumUnderlyingType fromEnum(CodeChallengeMethod::eCodeChallengeMethod e)
{
EnumUnderlyingType fromEnum(CodeChallengeMethod::eCodeChallengeMethod e)
{
switch (e)
{
case CodeChallengeMethod::eCodeChallengeMethod::CodeChallengeMethod_PLAIN:
@ -42,36 +42,37 @@ EnumUnderlyingType fromEnum(CodeChallengeMethod::eCodeChallengeMethod e)
break;
}
return {};
}
}
}
}
CodeChallengeMethod::CodeChallengeMethod()
{
}
CodeChallengeMethod::CodeChallengeMethod()
{
}
CodeChallengeMethod::~CodeChallengeMethod()
{
}
CodeChallengeMethod::~CodeChallengeMethod()
{
}
void CodeChallengeMethod::validate()
{
void CodeChallengeMethod::validate()
{
// TODO: implement validation
}
}
web::json::value CodeChallengeMethod::toJson() const
{
web::json::value CodeChallengeMethod::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool CodeChallengeMethod::fromJson(const web::json::value& val)
{
bool CodeChallengeMethod::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -80,10 +81,11 @@ void CodeChallengeMethod::toMultipart(std::shared_ptr<MultipartFormData> multipa
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool CodeChallengeMethod::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool CodeChallengeMethod::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -100,19 +102,17 @@ bool CodeChallengeMethod::fromMultiPart(std::shared_ptr<MultipartFormData> multi
}
}
return ok;
}
}
CodeChallengeMethod::eCodeChallengeMethod CodeChallengeMethod::getValue() const
{
CodeChallengeMethod::eCodeChallengeMethod CodeChallengeMethod::getValue() const
{
return m_value;
}
}
void CodeChallengeMethod::setValue(CodeChallengeMethod::eCodeChallengeMethod const value)
{
void CodeChallengeMethod::setValue(CodeChallengeMethod::eCodeChallengeMethod const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,161 +10,162 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/CryptoViewModel.h"
namespace tribufu {
namespace models {
CryptoViewModel::CryptoViewModel()
namespace tribufu
{
namespace models
{
CryptoViewModel::CryptoViewModel()
{
m_Encoded = utility::conversions::to_string_t("");
m_EncodedIsSet = false;
m_Decoded = utility::conversions::to_string_t("");
m_DecodedIsSet = false;
}
}
CryptoViewModel::~CryptoViewModel()
{
}
CryptoViewModel::~CryptoViewModel()
{
}
void CryptoViewModel::validate()
{
void CryptoViewModel::validate()
{
// TODO: implement validation
}
}
web::json::value CryptoViewModel::toJson() const
{
web::json::value CryptoViewModel::toJson() const
{
web::json::value val = web::json::value::object();
if(m_EncodedIsSet)
if (m_EncodedIsSet)
{
val[utility::conversions::to_string_t(U("encoded"))] = ModelBase::toJson(m_Encoded);
}
if(m_DecodedIsSet)
if (m_DecodedIsSet)
{
val[utility::conversions::to_string_t(U("decoded"))] = ModelBase::toJson(m_Decoded);
}
return val;
}
}
bool CryptoViewModel::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("encoded"))))
bool CryptoViewModel::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("encoded")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("encoded"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("encoded")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setEncoded;
ok &= ModelBase::fromJson(fieldValue, refVal_setEncoded);
setEncoded(refVal_setEncoded);
}
}
if(val.has_field(utility::conversions::to_string_t(U("decoded"))))
if (val.has_field(utility::conversions::to_string_t(U("decoded"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("decoded")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("decoded")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setDecoded;
ok &= ModelBase::fromJson(fieldValue, refVal_setDecoded);
setDecoded(refVal_setDecoded);
}
}
return ok;
}
}
void CryptoViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void CryptoViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_EncodedIsSet)
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;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(multipart->hasContent(utility::conversions::to_string_t(U("encoded"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("encoded"))))
{
utility::string_t refVal_setEncoded;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("encoded"))), refVal_setEncoded );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("encoded"))),
refVal_setEncoded);
setEncoded(refVal_setEncoded);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("decoded"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("decoded"))))
{
utility::string_t refVal_setDecoded;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("decoded"))), refVal_setDecoded );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("decoded"))),
refVal_setDecoded);
setDecoded(refVal_setDecoded);
}
return ok;
}
}
utility::string_t CryptoViewModel::getEncoded() const
{
utility::string_t CryptoViewModel::getEncoded() const
{
return m_Encoded;
}
}
void CryptoViewModel::setEncoded(const utility::string_t& value)
{
void CryptoViewModel::setEncoded(const utility::string_t &value)
{
m_Encoded = value;
m_EncodedIsSet = true;
}
}
bool CryptoViewModel::encodedIsSet() const
{
bool CryptoViewModel::encodedIsSet() const
{
return m_EncodedIsSet;
}
}
void CryptoViewModel::unsetEncoded()
{
void CryptoViewModel::unsetEncoded()
{
m_EncodedIsSet = false;
}
utility::string_t CryptoViewModel::getDecoded() const
{
}
utility::string_t CryptoViewModel::getDecoded() const
{
return m_Decoded;
}
}
void CryptoViewModel::setDecoded(const utility::string_t& value)
{
void CryptoViewModel::setDecoded(const utility::string_t &value)
{
m_Decoded = value;
m_DecodedIsSet = true;
}
}
bool CryptoViewModel::decodedIsSet() const
{
bool CryptoViewModel::decodedIsSet() const
{
return m_DecodedIsSet;
}
}
void CryptoViewModel::unsetDecoded()
{
void CryptoViewModel::unsetDecoded()
{
m_DecodedIsSet = false;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,19 +10,19 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/GrantType.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
GrantType::eGrantType toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
GrantType::eGrantType toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("authorization_code")))
return GrantType::eGrantType::GrantType_AUTHORIZATION_CODE;
if (val == utility::conversions::to_string_t(U("client_credentials")))
@ -32,10 +32,10 @@ GrantType::eGrantType toEnum(const EnumUnderlyingType& val)
if (val == utility::conversions::to_string_t(U("refresh_token")))
return GrantType::eGrantType::GrantType_REFRESH_TOKEN;
return {};
}
}
EnumUnderlyingType fromEnum(GrantType::eGrantType e)
{
EnumUnderlyingType fromEnum(GrantType::eGrantType e)
{
switch (e)
{
case GrantType::eGrantType::GrantType_AUTHORIZATION_CODE:
@ -50,36 +50,36 @@ EnumUnderlyingType fromEnum(GrantType::eGrantType e)
break;
}
return {};
}
}
}
}
GrantType::GrantType()
{
}
GrantType::GrantType()
{
}
GrantType::~GrantType()
{
}
GrantType::~GrantType()
{
}
void GrantType::validate()
{
void GrantType::validate()
{
// TODO: implement validation
}
}
web::json::value GrantType::toJson() const
{
web::json::value GrantType::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool GrantType::fromJson(const web::json::value& val)
{
bool GrantType::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void GrantType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void GrantType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -88,10 +88,10 @@ void GrantType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool GrantType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool GrantType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -108,19 +108,17 @@ bool GrantType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
}
}
return ok;
}
}
GrantType::eGrantType GrantType::getValue() const
{
GrantType::eGrantType GrantType::getValue() const
{
return m_value;
}
}
void GrantType::setValue(GrantType::eGrantType const value)
{
void GrantType::setValue(GrantType::eGrantType const value)
{
m_value = value;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/GroupGame.h"
namespace tribufu {
namespace models {
GroupGame::GroupGame()
namespace tribufu
{
namespace models
{
GroupGame::GroupGame()
{
m_Group_id = utility::conversions::to_string_t("");
m_Group_idIsSet = false;
m_GroupIsSet = false;
@ -30,383 +30,383 @@ GroupGame::GroupGame()
m_AcquiredIsSet = false;
m_Last_used = utility::datetime();
m_Last_usedIsSet = false;
}
}
GroupGame::~GroupGame()
{
}
GroupGame::~GroupGame()
{
}
void GroupGame::validate()
{
void GroupGame::validate()
{
// TODO: implement validation
}
}
web::json::value GroupGame::toJson() const
{
web::json::value GroupGame::toJson() const
{
web::json::value val = web::json::value::object();
if(m_Group_idIsSet)
if (m_Group_idIsSet)
{
val[utility::conversions::to_string_t(U("group_id"))] = ModelBase::toJson(m_Group_id);
}
if(m_GroupIsSet)
if (m_GroupIsSet)
{
val[utility::conversions::to_string_t(U("group"))] = ModelBase::toJson(m_Group);
}
if(m_Application_idIsSet)
if (m_Application_idIsSet)
{
val[utility::conversions::to_string_t(U("application_id"))] = ModelBase::toJson(m_Application_id);
}
if(m_ApplicationIsSet)
if (m_ApplicationIsSet)
{
val[utility::conversions::to_string_t(U("application"))] = ModelBase::toJson(m_Application);
}
if(m_StatsIsSet)
if (m_StatsIsSet)
{
val[utility::conversions::to_string_t(U("stats"))] = ModelBase::toJson(m_Stats);
}
if(m_AcquiredIsSet)
if (m_AcquiredIsSet)
{
val[utility::conversions::to_string_t(U("acquired"))] = ModelBase::toJson(m_Acquired);
}
if(m_Last_usedIsSet)
if (m_Last_usedIsSet)
{
val[utility::conversions::to_string_t(U("last_used"))] = ModelBase::toJson(m_Last_used);
}
return val;
}
}
bool GroupGame::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("group_id"))))
bool GroupGame::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("group_id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("group_id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("group_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setGroupId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGroupId);
setGroupId(refVal_setGroupId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("group"))))
if (val.has_field(utility::conversions::to_string_t(U("group"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("group")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("group")));
if (!fieldValue.is_null())
{
std::shared_ptr<Group> refVal_setGroup;
ok &= ModelBase::fromJson(fieldValue, refVal_setGroup);
setGroup(refVal_setGroup);
}
}
if(val.has_field(utility::conversions::to_string_t(U("application_id"))))
if (val.has_field(utility::conversions::to_string_t(U("application_id"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("application_id")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("application_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setApplicationId;
ok &= ModelBase::fromJson(fieldValue, refVal_setApplicationId);
setApplicationId(refVal_setApplicationId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("application"))))
if (val.has_field(utility::conversions::to_string_t(U("application"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("application")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("application")));
if (!fieldValue.is_null())
{
std::shared_ptr<Application> refVal_setApplication;
ok &= ModelBase::fromJson(fieldValue, refVal_setApplication);
setApplication(refVal_setApplication);
}
}
if(val.has_field(utility::conversions::to_string_t(U("stats"))))
if (val.has_field(utility::conversions::to_string_t(U("stats"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("stats")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("stats")));
if (!fieldValue.is_null())
{
std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
setStats(refVal_setStats);
}
}
if(val.has_field(utility::conversions::to_string_t(U("acquired"))))
if (val.has_field(utility::conversions::to_string_t(U("acquired"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("acquired")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("acquired")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setAcquired;
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
setAcquired(refVal_setAcquired);
}
}
if(val.has_field(utility::conversions::to_string_t(U("last_used"))))
if (val.has_field(utility::conversions::to_string_t(U("last_used"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_used")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("last_used")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
setLastUsed(refVal_setLastUsed);
}
}
return ok;
}
}
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;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_Group_idIsSet)
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));
}
}
}
bool GroupGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool GroupGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group_id"))), refVal_setGroupId );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("group_id"))), refVal_setGroupId);
setGroupId(refVal_setGroupId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("group"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("group"))))
{
std::shared_ptr<Group> refVal_setGroup;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group"))), refVal_setGroup );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("group"))),
refVal_setGroup);
setGroup(refVal_setGroup);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("application_id"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("application_id"))))
{
utility::string_t refVal_setApplicationId;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("application_id"))), refVal_setApplicationId );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("application_id"))),
refVal_setApplicationId);
setApplicationId(refVal_setApplicationId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("application"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("application"))))
{
std::shared_ptr<Application> refVal_setApplication;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("application"))), refVal_setApplication );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("application"))), refVal_setApplication);
setApplication(refVal_setApplication);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
{
std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))), refVal_setStats );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))),
refVal_setStats);
setStats(refVal_setStats);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
{
utility::datetime refVal_setAcquired;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired);
setAcquired(refVal_setAcquired);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
{
utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed);
setLastUsed(refVal_setLastUsed);
}
return ok;
}
}
utility::string_t GroupGame::getGroupId() const
{
utility::string_t GroupGame::getGroupId() const
{
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_idIsSet = true;
}
}
bool GroupGame::groupIdIsSet() const
{
bool GroupGame::groupIdIsSet() const
{
return m_Group_idIsSet;
}
}
void GroupGame::unsetGroup_id()
{
void GroupGame::unsetGroup_id()
{
m_Group_idIsSet = false;
}
std::shared_ptr<Group> GroupGame::getGroup() const
{
}
std::shared_ptr<Group> GroupGame::getGroup() const
{
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_GroupIsSet = true;
}
}
bool GroupGame::groupIsSet() const
{
bool GroupGame::groupIsSet() const
{
return m_GroupIsSet;
}
}
void GroupGame::unsetGroup()
{
void GroupGame::unsetGroup()
{
m_GroupIsSet = false;
}
utility::string_t GroupGame::getApplicationId() const
{
}
utility::string_t GroupGame::getApplicationId() const
{
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_idIsSet = true;
}
}
bool GroupGame::applicationIdIsSet() const
{
bool GroupGame::applicationIdIsSet() const
{
return m_Application_idIsSet;
}
}
void GroupGame::unsetApplication_id()
{
void GroupGame::unsetApplication_id()
{
m_Application_idIsSet = false;
}
std::shared_ptr<Application> GroupGame::getApplication() const
{
}
std::shared_ptr<Application> GroupGame::getApplication() const
{
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_ApplicationIsSet = true;
}
}
bool GroupGame::applicationIsSet() const
{
bool GroupGame::applicationIsSet() const
{
return m_ApplicationIsSet;
}
}
void GroupGame::unsetApplication()
{
void GroupGame::unsetApplication()
{
m_ApplicationIsSet = false;
}
std::shared_ptr<AnyType> GroupGame::getStats() const
{
}
std::shared_ptr<AnyType> GroupGame::getStats() const
{
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_StatsIsSet = true;
}
}
bool GroupGame::statsIsSet() const
{
bool GroupGame::statsIsSet() const
{
return m_StatsIsSet;
}
}
void GroupGame::unsetStats()
{
void GroupGame::unsetStats()
{
m_StatsIsSet = false;
}
utility::datetime GroupGame::getAcquired() const
{
}
utility::datetime GroupGame::getAcquired() const
{
return m_Acquired;
}
}
void GroupGame::setAcquired(const utility::datetime& value)
{
void GroupGame::setAcquired(const utility::datetime &value)
{
m_Acquired = value;
m_AcquiredIsSet = true;
}
}
bool GroupGame::acquiredIsSet() const
{
bool GroupGame::acquiredIsSet() const
{
return m_AcquiredIsSet;
}
}
void GroupGame::unsetAcquired()
{
void GroupGame::unsetAcquired()
{
m_AcquiredIsSet = false;
}
utility::datetime GroupGame::getLastUsed() const
{
}
utility::datetime GroupGame::getLastUsed() const
{
return m_Last_used;
}
}
void GroupGame::setLastUsed(const utility::datetime& value)
{
void GroupGame::setLastUsed(const utility::datetime &value)
{
m_Last_used = value;
m_Last_usedIsSet = true;
}
}
bool GroupGame::lastUsedIsSet() const
{
bool GroupGame::lastUsedIsSet() const
{
return m_Last_usedIsSet;
}
}
void GroupGame::unsetLast_used()
{
void GroupGame::unsetLast_used()
{
m_Last_usedIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/GroupMember.h"
namespace tribufu {
namespace models {
GroupMember::GroupMember()
namespace tribufu
{
namespace models
{
GroupMember::GroupMember()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Uuid = utility::conversions::to_string_t("");
@ -36,476 +36,476 @@ GroupMember::GroupMember()
m_RankIsSet = false;
m_Since = utility::datetime();
m_SinceIsSet = false;
}
}
GroupMember::~GroupMember()
{
}
GroupMember::~GroupMember()
{
}
void GroupMember::validate()
{
void GroupMember::validate()
{
// TODO: implement validation
}
}
web::json::value GroupMember::toJson() const
{
web::json::value GroupMember::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_UuidIsSet)
if (m_UuidIsSet)
{
val[utility::conversions::to_string_t(U("uuid"))] = ModelBase::toJson(m_Uuid);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_Display_nameIsSet)
if (m_Display_nameIsSet)
{
val[utility::conversions::to_string_t(U("display_name"))] = ModelBase::toJson(m_Display_name);
}
if(m_VerifiedIsSet)
if (m_VerifiedIsSet)
{
val[utility::conversions::to_string_t(U("verified"))] = ModelBase::toJson(m_Verified);
}
if(m_Photo_urlIsSet)
if (m_Photo_urlIsSet)
{
val[utility::conversions::to_string_t(U("photo_url"))] = ModelBase::toJson(m_Photo_url);
}
if(m_Last_onlineIsSet)
if (m_Last_onlineIsSet)
{
val[utility::conversions::to_string_t(U("last_online"))] = ModelBase::toJson(m_Last_online);
}
if(m_RankIsSet)
if (m_RankIsSet)
{
val[utility::conversions::to_string_t(U("rank"))] = ModelBase::toJson(m_Rank);
}
if(m_SinceIsSet)
if (m_SinceIsSet)
{
val[utility::conversions::to_string_t(U("since"))] = ModelBase::toJson(m_Since);
}
return val;
}
}
bool GroupMember::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool GroupMember::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("uuid"))))
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("display_name"))))
if (val.has_field(utility::conversions::to_string_t(U("display_name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("display_name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("display_name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
setDisplayName(refVal_setDisplayName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("verified"))))
if (val.has_field(utility::conversions::to_string_t(U("verified"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("verified")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("verified")));
if (!fieldValue.is_null())
{
bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("last_online"))))
if (val.has_field(utility::conversions::to_string_t(U("last_online"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_online")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("last_online")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setLastOnline;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("rank")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("rank")));
if (!fieldValue.is_null())
{
std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
setRank(refVal_setRank);
}
}
if(val.has_field(utility::conversions::to_string_t(U("since"))))
if (val.has_field(utility::conversions::to_string_t(U("since"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("since")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("since")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setSince;
ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
setSince(refVal_setSince);
}
}
return ok;
}
}
void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void GroupMember::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool GroupMember::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool GroupMember::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
refVal_setUuid);
setUuid(refVal_setUuid);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
{
utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName);
setDisplayName(refVal_setDisplayName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{
bool refVal_setVerified;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
setVerified(refVal_setVerified);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("last_online"))))
{
utility::datetime refVal_setLastOnline;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("last_online"))), refVal_setLastOnline);
setLastOnline(refVal_setLastOnline);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
{
std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))), refVal_setRank );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))),
refVal_setRank);
setRank(refVal_setRank);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("since"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
{
utility::datetime refVal_setSince;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))), refVal_setSince );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))),
refVal_setSince);
setSince(refVal_setSince);
}
return ok;
}
}
utility::string_t GroupMember::getId() const
{
utility::string_t GroupMember::getId() const
{
return m_Id;
}
}
void GroupMember::setId(const utility::string_t& value)
{
void GroupMember::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool GroupMember::idIsSet() const
{
bool GroupMember::idIsSet() const
{
return m_IdIsSet;
}
}
void GroupMember::unsetId()
{
void GroupMember::unsetId()
{
m_IdIsSet = false;
}
utility::string_t GroupMember::getUuid() const
{
}
utility::string_t GroupMember::getUuid() const
{
return m_Uuid;
}
}
void GroupMember::setUuid(const utility::string_t& value)
{
void GroupMember::setUuid(const utility::string_t &value)
{
m_Uuid = value;
m_UuidIsSet = true;
}
}
bool GroupMember::uuidIsSet() const
{
bool GroupMember::uuidIsSet() const
{
return m_UuidIsSet;
}
}
void GroupMember::unsetUuid()
{
void GroupMember::unsetUuid()
{
m_UuidIsSet = false;
}
utility::string_t GroupMember::getName() const
{
}
utility::string_t GroupMember::getName() const
{
return m_Name;
}
}
void GroupMember::setName(const utility::string_t& value)
{
void GroupMember::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool GroupMember::nameIsSet() const
{
bool GroupMember::nameIsSet() const
{
return m_NameIsSet;
}
}
void GroupMember::unsetName()
{
void GroupMember::unsetName()
{
m_NameIsSet = false;
}
utility::string_t GroupMember::getDisplayName() const
{
}
utility::string_t GroupMember::getDisplayName() const
{
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_nameIsSet = true;
}
}
bool GroupMember::displayNameIsSet() const
{
bool GroupMember::displayNameIsSet() const
{
return m_Display_nameIsSet;
}
}
void GroupMember::unsetDisplay_name()
{
void GroupMember::unsetDisplay_name()
{
m_Display_nameIsSet = false;
}
bool GroupMember::isVerified() const
{
}
bool GroupMember::isVerified() const
{
return m_Verified;
}
}
void GroupMember::setVerified(bool value)
{
void GroupMember::setVerified(bool value)
{
m_Verified = value;
m_VerifiedIsSet = true;
}
}
bool GroupMember::verifiedIsSet() const
{
bool GroupMember::verifiedIsSet() const
{
return m_VerifiedIsSet;
}
}
void GroupMember::unsetVerified()
{
void GroupMember::unsetVerified()
{
m_VerifiedIsSet = false;
}
utility::string_t GroupMember::getPhotoUrl() const
{
}
utility::string_t GroupMember::getPhotoUrl() const
{
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_urlIsSet = true;
}
}
bool GroupMember::photoUrlIsSet() const
{
bool GroupMember::photoUrlIsSet() const
{
return m_Photo_urlIsSet;
}
}
void GroupMember::unsetPhoto_url()
{
void GroupMember::unsetPhoto_url()
{
m_Photo_urlIsSet = false;
}
utility::datetime GroupMember::getLastOnline() const
{
}
utility::datetime GroupMember::getLastOnline() const
{
return m_Last_online;
}
}
void GroupMember::setLastOnline(const utility::datetime& value)
{
void GroupMember::setLastOnline(const utility::datetime &value)
{
m_Last_online = value;
m_Last_onlineIsSet = true;
}
}
bool GroupMember::lastOnlineIsSet() const
{
bool GroupMember::lastOnlineIsSet() const
{
return m_Last_onlineIsSet;
}
}
void GroupMember::unsetLast_online()
{
void GroupMember::unsetLast_online()
{
m_Last_onlineIsSet = false;
}
std::shared_ptr<GroupRank> GroupMember::getRank() const
{
}
std::shared_ptr<GroupRank> GroupMember::getRank() const
{
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_RankIsSet = true;
}
}
bool GroupMember::rankIsSet() const
{
bool GroupMember::rankIsSet() const
{
return m_RankIsSet;
}
}
void GroupMember::unsetRank()
{
void GroupMember::unsetRank()
{
m_RankIsSet = false;
}
utility::datetime GroupMember::getSince() const
{
}
utility::datetime GroupMember::getSince() const
{
return m_Since;
}
}
void GroupMember::setSince(const utility::datetime& value)
{
void GroupMember::setSince(const utility::datetime &value)
{
m_Since = value;
m_SinceIsSet = true;
}
}
bool GroupMember::sinceIsSet() const
{
bool GroupMember::sinceIsSet() const
{
return m_SinceIsSet;
}
}
void GroupMember::unsetSince()
{
void GroupMember::unsetSince()
{
m_SinceIsSet = false;
}
}
}
}
}

View File

@ -10,19 +10,19 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/GroupRank.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
GroupRank::eGroupRank toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
GroupRank::eGroupRank toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("member")))
return GroupRank::eGroupRank::GroupRank_MEMBER;
if (val == utility::conversions::to_string_t(U("leader")))
@ -30,10 +30,10 @@ GroupRank::eGroupRank toEnum(const EnumUnderlyingType& val)
if (val == utility::conversions::to_string_t(U("owner")))
return GroupRank::eGroupRank::GroupRank_OWNER;
return {};
}
}
EnumUnderlyingType fromEnum(GroupRank::eGroupRank e)
{
EnumUnderlyingType fromEnum(GroupRank::eGroupRank e)
{
switch (e)
{
case GroupRank::eGroupRank::GroupRank_MEMBER:
@ -46,36 +46,36 @@ EnumUnderlyingType fromEnum(GroupRank::eGroupRank e)
break;
}
return {};
}
}
}
}
GroupRank::GroupRank()
{
}
GroupRank::GroupRank()
{
}
GroupRank::~GroupRank()
{
}
GroupRank::~GroupRank()
{
}
void GroupRank::validate()
{
void GroupRank::validate()
{
// TODO: implement validation
}
}
web::json::value GroupRank::toJson() const
{
web::json::value GroupRank::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool GroupRank::fromJson(const web::json::value& val)
{
bool GroupRank::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void GroupRank::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void GroupRank::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -84,10 +84,10 @@ void GroupRank::toMultipart(std::shared_ptr<MultipartFormData> multipart, const
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool GroupRank::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool GroupRank::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -104,19 +104,17 @@ bool GroupRank::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, cons
}
}
return ok;
}
}
GroupRank::eGroupRank GroupRank::getValue() const
{
GroupRank::eGroupRank GroupRank::getValue() const
{
return m_value;
}
}
void GroupRank::setValue(GroupRank::eGroupRank const value)
{
void GroupRank::setValue(GroupRank::eGroupRank const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,112 +10,112 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/HashViewModel.h"
namespace tribufu {
namespace models {
HashViewModel::HashViewModel()
namespace tribufu
{
namespace models
{
HashViewModel::HashViewModel()
{
m_Value = utility::conversions::to_string_t("");
m_ValueIsSet = false;
}
}
HashViewModel::~HashViewModel()
{
}
HashViewModel::~HashViewModel()
{
}
void HashViewModel::validate()
{
void HashViewModel::validate()
{
// TODO: implement validation
}
}
web::json::value HashViewModel::toJson() const
{
web::json::value HashViewModel::toJson() const
{
web::json::value val = web::json::value::object();
if(m_ValueIsSet)
if (m_ValueIsSet)
{
val[utility::conversions::to_string_t(U("value"))] = ModelBase::toJson(m_Value);
}
return val;
}
}
bool HashViewModel::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("value"))))
bool HashViewModel::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("value")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("value"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("value")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setValue;
ok &= ModelBase::fromJson(fieldValue, refVal_setValue);
setValue(refVal_setValue);
}
}
return ok;
}
}
void HashViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void HashViewModel::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_ValueIsSet)
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));
}
}
}
bool HashViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool HashViewModel::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))), refVal_setValue );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("value"))),
refVal_setValue);
setValue(refVal_setValue);
}
return ok;
}
}
utility::string_t HashViewModel::getValue() const
{
utility::string_t HashViewModel::getValue() const
{
return m_Value;
}
}
void HashViewModel::setValue(const utility::string_t& value)
{
void HashViewModel::setValue(const utility::string_t &value)
{
m_Value = value;
m_ValueIsSet = true;
}
}
bool HashViewModel::valueIsSet() const
{
bool HashViewModel::valueIsSet() const
{
return m_ValueIsSet;
}
}
void HashViewModel::unsetValue()
{
void HashViewModel::unsetValue()
{
m_ValueIsSet = false;
}
}
}
}
}

View File

@ -10,160 +10,162 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/IntrospectRequest.h"
namespace tribufu {
namespace models {
IntrospectRequest::IntrospectRequest()
namespace tribufu
{
namespace models
{
IntrospectRequest::IntrospectRequest()
{
m_Token = utility::conversions::to_string_t("");
m_TokenIsSet = false;
m_Token_type_hintIsSet = false;
}
}
IntrospectRequest::~IntrospectRequest()
{
}
IntrospectRequest::~IntrospectRequest()
{
}
void IntrospectRequest::validate()
{
void IntrospectRequest::validate()
{
// TODO: implement validation
}
}
web::json::value IntrospectRequest::toJson() const
{
web::json::value IntrospectRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_TokenIsSet)
if (m_TokenIsSet)
{
val[utility::conversions::to_string_t(U("token"))] = ModelBase::toJson(m_Token);
}
if(m_Token_type_hintIsSet)
if (m_Token_type_hintIsSet)
{
val[utility::conversions::to_string_t(U("token_type_hint"))] = ModelBase::toJson(m_Token_type_hint);
}
return val;
}
}
bool IntrospectRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("token"))))
bool IntrospectRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("token")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("token"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("token")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
setToken(refVal_setToken);
}
}
if(val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("token_type_hint")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("token_type_hint")));
if (!fieldValue.is_null())
{
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint);
}
}
return ok;
}
}
void IntrospectRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void IntrospectRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_TokenIsSet)
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;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(multipart->hasContent(utility::conversions::to_string_t(U("token"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("token"))))
{
utility::string_t refVal_setToken;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))), refVal_setToken );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))),
refVal_setToken);
setToken(refVal_setToken);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
{
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))), refVal_setTokenTypeHint );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))),
refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint);
}
return ok;
}
}
utility::string_t IntrospectRequest::getToken() const
{
utility::string_t IntrospectRequest::getToken() const
{
return m_Token;
}
}
void IntrospectRequest::setToken(const utility::string_t& value)
{
void IntrospectRequest::setToken(const utility::string_t &value)
{
m_Token = value;
m_TokenIsSet = true;
}
}
bool IntrospectRequest::tokenIsSet() const
{
bool IntrospectRequest::tokenIsSet() const
{
return m_TokenIsSet;
}
}
void IntrospectRequest::unsetToken()
{
void IntrospectRequest::unsetToken()
{
m_TokenIsSet = false;
}
std::shared_ptr<TokenHintType> IntrospectRequest::getTokenTypeHint() const
{
}
std::shared_ptr<TokenHintType> IntrospectRequest::getTokenTypeHint() const
{
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_hintIsSet = true;
}
}
bool IntrospectRequest::tokenTypeHintIsSet() const
{
bool IntrospectRequest::tokenTypeHintIsSet() const
{
return m_Token_type_hintIsSet;
}
}
void IntrospectRequest::unsetToken_type_hint()
{
void IntrospectRequest::unsetToken_type_hint()
{
m_Token_type_hintIsSet = false;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/LeaderboardItem.h"
namespace tribufu {
namespace models {
LeaderboardItem::LeaderboardItem()
namespace tribufu
{
namespace models
{
LeaderboardItem::LeaderboardItem()
{
m_Name = utility::conversions::to_string_t("");
m_NameIsSet = false;
m_Display_name = utility::conversions::to_string_t("");
@ -31,333 +31,337 @@ LeaderboardItem::LeaderboardItem()
m_ExperienceIsSet = false;
m_Points = 0.0;
m_PointsIsSet = false;
}
}
LeaderboardItem::~LeaderboardItem()
{
}
LeaderboardItem::~LeaderboardItem()
{
}
void LeaderboardItem::validate()
{
void LeaderboardItem::validate()
{
// TODO: implement validation
}
}
web::json::value LeaderboardItem::toJson() const
{
web::json::value LeaderboardItem::toJson() const
{
web::json::value val = web::json::value::object();
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_Display_nameIsSet)
if (m_Display_nameIsSet)
{
val[utility::conversions::to_string_t(U("display_name"))] = ModelBase::toJson(m_Display_name);
}
if(m_Photo_urlIsSet)
if (m_Photo_urlIsSet)
{
val[utility::conversions::to_string_t(U("photo_url"))] = ModelBase::toJson(m_Photo_url);
}
if(m_LevelIsSet)
if (m_LevelIsSet)
{
val[utility::conversions::to_string_t(U("level"))] = ModelBase::toJson(m_Level);
}
if(m_ExperienceIsSet)
if (m_ExperienceIsSet)
{
val[utility::conversions::to_string_t(U("experience"))] = ModelBase::toJson(m_Experience);
}
if(m_PointsIsSet)
if (m_PointsIsSet)
{
val[utility::conversions::to_string_t(U("points"))] = ModelBase::toJson(m_Points);
}
return val;
}
}
bool LeaderboardItem::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("name"))))
bool LeaderboardItem::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("display_name"))))
if (val.has_field(utility::conversions::to_string_t(U("display_name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("display_name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("display_name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromJson(fieldValue, refVal_setDisplayName);
setDisplayName(refVal_setDisplayName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("photo_url"))))
if (val.has_field(utility::conversions::to_string_t(U("photo_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("level"))))
if (val.has_field(utility::conversions::to_string_t(U("level"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("level")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("level")));
if (!fieldValue.is_null())
{
int32_t refVal_setLevel;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("experience")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("experience")));
if (!fieldValue.is_null())
{
double refVal_setExperience;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("points")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("points")));
if (!fieldValue.is_null())
{
double refVal_setPoints;
ok &= ModelBase::fromJson(fieldValue, refVal_setPoints);
setPoints(refVal_setPoints);
}
}
return ok;
}
}
void LeaderboardItem::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void LeaderboardItem::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_NameIsSet)
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;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("display_name"))))
{
utility::string_t refVal_setDisplayName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("display_name"))), refVal_setDisplayName);
setDisplayName(refVal_setDisplayName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("level"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("level"))))
{
int32_t refVal_setLevel;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))), refVal_setLevel );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("level"))),
refVal_setLevel);
setLevel(refVal_setLevel);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("experience"))))
{
double refVal_setExperience;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("experience"))), refVal_setExperience);
setExperience(refVal_setExperience);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("points"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("points"))))
{
double refVal_setPoints;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))), refVal_setPoints );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("points"))),
refVal_setPoints);
setPoints(refVal_setPoints);
}
return ok;
}
}
utility::string_t LeaderboardItem::getName() const
{
utility::string_t LeaderboardItem::getName() const
{
return m_Name;
}
}
void LeaderboardItem::setName(const utility::string_t& value)
{
void LeaderboardItem::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool LeaderboardItem::nameIsSet() const
{
bool LeaderboardItem::nameIsSet() const
{
return m_NameIsSet;
}
}
void LeaderboardItem::unsetName()
{
void LeaderboardItem::unsetName()
{
m_NameIsSet = false;
}
utility::string_t LeaderboardItem::getDisplayName() const
{
}
utility::string_t LeaderboardItem::getDisplayName() const
{
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_nameIsSet = true;
}
}
bool LeaderboardItem::displayNameIsSet() const
{
bool LeaderboardItem::displayNameIsSet() const
{
return m_Display_nameIsSet;
}
}
void LeaderboardItem::unsetDisplay_name()
{
void LeaderboardItem::unsetDisplay_name()
{
m_Display_nameIsSet = false;
}
utility::string_t LeaderboardItem::getPhotoUrl() const
{
}
utility::string_t LeaderboardItem::getPhotoUrl() const
{
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_urlIsSet = true;
}
}
bool LeaderboardItem::photoUrlIsSet() const
{
bool LeaderboardItem::photoUrlIsSet() const
{
return m_Photo_urlIsSet;
}
}
void LeaderboardItem::unsetPhoto_url()
{
void LeaderboardItem::unsetPhoto_url()
{
m_Photo_urlIsSet = false;
}
int32_t LeaderboardItem::getLevel() const
{
}
int32_t LeaderboardItem::getLevel() const
{
return m_Level;
}
}
void LeaderboardItem::setLevel(int32_t value)
{
void LeaderboardItem::setLevel(int32_t value)
{
m_Level = value;
m_LevelIsSet = true;
}
}
bool LeaderboardItem::levelIsSet() const
{
bool LeaderboardItem::levelIsSet() const
{
return m_LevelIsSet;
}
}
void LeaderboardItem::unsetLevel()
{
void LeaderboardItem::unsetLevel()
{
m_LevelIsSet = false;
}
double LeaderboardItem::getExperience() const
{
}
double LeaderboardItem::getExperience() const
{
return m_Experience;
}
}
void LeaderboardItem::setExperience(double value)
{
void LeaderboardItem::setExperience(double value)
{
m_Experience = value;
m_ExperienceIsSet = true;
}
}
bool LeaderboardItem::experienceIsSet() const
{
bool LeaderboardItem::experienceIsSet() const
{
return m_ExperienceIsSet;
}
}
void LeaderboardItem::unsetExperience()
{
void LeaderboardItem::unsetExperience()
{
m_ExperienceIsSet = false;
}
double LeaderboardItem::getPoints() const
{
}
double LeaderboardItem::getPoints() const
{
return m_Points;
}
}
void LeaderboardItem::setPoints(double value)
{
void LeaderboardItem::setPoints(double value)
{
m_Points = value;
m_PointsIsSet = true;
}
}
bool LeaderboardItem::pointsIsSet() const
{
bool LeaderboardItem::pointsIsSet() const
{
return m_PointsIsSet;
}
}
void LeaderboardItem::unsetPoints()
{
void LeaderboardItem::unsetPoints()
{
m_PointsIsSet = false;
}
}
}
}
}

View File

@ -10,28 +10,28 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/LeaderboardOrder.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
LeaderboardOrder::eLeaderboardOrder toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
LeaderboardOrder::eLeaderboardOrder toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("level")))
return LeaderboardOrder::eLeaderboardOrder::LeaderboardOrder_LEVEL;
if (val == utility::conversions::to_string_t(U("points")))
return LeaderboardOrder::eLeaderboardOrder::LeaderboardOrder_POINTS;
return {};
}
}
EnumUnderlyingType fromEnum(LeaderboardOrder::eLeaderboardOrder e)
{
EnumUnderlyingType fromEnum(LeaderboardOrder::eLeaderboardOrder e)
{
switch (e)
{
case LeaderboardOrder::eLeaderboardOrder::LeaderboardOrder_LEVEL:
@ -42,36 +42,37 @@ EnumUnderlyingType fromEnum(LeaderboardOrder::eLeaderboardOrder e)
break;
}
return {};
}
}
}
}
LeaderboardOrder::LeaderboardOrder()
{
}
LeaderboardOrder::LeaderboardOrder()
{
}
LeaderboardOrder::~LeaderboardOrder()
{
}
LeaderboardOrder::~LeaderboardOrder()
{
}
void LeaderboardOrder::validate()
{
void LeaderboardOrder::validate()
{
// TODO: implement validation
}
}
web::json::value LeaderboardOrder::toJson() const
{
web::json::value LeaderboardOrder::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool LeaderboardOrder::fromJson(const web::json::value& val)
{
bool LeaderboardOrder::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -80,10 +81,11 @@ void LeaderboardOrder::toMultipart(std::shared_ptr<MultipartFormData> multipart,
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool LeaderboardOrder::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool LeaderboardOrder::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -100,19 +102,17 @@ bool LeaderboardOrder::fromMultiPart(std::shared_ptr<MultipartFormData> multipar
}
}
return ok;
}
}
LeaderboardOrder::eLeaderboardOrder LeaderboardOrder::getValue() const
{
LeaderboardOrder::eLeaderboardOrder LeaderboardOrder::getValue() const
{
return m_value;
}
}
void LeaderboardOrder::setValue(LeaderboardOrder::eLeaderboardOrder const value)
{
void LeaderboardOrder::setValue(LeaderboardOrder::eLeaderboardOrder const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,19 +10,19 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/LoginProvider.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
LoginProvider::eLoginProvider toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
LoginProvider::eLoginProvider toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("steam")))
return LoginProvider::eLoginProvider::LoginProvider_STEAM;
if (val == utility::conversions::to_string_t(U("epic")))
@ -38,10 +38,10 @@ LoginProvider::eLoginProvider toEnum(const EnumUnderlyingType& val)
if (val == utility::conversions::to_string_t(U("apple")))
return LoginProvider::eLoginProvider::LoginProvider_APPLE;
return {};
}
}
EnumUnderlyingType fromEnum(LoginProvider::eLoginProvider e)
{
EnumUnderlyingType fromEnum(LoginProvider::eLoginProvider e)
{
switch (e)
{
case LoginProvider::eLoginProvider::LoginProvider_STEAM:
@ -62,36 +62,37 @@ EnumUnderlyingType fromEnum(LoginProvider::eLoginProvider e)
break;
}
return {};
}
}
}
}
LoginProvider::LoginProvider()
{
}
LoginProvider::LoginProvider()
{
}
LoginProvider::~LoginProvider()
{
}
LoginProvider::~LoginProvider()
{
}
void LoginProvider::validate()
{
void LoginProvider::validate()
{
// TODO: implement validation
}
}
web::json::value LoginProvider::toJson() const
{
web::json::value LoginProvider::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool LoginProvider::fromJson(const web::json::value& val)
{
bool LoginProvider::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void LoginProvider::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void LoginProvider::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -100,10 +101,10 @@ void LoginProvider::toMultipart(std::shared_ptr<MultipartFormData> multipart, co
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool LoginProvider::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool LoginProvider::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -120,19 +121,17 @@ bool LoginProvider::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
}
}
return ok;
}
}
LoginProvider::eLoginProvider LoginProvider::getValue() const
{
LoginProvider::eLoginProvider LoginProvider::getValue() const
{
return m_value;
}
}
void LoginProvider::setValue(LoginProvider::eLoginProvider const value)
{
void LoginProvider::setValue(LoginProvider::eLoginProvider const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,161 +10,161 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/LoginRequest.h"
namespace tribufu {
namespace models {
LoginRequest::LoginRequest()
namespace tribufu
{
namespace models
{
LoginRequest::LoginRequest()
{
m_Login = utility::conversions::to_string_t("");
m_LoginIsSet = false;
m_Password = utility::conversions::to_string_t("");
m_PasswordIsSet = false;
}
}
LoginRequest::~LoginRequest()
{
}
LoginRequest::~LoginRequest()
{
}
void LoginRequest::validate()
{
void LoginRequest::validate()
{
// TODO: implement validation
}
}
web::json::value LoginRequest::toJson() const
{
web::json::value LoginRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_LoginIsSet)
if (m_LoginIsSet)
{
val[utility::conversions::to_string_t(U("login"))] = ModelBase::toJson(m_Login);
}
if(m_PasswordIsSet)
if (m_PasswordIsSet)
{
val[utility::conversions::to_string_t(U("password"))] = ModelBase::toJson(m_Password);
}
return val;
}
}
bool LoginRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("login"))))
bool LoginRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("login")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("login"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("login")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setLogin;
ok &= ModelBase::fromJson(fieldValue, refVal_setLogin);
setLogin(refVal_setLogin);
}
}
if(val.has_field(utility::conversions::to_string_t(U("password"))))
if (val.has_field(utility::conversions::to_string_t(U("password"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("password")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("password")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword);
}
}
return ok;
}
}
void LoginRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void LoginRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_LoginIsSet)
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));
}
}
}
bool LoginRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool LoginRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("login"))), refVal_setLogin );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("login"))),
refVal_setLogin);
setLogin(refVal_setLogin);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("password"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{
utility::string_t refVal_setPassword;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
setPassword(refVal_setPassword);
}
return ok;
}
}
utility::string_t LoginRequest::getLogin() const
{
utility::string_t LoginRequest::getLogin() const
{
return m_Login;
}
}
void LoginRequest::setLogin(const utility::string_t& value)
{
void LoginRequest::setLogin(const utility::string_t &value)
{
m_Login = value;
m_LoginIsSet = true;
}
}
bool LoginRequest::loginIsSet() const
{
bool LoginRequest::loginIsSet() const
{
return m_LoginIsSet;
}
}
void LoginRequest::unsetLogin()
{
void LoginRequest::unsetLogin()
{
m_LoginIsSet = false;
}
utility::string_t LoginRequest::getPassword() const
{
}
utility::string_t LoginRequest::getPassword() const
{
return m_Password;
}
}
void LoginRequest::setPassword(const utility::string_t& value)
{
void LoginRequest::setPassword(const utility::string_t &value)
{
m_Password = value;
m_PasswordIsSet = true;
}
}
bool LoginRequest::passwordIsSet() const
{
bool LoginRequest::passwordIsSet() const
{
return m_PasswordIsSet;
}
}
void LoginRequest::unsetPassword()
{
void LoginRequest::unsetPassword()
{
m_PasswordIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/LoginResponse.h"
namespace tribufu {
namespace models {
LoginResponse::LoginResponse()
namespace tribufu
{
namespace models
{
LoginResponse::LoginResponse()
{
m_UserIsSet = false;
m_Access_token = utility::conversions::to_string_t("");
m_Access_tokenIsSet = false;
@ -26,241 +26,243 @@ LoginResponse::LoginResponse()
m_Refresh_tokenIsSet = false;
m_Expires_in = 0L;
m_Expires_inIsSet = false;
}
}
LoginResponse::~LoginResponse()
{
}
LoginResponse::~LoginResponse()
{
}
void LoginResponse::validate()
{
void LoginResponse::validate()
{
// TODO: implement validation
}
}
web::json::value LoginResponse::toJson() const
{
web::json::value LoginResponse::toJson() const
{
web::json::value val = web::json::value::object();
if(m_UserIsSet)
if (m_UserIsSet)
{
val[utility::conversions::to_string_t(U("user"))] = ModelBase::toJson(m_User);
}
if(m_Access_tokenIsSet)
if (m_Access_tokenIsSet)
{
val[utility::conversions::to_string_t(U("access_token"))] = ModelBase::toJson(m_Access_token);
}
if(m_Refresh_tokenIsSet)
if (m_Refresh_tokenIsSet)
{
val[utility::conversions::to_string_t(U("refresh_token"))] = ModelBase::toJson(m_Refresh_token);
}
if(m_Expires_inIsSet)
if (m_Expires_inIsSet)
{
val[utility::conversions::to_string_t(U("expires_in"))] = ModelBase::toJson(m_Expires_in);
}
return val;
}
}
bool LoginResponse::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("user"))))
bool LoginResponse::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("user")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("user"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("user")));
if (!fieldValue.is_null())
{
std::shared_ptr<UserInfo> refVal_setUser;
ok &= ModelBase::fromJson(fieldValue, refVal_setUser);
setUser(refVal_setUser);
}
}
if(val.has_field(utility::conversions::to_string_t(U("access_token"))))
if (val.has_field(utility::conversions::to_string_t(U("access_token"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("access_token")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("access_token")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setAccessToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setAccessToken);
setAccessToken(refVal_setAccessToken);
}
}
if(val.has_field(utility::conversions::to_string_t(U("refresh_token"))))
if (val.has_field(utility::conversions::to_string_t(U("refresh_token"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("refresh_token")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("refresh_token")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setRefreshToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken);
}
}
if(val.has_field(utility::conversions::to_string_t(U("expires_in"))))
if (val.has_field(utility::conversions::to_string_t(U("expires_in"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("expires_in")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("expires_in")));
if (!fieldValue.is_null())
{
int64_t refVal_setExpiresIn;
ok &= ModelBase::fromJson(fieldValue, refVal_setExpiresIn);
setExpiresIn(refVal_setExpiresIn);
}
}
return ok;
}
}
void LoginResponse::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void LoginResponse::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_UserIsSet)
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));
}
}
}
bool LoginResponse::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool LoginResponse::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user"))), refVal_setUser );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("user"))),
refVal_setUser);
setUser(refVal_setUser);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("access_token"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("access_token"))))
{
utility::string_t refVal_setAccessToken;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("access_token"))), refVal_setAccessToken );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("access_token"))), refVal_setAccessToken);
setAccessToken(refVal_setAccessToken);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("refresh_token"))))
{
utility::string_t refVal_setRefreshToken;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))), refVal_setRefreshToken );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))),
refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("expires_in"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("expires_in"))))
{
int64_t refVal_setExpiresIn;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("expires_in"))), refVal_setExpiresIn );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("expires_in"))), refVal_setExpiresIn);
setExpiresIn(refVal_setExpiresIn);
}
return ok;
}
}
std::shared_ptr<UserInfo> LoginResponse::getUser() const
{
std::shared_ptr<UserInfo> LoginResponse::getUser() const
{
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_UserIsSet = true;
}
}
bool LoginResponse::userIsSet() const
{
bool LoginResponse::userIsSet() const
{
return m_UserIsSet;
}
}
void LoginResponse::unsetUser()
{
void LoginResponse::unsetUser()
{
m_UserIsSet = false;
}
utility::string_t LoginResponse::getAccessToken() const
{
}
utility::string_t LoginResponse::getAccessToken() const
{
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_tokenIsSet = true;
}
}
bool LoginResponse::accessTokenIsSet() const
{
bool LoginResponse::accessTokenIsSet() const
{
return m_Access_tokenIsSet;
}
}
void LoginResponse::unsetAccess_token()
{
void LoginResponse::unsetAccess_token()
{
m_Access_tokenIsSet = false;
}
utility::string_t LoginResponse::getRefreshToken() const
{
}
utility::string_t LoginResponse::getRefreshToken() const
{
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_tokenIsSet = true;
}
}
bool LoginResponse::refreshTokenIsSet() const
{
bool LoginResponse::refreshTokenIsSet() const
{
return m_Refresh_tokenIsSet;
}
}
void LoginResponse::unsetRefresh_token()
{
void LoginResponse::unsetRefresh_token()
{
m_Refresh_tokenIsSet = false;
}
int64_t LoginResponse::getExpiresIn() const
{
}
int64_t LoginResponse::getExpiresIn() const
{
return m_Expires_in;
}
}
void LoginResponse::setExpiresIn(int64_t value)
{
void LoginResponse::setExpiresIn(int64_t value)
{
m_Expires_in = value;
m_Expires_inIsSet = true;
}
}
bool LoginResponse::expiresInIsSet() const
{
bool LoginResponse::expiresInIsSet() const
{
return m_Expires_inIsSet;
}
}
void LoginResponse::unsetExpires_in()
{
void LoginResponse::unsetExpires_in()
{
m_Expires_inIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/Package.h"
namespace tribufu {
namespace models {
Package::Package()
namespace tribufu
{
namespace models
{
Package::Package()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Name = utility::conversions::to_string_t("");
@ -43,616 +43,618 @@ Package::Package()
m_CreatedIsSet = false;
m_Updated = utility::datetime();
m_UpdatedIsSet = false;
}
}
Package::~Package()
{
}
Package::~Package()
{
}
void Package::validate()
{
void Package::validate()
{
// TODO: implement validation
}
}
web::json::value Package::toJson() const
{
web::json::value Package::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_DescriptionIsSet)
if (m_DescriptionIsSet)
{
val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description);
}
if(m_Image_urlIsSet)
if (m_Image_urlIsSet)
{
val[utility::conversions::to_string_t(U("image_url"))] = ModelBase::toJson(m_Image_url);
}
if(m_Author_idIsSet)
if (m_Author_idIsSet)
{
val[utility::conversions::to_string_t(U("author_id"))] = ModelBase::toJson(m_Author_id);
}
if(m_VersionIsSet)
if (m_VersionIsSet)
{
val[utility::conversions::to_string_t(U("version"))] = ModelBase::toJson(m_Version);
}
if(m_File_urlIsSet)
if (m_File_urlIsSet)
{
val[utility::conversions::to_string_t(U("file_url"))] = ModelBase::toJson(m_File_url);
}
if(m_Raw_sizeIsSet)
if (m_Raw_sizeIsSet)
{
val[utility::conversions::to_string_t(U("raw_size"))] = ModelBase::toJson(m_Raw_size);
}
if(m_Download_countIsSet)
if (m_Download_countIsSet)
{
val[utility::conversions::to_string_t(U("download_count"))] = ModelBase::toJson(m_Download_count);
}
if(m_Last_downloadIsSet)
if (m_Last_downloadIsSet)
{
val[utility::conversions::to_string_t(U("last_download"))] = ModelBase::toJson(m_Last_download);
}
if(m_CreatedIsSet)
if (m_CreatedIsSet)
{
val[utility::conversions::to_string_t(U("created"))] = ModelBase::toJson(m_Created);
}
if(m_UpdatedIsSet)
if (m_UpdatedIsSet)
{
val[utility::conversions::to_string_t(U("updated"))] = ModelBase::toJson(m_Updated);
}
return val;
}
}
bool Package::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool Package::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("description"))))
if (val.has_field(utility::conversions::to_string_t(U("description"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("description")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription);
}
}
if(val.has_field(utility::conversions::to_string_t(U("image_url"))))
if (val.has_field(utility::conversions::to_string_t(U("image_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("image_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("image_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
setImageUrl(refVal_setImageUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("author_id"))))
if (val.has_field(utility::conversions::to_string_t(U("author_id"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("author_id")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("author_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setAuthorId;
ok &= ModelBase::fromJson(fieldValue, refVal_setAuthorId);
setAuthorId(refVal_setAuthorId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("version"))))
if (val.has_field(utility::conversions::to_string_t(U("version"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("version")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("version")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setVersion;
ok &= ModelBase::fromJson(fieldValue, refVal_setVersion);
setVersion(refVal_setVersion);
}
}
if(val.has_field(utility::conversions::to_string_t(U("file_url"))))
if (val.has_field(utility::conversions::to_string_t(U("file_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("file_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("file_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setFileUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setFileUrl);
setFileUrl(refVal_setFileUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("raw_size"))))
if (val.has_field(utility::conversions::to_string_t(U("raw_size"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("raw_size")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("raw_size")));
if (!fieldValue.is_null())
{
double refVal_setRawSize;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("download_count")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("download_count")));
if (!fieldValue.is_null())
{
int32_t refVal_setDownloadCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setDownloadCount);
setDownloadCount(refVal_setDownloadCount);
}
}
if(val.has_field(utility::conversions::to_string_t(U("last_download"))))
if (val.has_field(utility::conversions::to_string_t(U("last_download"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_download")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("last_download")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setLastDownload;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
}
return ok;
}
}
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;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool Package::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool Package::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("description"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{
utility::string_t refVal_setDescription;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
setDescription(refVal_setDescription);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
{
utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl);
setImageUrl(refVal_setImageUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("author_id"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("author_id"))))
{
utility::string_t refVal_setAuthorId;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("author_id"))), refVal_setAuthorId );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("author_id"))), refVal_setAuthorId);
setAuthorId(refVal_setAuthorId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("version"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("version"))))
{
utility::string_t refVal_setVersion;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))), refVal_setVersion );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("version"))),
refVal_setVersion);
setVersion(refVal_setVersion);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("file_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("file_url"))))
{
utility::string_t refVal_setFileUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("file_url"))), refVal_setFileUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("file_url"))), refVal_setFileUrl);
setFileUrl(refVal_setFileUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("raw_size"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("raw_size"))))
{
double refVal_setRawSize;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("raw_size"))), refVal_setRawSize );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("raw_size"))), refVal_setRawSize);
setRawSize(refVal_setRawSize);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("download_count"))))
{
int32_t refVal_setDownloadCount;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("download_count"))), refVal_setDownloadCount );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("download_count"))),
refVal_setDownloadCount);
setDownloadCount(refVal_setDownloadCount);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("last_download"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("last_download"))))
{
utility::datetime refVal_setLastDownload;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_download"))), refVal_setLastDownload );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("last_download"))),
refVal_setLastDownload);
setLastDownload(refVal_setLastDownload);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("created"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
refVal_setCreated);
setCreated(refVal_setCreated);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
return ok;
}
}
utility::string_t Package::getId() const
{
utility::string_t Package::getId() const
{
return m_Id;
}
}
void Package::setId(const utility::string_t& value)
{
void Package::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool Package::idIsSet() const
{
bool Package::idIsSet() const
{
return m_IdIsSet;
}
}
void Package::unsetId()
{
void Package::unsetId()
{
m_IdIsSet = false;
}
utility::string_t Package::getName() const
{
}
utility::string_t Package::getName() const
{
return m_Name;
}
}
void Package::setName(const utility::string_t& value)
{
void Package::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool Package::nameIsSet() const
{
bool Package::nameIsSet() const
{
return m_NameIsSet;
}
}
void Package::unsetName()
{
void Package::unsetName()
{
m_NameIsSet = false;
}
utility::string_t Package::getDescription() const
{
}
utility::string_t Package::getDescription() const
{
return m_Description;
}
}
void Package::setDescription(const utility::string_t& value)
{
void Package::setDescription(const utility::string_t &value)
{
m_Description = value;
m_DescriptionIsSet = true;
}
}
bool Package::descriptionIsSet() const
{
bool Package::descriptionIsSet() const
{
return m_DescriptionIsSet;
}
}
void Package::unsetDescription()
{
void Package::unsetDescription()
{
m_DescriptionIsSet = false;
}
utility::string_t Package::getImageUrl() const
{
}
utility::string_t Package::getImageUrl() const
{
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_urlIsSet = true;
}
}
bool Package::imageUrlIsSet() const
{
bool Package::imageUrlIsSet() const
{
return m_Image_urlIsSet;
}
}
void Package::unsetImage_url()
{
void Package::unsetImage_url()
{
m_Image_urlIsSet = false;
}
utility::string_t Package::getAuthorId() const
{
}
utility::string_t Package::getAuthorId() const
{
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_idIsSet = true;
}
}
bool Package::authorIdIsSet() const
{
bool Package::authorIdIsSet() const
{
return m_Author_idIsSet;
}
}
void Package::unsetAuthor_id()
{
void Package::unsetAuthor_id()
{
m_Author_idIsSet = false;
}
utility::string_t Package::getVersion() const
{
}
utility::string_t Package::getVersion() const
{
return m_Version;
}
}
void Package::setVersion(const utility::string_t& value)
{
void Package::setVersion(const utility::string_t &value)
{
m_Version = value;
m_VersionIsSet = true;
}
}
bool Package::versionIsSet() const
{
bool Package::versionIsSet() const
{
return m_VersionIsSet;
}
}
void Package::unsetVersion()
{
void Package::unsetVersion()
{
m_VersionIsSet = false;
}
utility::string_t Package::getFileUrl() const
{
}
utility::string_t Package::getFileUrl() const
{
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_urlIsSet = true;
}
}
bool Package::fileUrlIsSet() const
{
bool Package::fileUrlIsSet() const
{
return m_File_urlIsSet;
}
}
void Package::unsetFile_url()
{
void Package::unsetFile_url()
{
m_File_urlIsSet = false;
}
double Package::getRawSize() const
{
}
double Package::getRawSize() const
{
return m_Raw_size;
}
}
void Package::setRawSize(double value)
{
void Package::setRawSize(double value)
{
m_Raw_size = value;
m_Raw_sizeIsSet = true;
}
}
bool Package::rawSizeIsSet() const
{
bool Package::rawSizeIsSet() const
{
return m_Raw_sizeIsSet;
}
}
void Package::unsetRaw_size()
{
void Package::unsetRaw_size()
{
m_Raw_sizeIsSet = false;
}
int32_t Package::getDownloadCount() const
{
}
int32_t Package::getDownloadCount() const
{
return m_Download_count;
}
}
void Package::setDownloadCount(int32_t value)
{
void Package::setDownloadCount(int32_t value)
{
m_Download_count = value;
m_Download_countIsSet = true;
}
}
bool Package::downloadCountIsSet() const
{
bool Package::downloadCountIsSet() const
{
return m_Download_countIsSet;
}
}
void Package::unsetDownload_count()
{
void Package::unsetDownload_count()
{
m_Download_countIsSet = false;
}
utility::datetime Package::getLastDownload() const
{
}
utility::datetime Package::getLastDownload() const
{
return m_Last_download;
}
}
void Package::setLastDownload(const utility::datetime& value)
{
void Package::setLastDownload(const utility::datetime &value)
{
m_Last_download = value;
m_Last_downloadIsSet = true;
}
}
bool Package::lastDownloadIsSet() const
{
bool Package::lastDownloadIsSet() const
{
return m_Last_downloadIsSet;
}
}
void Package::unsetLast_download()
{
void Package::unsetLast_download()
{
m_Last_downloadIsSet = false;
}
utility::datetime Package::getCreated() const
{
}
utility::datetime Package::getCreated() const
{
return m_Created;
}
}
void Package::setCreated(const utility::datetime& value)
{
void Package::setCreated(const utility::datetime &value)
{
m_Created = value;
m_CreatedIsSet = true;
}
}
bool Package::createdIsSet() const
{
bool Package::createdIsSet() const
{
return m_CreatedIsSet;
}
}
void Package::unsetCreated()
{
void Package::unsetCreated()
{
m_CreatedIsSet = false;
}
utility::datetime Package::getUpdated() const
{
}
utility::datetime Package::getUpdated() const
{
return m_Updated;
}
}
void Package::setUpdated(const utility::datetime& value)
{
void Package::setUpdated(const utility::datetime &value)
{
m_Updated = value;
m_UpdatedIsSet = true;
}
}
bool Package::updatedIsSet() const
{
bool Package::updatedIsSet() const
{
return m_UpdatedIsSet;
}
}
void Package::unsetUpdated()
{
void Package::unsetUpdated()
{
m_UpdatedIsSet = false;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ProfileGame.h"
namespace tribufu {
namespace models {
ProfileGame::ProfileGame()
namespace tribufu
{
namespace models
{
ProfileGame::ProfileGame()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Name = utility::conversions::to_string_t("");
@ -40,568 +40,578 @@ ProfileGame::ProfileGame()
m_AcquiredIsSet = false;
m_Last_used = utility::datetime();
m_Last_usedIsSet = false;
}
}
ProfileGame::~ProfileGame()
{
}
ProfileGame::~ProfileGame()
{
}
void ProfileGame::validate()
{
void ProfileGame::validate()
{
// TODO: implement validation
}
}
web::json::value ProfileGame::toJson() const
{
web::json::value ProfileGame::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_Capsule_image_urlIsSet)
if (m_Capsule_image_urlIsSet)
{
val[utility::conversions::to_string_t(U("capsule_image_url"))] = ModelBase::toJson(m_Capsule_image_url);
}
if(m_Library_image_urlIsSet)
if (m_Library_image_urlIsSet)
{
val[utility::conversions::to_string_t(U("library_image_url"))] = ModelBase::toJson(m_Library_image_url);
}
if(m_SlugIsSet)
if (m_SlugIsSet)
{
val[utility::conversions::to_string_t(U("slug"))] = ModelBase::toJson(m_Slug);
}
if(m_Time_usedIsSet)
if (m_Time_usedIsSet)
{
val[utility::conversions::to_string_t(U("time_used"))] = ModelBase::toJson(m_Time_used);
}
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)
{
val[utility::conversions::to_string_t(U("stats"))] = ModelBase::toJson(m_Stats);
}
if(m_AcquiredIsSet)
if (m_AcquiredIsSet)
{
val[utility::conversions::to_string_t(U("acquired"))] = ModelBase::toJson(m_Acquired);
}
if(m_Last_usedIsSet)
if (m_Last_usedIsSet)
{
val[utility::conversions::to_string_t(U("last_used"))] = ModelBase::toJson(m_Last_used);
}
return val;
}
}
bool ProfileGame::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool ProfileGame::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("capsule_image_url"))))
if (val.has_field(utility::conversions::to_string_t(U("capsule_image_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("capsule_image_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("capsule_image_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setCapsuleImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setCapsuleImageUrl);
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("library_image_url"))))
if (val.has_field(utility::conversions::to_string_t(U("library_image_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("library_image_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("library_image_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setLibraryImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setLibraryImageUrl);
setLibraryImageUrl(refVal_setLibraryImageUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("slug"))))
if (val.has_field(utility::conversions::to_string_t(U("slug"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("slug")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("slug")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setSlug;
ok &= ModelBase::fromJson(fieldValue, refVal_setSlug);
setSlug(refVal_setSlug);
}
}
if(val.has_field(utility::conversions::to_string_t(U("time_used"))))
if (val.has_field(utility::conversions::to_string_t(U("time_used"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("time_used")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("time_used")));
if (!fieldValue.is_null())
{
double refVal_setTimeUsed;
ok &= ModelBase::fromJson(fieldValue, 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")));
if(!fieldValue.is_null())
const web::json::value &fieldValue =
val.at(utility::conversions::to_string_t(U("unlocked_achievements")));
if (!fieldValue.is_null())
{
int32_t refVal_setUnlockedAchievements;
ok &= ModelBase::fromJson(fieldValue, refVal_setUnlockedAchievements);
setUnlockedAchievements(refVal_setUnlockedAchievements);
}
}
if(val.has_field(utility::conversions::to_string_t(U("total_achievements"))))
if (val.has_field(utility::conversions::to_string_t(U("total_achievements"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("total_achievements")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("total_achievements")));
if (!fieldValue.is_null())
{
int32_t refVal_setTotalAchievements;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("stats")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("stats")));
if (!fieldValue.is_null())
{
std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromJson(fieldValue, refVal_setStats);
setStats(refVal_setStats);
}
}
if(val.has_field(utility::conversions::to_string_t(U("acquired"))))
if (val.has_field(utility::conversions::to_string_t(U("acquired"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("acquired")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("acquired")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setAcquired;
ok &= ModelBase::fromJson(fieldValue, refVal_setAcquired);
setAcquired(refVal_setAcquired);
}
}
if(val.has_field(utility::conversions::to_string_t(U("last_used"))))
if (val.has_field(utility::conversions::to_string_t(U("last_used"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("last_used")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("last_used")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromJson(fieldValue, refVal_setLastUsed);
setLastUsed(refVal_setLastUsed);
}
}
return ok;
}
}
void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ProfileGame::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool ProfileGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ProfileGame::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("capsule_image_url"))))
{
utility::string_t refVal_setCapsuleImageUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))), refVal_setCapsuleImageUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("capsule_image_url"))),
refVal_setCapsuleImageUrl);
setCapsuleImageUrl(refVal_setCapsuleImageUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("library_image_url"))))
{
utility::string_t refVal_setLibraryImageUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))), refVal_setLibraryImageUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("library_image_url"))),
refVal_setLibraryImageUrl);
setLibraryImageUrl(refVal_setLibraryImageUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("slug"))))
{
utility::string_t refVal_setSlug;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))), refVal_setSlug );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("slug"))),
refVal_setSlug);
setSlug(refVal_setSlug);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("time_used"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("time_used"))))
{
double refVal_setTimeUsed;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("time_used"))), refVal_setTimeUsed );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("time_used"))), refVal_setTimeUsed);
setTimeUsed(refVal_setTimeUsed);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("unlocked_achievements"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("unlocked_achievements"))))
{
int32_t refVal_setUnlockedAchievements;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("unlocked_achievements"))), refVal_setUnlockedAchievements );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("unlocked_achievements"))),
refVal_setUnlockedAchievements);
setUnlockedAchievements(refVal_setUnlockedAchievements);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("total_achievements"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("total_achievements"))))
{
int32_t refVal_setTotalAchievements;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("total_achievements"))), refVal_setTotalAchievements );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("total_achievements"))),
refVal_setTotalAchievements);
setTotalAchievements(refVal_setTotalAchievements);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("stats"))))
{
std::shared_ptr<AnyType> refVal_setStats;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))), refVal_setStats );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("stats"))),
refVal_setStats);
setStats(refVal_setStats);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("acquired"))))
{
utility::datetime refVal_setAcquired;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("acquired"))), refVal_setAcquired);
setAcquired(refVal_setAcquired);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("last_used"))))
{
utility::datetime refVal_setLastUsed;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("last_used"))), refVal_setLastUsed);
setLastUsed(refVal_setLastUsed);
}
return ok;
}
}
utility::string_t ProfileGame::getId() const
{
utility::string_t ProfileGame::getId() const
{
return m_Id;
}
}
void ProfileGame::setId(const utility::string_t& value)
{
void ProfileGame::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool ProfileGame::idIsSet() const
{
bool ProfileGame::idIsSet() const
{
return m_IdIsSet;
}
}
void ProfileGame::unsetId()
{
void ProfileGame::unsetId()
{
m_IdIsSet = false;
}
utility::string_t ProfileGame::getName() const
{
}
utility::string_t ProfileGame::getName() const
{
return m_Name;
}
}
void ProfileGame::setName(const utility::string_t& value)
{
void ProfileGame::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool ProfileGame::nameIsSet() const
{
bool ProfileGame::nameIsSet() const
{
return m_NameIsSet;
}
}
void ProfileGame::unsetName()
{
void ProfileGame::unsetName()
{
m_NameIsSet = false;
}
utility::string_t ProfileGame::getCapsuleImageUrl() const
{
}
utility::string_t ProfileGame::getCapsuleImageUrl() const
{
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_urlIsSet = true;
}
}
bool ProfileGame::capsuleImageUrlIsSet() const
{
bool ProfileGame::capsuleImageUrlIsSet() const
{
return m_Capsule_image_urlIsSet;
}
}
void ProfileGame::unsetCapsule_image_url()
{
void ProfileGame::unsetCapsule_image_url()
{
m_Capsule_image_urlIsSet = false;
}
utility::string_t ProfileGame::getLibraryImageUrl() const
{
}
utility::string_t ProfileGame::getLibraryImageUrl() const
{
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_urlIsSet = true;
}
}
bool ProfileGame::libraryImageUrlIsSet() const
{
bool ProfileGame::libraryImageUrlIsSet() const
{
return m_Library_image_urlIsSet;
}
}
void ProfileGame::unsetLibrary_image_url()
{
void ProfileGame::unsetLibrary_image_url()
{
m_Library_image_urlIsSet = false;
}
utility::string_t ProfileGame::getSlug() const
{
}
utility::string_t ProfileGame::getSlug() const
{
return m_Slug;
}
}
void ProfileGame::setSlug(const utility::string_t& value)
{
void ProfileGame::setSlug(const utility::string_t &value)
{
m_Slug = value;
m_SlugIsSet = true;
}
}
bool ProfileGame::slugIsSet() const
{
bool ProfileGame::slugIsSet() const
{
return m_SlugIsSet;
}
}
void ProfileGame::unsetSlug()
{
void ProfileGame::unsetSlug()
{
m_SlugIsSet = false;
}
double ProfileGame::getTimeUsed() const
{
}
double ProfileGame::getTimeUsed() const
{
return m_Time_used;
}
}
void ProfileGame::setTimeUsed(double value)
{
void ProfileGame::setTimeUsed(double value)
{
m_Time_used = value;
m_Time_usedIsSet = true;
}
}
bool ProfileGame::timeUsedIsSet() const
{
bool ProfileGame::timeUsedIsSet() const
{
return m_Time_usedIsSet;
}
}
void ProfileGame::unsetTime_used()
{
void ProfileGame::unsetTime_used()
{
m_Time_usedIsSet = false;
}
int32_t ProfileGame::getUnlockedAchievements() const
{
}
int32_t ProfileGame::getUnlockedAchievements() const
{
return m_Unlocked_achievements;
}
}
void ProfileGame::setUnlockedAchievements(int32_t value)
{
void ProfileGame::setUnlockedAchievements(int32_t value)
{
m_Unlocked_achievements = value;
m_Unlocked_achievementsIsSet = true;
}
}
bool ProfileGame::unlockedAchievementsIsSet() const
{
bool ProfileGame::unlockedAchievementsIsSet() const
{
return m_Unlocked_achievementsIsSet;
}
}
void ProfileGame::unsetUnlocked_achievements()
{
void ProfileGame::unsetUnlocked_achievements()
{
m_Unlocked_achievementsIsSet = false;
}
int32_t ProfileGame::getTotalAchievements() const
{
}
int32_t ProfileGame::getTotalAchievements() const
{
return m_Total_achievements;
}
}
void ProfileGame::setTotalAchievements(int32_t value)
{
void ProfileGame::setTotalAchievements(int32_t value)
{
m_Total_achievements = value;
m_Total_achievementsIsSet = true;
}
}
bool ProfileGame::totalAchievementsIsSet() const
{
bool ProfileGame::totalAchievementsIsSet() const
{
return m_Total_achievementsIsSet;
}
}
void ProfileGame::unsetTotal_achievements()
{
void ProfileGame::unsetTotal_achievements()
{
m_Total_achievementsIsSet = false;
}
std::shared_ptr<AnyType> ProfileGame::getStats() const
{
}
std::shared_ptr<AnyType> ProfileGame::getStats() const
{
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_StatsIsSet = true;
}
}
bool ProfileGame::statsIsSet() const
{
bool ProfileGame::statsIsSet() const
{
return m_StatsIsSet;
}
}
void ProfileGame::unsetStats()
{
void ProfileGame::unsetStats()
{
m_StatsIsSet = false;
}
utility::datetime ProfileGame::getAcquired() const
{
}
utility::datetime ProfileGame::getAcquired() const
{
return m_Acquired;
}
}
void ProfileGame::setAcquired(const utility::datetime& value)
{
void ProfileGame::setAcquired(const utility::datetime &value)
{
m_Acquired = value;
m_AcquiredIsSet = true;
}
}
bool ProfileGame::acquiredIsSet() const
{
bool ProfileGame::acquiredIsSet() const
{
return m_AcquiredIsSet;
}
}
void ProfileGame::unsetAcquired()
{
void ProfileGame::unsetAcquired()
{
m_AcquiredIsSet = false;
}
utility::datetime ProfileGame::getLastUsed() const
{
}
utility::datetime ProfileGame::getLastUsed() const
{
return m_Last_used;
}
}
void ProfileGame::setLastUsed(const utility::datetime& value)
{
void ProfileGame::setLastUsed(const utility::datetime &value)
{
m_Last_used = value;
m_Last_usedIsSet = true;
}
}
bool ProfileGame::lastUsedIsSet() const
{
bool ProfileGame::lastUsedIsSet() const
{
return m_Last_usedIsSet;
}
}
void ProfileGame::unsetLast_used()
{
void ProfileGame::unsetLast_used()
{
m_Last_usedIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ProfileGroup.h"
namespace tribufu {
namespace models {
ProfileGroup::ProfileGroup()
namespace tribufu
{
namespace models
{
ProfileGroup::ProfileGroup()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Uuid = utility::conversions::to_string_t("");
@ -38,521 +38,523 @@ ProfileGroup::ProfileGroup()
m_RankIsSet = false;
m_Since = utility::datetime();
m_SinceIsSet = false;
}
}
ProfileGroup::~ProfileGroup()
{
}
ProfileGroup::~ProfileGroup()
{
}
void ProfileGroup::validate()
{
void ProfileGroup::validate()
{
// TODO: implement validation
}
}
web::json::value ProfileGroup::toJson() const
{
web::json::value ProfileGroup::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_UuidIsSet)
if (m_UuidIsSet)
{
val[utility::conversions::to_string_t(U("uuid"))] = ModelBase::toJson(m_Uuid);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_TagIsSet)
if (m_TagIsSet)
{
val[utility::conversions::to_string_t(U("tag"))] = ModelBase::toJson(m_Tag);
}
if(m_PrivacyIsSet)
if (m_PrivacyIsSet)
{
val[utility::conversions::to_string_t(U("privacy"))] = ModelBase::toJson(m_Privacy);
}
if(m_VerifiedIsSet)
if (m_VerifiedIsSet)
{
val[utility::conversions::to_string_t(U("verified"))] = ModelBase::toJson(m_Verified);
}
if(m_Photo_urlIsSet)
if (m_Photo_urlIsSet)
{
val[utility::conversions::to_string_t(U("photo_url"))] = ModelBase::toJson(m_Photo_url);
}
if(m_Member_countIsSet)
if (m_Member_countIsSet)
{
val[utility::conversions::to_string_t(U("member_count"))] = ModelBase::toJson(m_Member_count);
}
if(m_RankIsSet)
if (m_RankIsSet)
{
val[utility::conversions::to_string_t(U("rank"))] = ModelBase::toJson(m_Rank);
}
if(m_SinceIsSet)
if (m_SinceIsSet)
{
val[utility::conversions::to_string_t(U("since"))] = ModelBase::toJson(m_Since);
}
return val;
}
}
bool ProfileGroup::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool ProfileGroup::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("uuid"))))
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("tag"))))
if (val.has_field(utility::conversions::to_string_t(U("tag"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("tag")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("tag")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setTag;
ok &= ModelBase::fromJson(fieldValue, refVal_setTag);
setTag(refVal_setTag);
}
}
if(val.has_field(utility::conversions::to_string_t(U("privacy"))))
if (val.has_field(utility::conversions::to_string_t(U("privacy"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("privacy")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("privacy")));
if (!fieldValue.is_null())
{
int32_t refVal_setPrivacy;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("verified")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("verified")));
if (!fieldValue.is_null())
{
bool refVal_setVerified;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("photo_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("member_count"))))
if (val.has_field(utility::conversions::to_string_t(U("member_count"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("member_count")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("member_count")));
if (!fieldValue.is_null())
{
int32_t refVal_setMemberCount;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("rank")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("rank")));
if (!fieldValue.is_null())
{
std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromJson(fieldValue, refVal_setRank);
setRank(refVal_setRank);
}
}
if(val.has_field(utility::conversions::to_string_t(U("since"))))
if (val.has_field(utility::conversions::to_string_t(U("since"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("since")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("since")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setSince;
ok &= ModelBase::fromJson(fieldValue, refVal_setSince);
setSince(refVal_setSince);
}
}
return ok;
}
}
void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ProfileGroup::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool ProfileGroup::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ProfileGroup::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
refVal_setUuid);
setUuid(refVal_setUuid);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("tag"))))
{
utility::string_t refVal_setTag;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))), refVal_setTag );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tag"))),
refVal_setTag);
setTag(refVal_setTag);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("privacy"))))
{
int32_t refVal_setPrivacy;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))), refVal_setPrivacy );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("privacy"))),
refVal_setPrivacy);
setPrivacy(refVal_setPrivacy);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("verified"))))
{
bool refVal_setVerified;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("verified"))), refVal_setVerified);
setVerified(refVal_setVerified);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("photo_url"))))
{
utility::string_t refVal_setPhotoUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("photo_url"))), refVal_setPhotoUrl);
setPhotoUrl(refVal_setPhotoUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("member_count"))))
{
int32_t refVal_setMemberCount;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("member_count"))), refVal_setMemberCount);
setMemberCount(refVal_setMemberCount);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("rank"))))
{
std::shared_ptr<GroupRank> refVal_setRank;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))), refVal_setRank );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("rank"))),
refVal_setRank);
setRank(refVal_setRank);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("since"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("since"))))
{
utility::datetime refVal_setSince;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))), refVal_setSince );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("since"))),
refVal_setSince);
setSince(refVal_setSince);
}
return ok;
}
}
utility::string_t ProfileGroup::getId() const
{
utility::string_t ProfileGroup::getId() const
{
return m_Id;
}
}
void ProfileGroup::setId(const utility::string_t& value)
{
void ProfileGroup::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool ProfileGroup::idIsSet() const
{
bool ProfileGroup::idIsSet() const
{
return m_IdIsSet;
}
}
void ProfileGroup::unsetId()
{
void ProfileGroup::unsetId()
{
m_IdIsSet = false;
}
utility::string_t ProfileGroup::getUuid() const
{
}
utility::string_t ProfileGroup::getUuid() const
{
return m_Uuid;
}
}
void ProfileGroup::setUuid(const utility::string_t& value)
{
void ProfileGroup::setUuid(const utility::string_t &value)
{
m_Uuid = value;
m_UuidIsSet = true;
}
}
bool ProfileGroup::uuidIsSet() const
{
bool ProfileGroup::uuidIsSet() const
{
return m_UuidIsSet;
}
}
void ProfileGroup::unsetUuid()
{
void ProfileGroup::unsetUuid()
{
m_UuidIsSet = false;
}
utility::string_t ProfileGroup::getName() const
{
}
utility::string_t ProfileGroup::getName() const
{
return m_Name;
}
}
void ProfileGroup::setName(const utility::string_t& value)
{
void ProfileGroup::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool ProfileGroup::nameIsSet() const
{
bool ProfileGroup::nameIsSet() const
{
return m_NameIsSet;
}
}
void ProfileGroup::unsetName()
{
void ProfileGroup::unsetName()
{
m_NameIsSet = false;
}
utility::string_t ProfileGroup::getTag() const
{
}
utility::string_t ProfileGroup::getTag() const
{
return m_Tag;
}
}
void ProfileGroup::setTag(const utility::string_t& value)
{
void ProfileGroup::setTag(const utility::string_t &value)
{
m_Tag = value;
m_TagIsSet = true;
}
}
bool ProfileGroup::tagIsSet() const
{
bool ProfileGroup::tagIsSet() const
{
return m_TagIsSet;
}
}
void ProfileGroup::unsetTag()
{
void ProfileGroup::unsetTag()
{
m_TagIsSet = false;
}
int32_t ProfileGroup::getPrivacy() const
{
}
int32_t ProfileGroup::getPrivacy() const
{
return m_Privacy;
}
}
void ProfileGroup::setPrivacy(int32_t value)
{
void ProfileGroup::setPrivacy(int32_t value)
{
m_Privacy = value;
m_PrivacyIsSet = true;
}
}
bool ProfileGroup::privacyIsSet() const
{
bool ProfileGroup::privacyIsSet() const
{
return m_PrivacyIsSet;
}
}
void ProfileGroup::unsetPrivacy()
{
void ProfileGroup::unsetPrivacy()
{
m_PrivacyIsSet = false;
}
bool ProfileGroup::isVerified() const
{
}
bool ProfileGroup::isVerified() const
{
return m_Verified;
}
}
void ProfileGroup::setVerified(bool value)
{
void ProfileGroup::setVerified(bool value)
{
m_Verified = value;
m_VerifiedIsSet = true;
}
}
bool ProfileGroup::verifiedIsSet() const
{
bool ProfileGroup::verifiedIsSet() const
{
return m_VerifiedIsSet;
}
}
void ProfileGroup::unsetVerified()
{
void ProfileGroup::unsetVerified()
{
m_VerifiedIsSet = false;
}
utility::string_t ProfileGroup::getPhotoUrl() const
{
}
utility::string_t ProfileGroup::getPhotoUrl() const
{
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_urlIsSet = true;
}
}
bool ProfileGroup::photoUrlIsSet() const
{
bool ProfileGroup::photoUrlIsSet() const
{
return m_Photo_urlIsSet;
}
}
void ProfileGroup::unsetPhoto_url()
{
void ProfileGroup::unsetPhoto_url()
{
m_Photo_urlIsSet = false;
}
int32_t ProfileGroup::getMemberCount() const
{
}
int32_t ProfileGroup::getMemberCount() const
{
return m_Member_count;
}
}
void ProfileGroup::setMemberCount(int32_t value)
{
void ProfileGroup::setMemberCount(int32_t value)
{
m_Member_count = value;
m_Member_countIsSet = true;
}
}
bool ProfileGroup::memberCountIsSet() const
{
bool ProfileGroup::memberCountIsSet() const
{
return m_Member_countIsSet;
}
}
void ProfileGroup::unsetMember_count()
{
void ProfileGroup::unsetMember_count()
{
m_Member_countIsSet = false;
}
std::shared_ptr<GroupRank> ProfileGroup::getRank() const
{
}
std::shared_ptr<GroupRank> ProfileGroup::getRank() const
{
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_RankIsSet = true;
}
}
bool ProfileGroup::rankIsSet() const
{
bool ProfileGroup::rankIsSet() const
{
return m_RankIsSet;
}
}
void ProfileGroup::unsetRank()
{
void ProfileGroup::unsetRank()
{
m_RankIsSet = false;
}
utility::datetime ProfileGroup::getSince() const
{
}
utility::datetime ProfileGroup::getSince() const
{
return m_Since;
}
}
void ProfileGroup::setSince(const utility::datetime& value)
{
void ProfileGroup::setSince(const utility::datetime &value)
{
m_Since = value;
m_SinceIsSet = true;
}
}
bool ProfileGroup::sinceIsSet() const
{
bool ProfileGroup::sinceIsSet() const
{
return m_SinceIsSet;
}
}
void ProfileGroup::unsetSince()
{
void ProfileGroup::unsetSince()
{
m_SinceIsSet = false;
}
}
}
}
}

View File

@ -10,112 +10,114 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/RefreshRequest.h"
namespace tribufu {
namespace models {
RefreshRequest::RefreshRequest()
namespace tribufu
{
namespace models
{
RefreshRequest::RefreshRequest()
{
m_Refresh_token = utility::conversions::to_string_t("");
m_Refresh_tokenIsSet = false;
}
}
RefreshRequest::~RefreshRequest()
{
}
RefreshRequest::~RefreshRequest()
{
}
void RefreshRequest::validate()
{
void RefreshRequest::validate()
{
// TODO: implement validation
}
}
web::json::value RefreshRequest::toJson() const
{
web::json::value RefreshRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_Refresh_tokenIsSet)
if (m_Refresh_tokenIsSet)
{
val[utility::conversions::to_string_t(U("refresh_token"))] = ModelBase::toJson(m_Refresh_token);
}
return val;
}
}
bool RefreshRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("refresh_token"))))
bool RefreshRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("refresh_token")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("refresh_token"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("refresh_token")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setRefreshToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken);
}
}
return ok;
}
}
void RefreshRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void RefreshRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_Refresh_tokenIsSet)
if (m_Refresh_tokenIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
multipart->add(ModelBase::toHttpContent(
namePrefix + utility::conversions::to_string_t(U("refresh_token")), m_Refresh_token));
}
}
}
bool RefreshRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool RefreshRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))), refVal_setRefreshToken );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("refresh_token"))),
refVal_setRefreshToken);
setRefreshToken(refVal_setRefreshToken);
}
return ok;
}
}
utility::string_t RefreshRequest::getRefreshToken() const
{
utility::string_t RefreshRequest::getRefreshToken() const
{
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_tokenIsSet = true;
}
}
bool RefreshRequest::refreshTokenIsSet() const
{
bool RefreshRequest::refreshTokenIsSet() const
{
return m_Refresh_tokenIsSet;
}
}
void RefreshRequest::unsetRefresh_token()
{
void RefreshRequest::unsetRefresh_token()
{
m_Refresh_tokenIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/RegisterRequest.h"
namespace tribufu {
namespace models {
RegisterRequest::RegisterRequest()
namespace tribufu
{
namespace models
{
RegisterRequest::RegisterRequest()
{
m_Uuid = utility::conversions::to_string_t("");
m_UuidIsSet = false;
m_Name = utility::conversions::to_string_t("");
@ -27,242 +27,243 @@ RegisterRequest::RegisterRequest()
m_EmailIsSet = false;
m_Password = utility::conversions::to_string_t("");
m_PasswordIsSet = false;
}
}
RegisterRequest::~RegisterRequest()
{
}
RegisterRequest::~RegisterRequest()
{
}
void RegisterRequest::validate()
{
void RegisterRequest::validate()
{
// TODO: implement validation
}
}
web::json::value RegisterRequest::toJson() const
{
web::json::value RegisterRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_UuidIsSet)
if (m_UuidIsSet)
{
val[utility::conversions::to_string_t(U("uuid"))] = ModelBase::toJson(m_Uuid);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_EmailIsSet)
if (m_EmailIsSet)
{
val[utility::conversions::to_string_t(U("email"))] = ModelBase::toJson(m_Email);
}
if(m_PasswordIsSet)
if (m_PasswordIsSet)
{
val[utility::conversions::to_string_t(U("password"))] = ModelBase::toJson(m_Password);
}
return val;
}
}
bool RegisterRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("uuid"))))
bool RegisterRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("uuid"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("uuid")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromJson(fieldValue, refVal_setUuid);
setUuid(refVal_setUuid);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("email"))))
if (val.has_field(utility::conversions::to_string_t(U("email"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("email")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setEmail;
ok &= ModelBase::fromJson(fieldValue, refVal_setEmail);
setEmail(refVal_setEmail);
}
}
if(val.has_field(utility::conversions::to_string_t(U("password"))))
if (val.has_field(utility::conversions::to_string_t(U("password"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("password")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("password")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setPassword;
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
setPassword(refVal_setPassword);
}
}
return ok;
}
}
void RegisterRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void RegisterRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_UuidIsSet)
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;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("uuid"))))
{
utility::string_t refVal_setUuid;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))), refVal_setUuid );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("uuid"))),
refVal_setUuid);
setUuid(refVal_setUuid);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("email"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("email"))))
{
utility::string_t refVal_setEmail;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))),
refVal_setEmail);
setEmail(refVal_setEmail);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("password"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("password"))))
{
utility::string_t refVal_setPassword;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword);
setPassword(refVal_setPassword);
}
return ok;
}
}
utility::string_t RegisterRequest::getUuid() const
{
utility::string_t RegisterRequest::getUuid() const
{
return m_Uuid;
}
}
void RegisterRequest::setUuid(const utility::string_t& value)
{
void RegisterRequest::setUuid(const utility::string_t &value)
{
m_Uuid = value;
m_UuidIsSet = true;
}
}
bool RegisterRequest::uuidIsSet() const
{
bool RegisterRequest::uuidIsSet() const
{
return m_UuidIsSet;
}
}
void RegisterRequest::unsetUuid()
{
void RegisterRequest::unsetUuid()
{
m_UuidIsSet = false;
}
utility::string_t RegisterRequest::getName() const
{
}
utility::string_t RegisterRequest::getName() const
{
return m_Name;
}
}
void RegisterRequest::setName(const utility::string_t& value)
{
void RegisterRequest::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool RegisterRequest::nameIsSet() const
{
bool RegisterRequest::nameIsSet() const
{
return m_NameIsSet;
}
}
void RegisterRequest::unsetName()
{
void RegisterRequest::unsetName()
{
m_NameIsSet = false;
}
utility::string_t RegisterRequest::getEmail() const
{
}
utility::string_t RegisterRequest::getEmail() const
{
return m_Email;
}
}
void RegisterRequest::setEmail(const utility::string_t& value)
{
void RegisterRequest::setEmail(const utility::string_t &value)
{
m_Email = value;
m_EmailIsSet = true;
}
}
bool RegisterRequest::emailIsSet() const
{
bool RegisterRequest::emailIsSet() const
{
return m_EmailIsSet;
}
}
void RegisterRequest::unsetEmail()
{
void RegisterRequest::unsetEmail()
{
m_EmailIsSet = false;
}
utility::string_t RegisterRequest::getPassword() const
{
}
utility::string_t RegisterRequest::getPassword() const
{
return m_Password;
}
}
void RegisterRequest::setPassword(const utility::string_t& value)
{
void RegisterRequest::setPassword(const utility::string_t &value)
{
m_Password = value;
m_PasswordIsSet = true;
}
}
bool RegisterRequest::passwordIsSet() const
{
bool RegisterRequest::passwordIsSet() const
{
return m_PasswordIsSet;
}
}
void RegisterRequest::unsetPassword()
{
void RegisterRequest::unsetPassword()
{
m_PasswordIsSet = false;
}
}
}
}
}

View File

@ -10,28 +10,28 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ResponseType.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
ResponseType::eResponseType toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
ResponseType::eResponseType toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("code")))
return ResponseType::eResponseType::ResponseType_CODE;
if (val == utility::conversions::to_string_t(U("token")))
return ResponseType::eResponseType::ResponseType_TOKEN;
return {};
}
}
EnumUnderlyingType fromEnum(ResponseType::eResponseType e)
{
EnumUnderlyingType fromEnum(ResponseType::eResponseType e)
{
switch (e)
{
case ResponseType::eResponseType::ResponseType_CODE:
@ -42,36 +42,37 @@ EnumUnderlyingType fromEnum(ResponseType::eResponseType e)
break;
}
return {};
}
}
}
}
ResponseType::ResponseType()
{
}
ResponseType::ResponseType()
{
}
ResponseType::~ResponseType()
{
}
ResponseType::~ResponseType()
{
}
void ResponseType::validate()
{
void ResponseType::validate()
{
// TODO: implement validation
}
}
web::json::value ResponseType::toJson() const
{
web::json::value ResponseType::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool ResponseType::fromJson(const web::json::value& val)
{
bool ResponseType::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void ResponseType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ResponseType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -80,10 +81,10 @@ void ResponseType::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool ResponseType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ResponseType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -100,19 +101,17 @@ bool ResponseType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
}
}
return ok;
}
}
ResponseType::eResponseType ResponseType::getValue() const
{
ResponseType::eResponseType ResponseType::getValue() const
{
return m_value;
}
}
void ResponseType::setValue(ResponseType::eResponseType const value)
{
void ResponseType::setValue(ResponseType::eResponseType const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,160 +10,161 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/RevokeRequest.h"
namespace tribufu {
namespace models {
RevokeRequest::RevokeRequest()
namespace tribufu
{
namespace models
{
RevokeRequest::RevokeRequest()
{
m_Token = utility::conversions::to_string_t("");
m_TokenIsSet = false;
m_Token_type_hintIsSet = false;
}
}
RevokeRequest::~RevokeRequest()
{
}
RevokeRequest::~RevokeRequest()
{
}
void RevokeRequest::validate()
{
void RevokeRequest::validate()
{
// TODO: implement validation
}
}
web::json::value RevokeRequest::toJson() const
{
web::json::value RevokeRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_TokenIsSet)
if (m_TokenIsSet)
{
val[utility::conversions::to_string_t(U("token"))] = ModelBase::toJson(m_Token);
}
if(m_Token_type_hintIsSet)
if (m_Token_type_hintIsSet)
{
val[utility::conversions::to_string_t(U("token_type_hint"))] = ModelBase::toJson(m_Token_type_hint);
}
return val;
}
}
bool RevokeRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("token"))))
bool RevokeRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("token")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("token"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("token")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setToken;
ok &= ModelBase::fromJson(fieldValue, refVal_setToken);
setToken(refVal_setToken);
}
}
if(val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
if (val.has_field(utility::conversions::to_string_t(U("token_type_hint"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("token_type_hint")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("token_type_hint")));
if (!fieldValue.is_null())
{
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromJson(fieldValue, refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint);
}
}
return ok;
}
}
void RevokeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void RevokeRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_TokenIsSet)
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 RevokeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool RevokeRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))), refVal_setToken );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token"))),
refVal_setToken);
setToken(refVal_setToken);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("token_type_hint"))))
{
std::shared_ptr<TokenHintType> refVal_setTokenTypeHint;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))), refVal_setTokenTypeHint );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("token_type_hint"))),
refVal_setTokenTypeHint);
setTokenTypeHint(refVal_setTokenTypeHint);
}
return ok;
}
}
utility::string_t RevokeRequest::getToken() const
{
utility::string_t RevokeRequest::getToken() const
{
return m_Token;
}
}
void RevokeRequest::setToken(const utility::string_t& value)
{
void RevokeRequest::setToken(const utility::string_t &value)
{
m_Token = value;
m_TokenIsSet = true;
}
}
bool RevokeRequest::tokenIsSet() const
{
bool RevokeRequest::tokenIsSet() const
{
return m_TokenIsSet;
}
}
void RevokeRequest::unsetToken()
{
void RevokeRequest::unsetToken()
{
m_TokenIsSet = false;
}
std::shared_ptr<TokenHintType> RevokeRequest::getTokenTypeHint() const
{
}
std::shared_ptr<TokenHintType> RevokeRequest::getTokenTypeHint() const
{
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_hintIsSet = true;
}
}
bool RevokeRequest::tokenTypeHintIsSet() const
{
bool RevokeRequest::tokenTypeHintIsSet() const
{
return m_Token_type_hintIsSet;
}
}
void RevokeRequest::unsetToken_type_hint()
{
void RevokeRequest::unsetToken_type_hint()
{
m_Token_type_hintIsSet = false;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/SearchRequest.h"
namespace tribufu {
namespace models {
SearchRequest::SearchRequest()
namespace tribufu
{
namespace models
{
SearchRequest::SearchRequest()
{
m_TypeIsSet = false;
m_Query = utility::conversions::to_string_t("");
m_QueryIsSet = false;
@ -26,241 +26,242 @@ SearchRequest::SearchRequest()
m_PageIsSet = false;
m_Game_id = utility::conversions::to_string_t("");
m_Game_idIsSet = false;
}
}
SearchRequest::~SearchRequest()
{
}
SearchRequest::~SearchRequest()
{
}
void SearchRequest::validate()
{
void SearchRequest::validate()
{
// TODO: implement validation
}
}
web::json::value SearchRequest::toJson() const
{
web::json::value SearchRequest::toJson() const
{
web::json::value val = web::json::value::object();
if(m_TypeIsSet)
if (m_TypeIsSet)
{
val[utility::conversions::to_string_t(U("type"))] = ModelBase::toJson(m_Type);
}
if(m_QueryIsSet)
if (m_QueryIsSet)
{
val[utility::conversions::to_string_t(U("query"))] = ModelBase::toJson(m_Query);
}
if(m_PageIsSet)
if (m_PageIsSet)
{
val[utility::conversions::to_string_t(U("page"))] = ModelBase::toJson(m_Page);
}
if(m_Game_idIsSet)
if (m_Game_idIsSet)
{
val[utility::conversions::to_string_t(U("game_id"))] = ModelBase::toJson(m_Game_id);
}
return val;
}
}
bool SearchRequest::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("type"))))
bool SearchRequest::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("type"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("type")));
if (!fieldValue.is_null())
{
std::shared_ptr<SearchType> refVal_setType;
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
setType(refVal_setType);
}
}
if(val.has_field(utility::conversions::to_string_t(U("query"))))
if (val.has_field(utility::conversions::to_string_t(U("query"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("query")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("query")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setQuery;
ok &= ModelBase::fromJson(fieldValue, refVal_setQuery);
setQuery(refVal_setQuery);
}
}
if(val.has_field(utility::conversions::to_string_t(U("page"))))
if (val.has_field(utility::conversions::to_string_t(U("page"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("page")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("page")));
if (!fieldValue.is_null())
{
int32_t refVal_setPage;
ok &= ModelBase::fromJson(fieldValue, refVal_setPage);
setPage(refVal_setPage);
}
}
if(val.has_field(utility::conversions::to_string_t(U("game_id"))))
if (val.has_field(utility::conversions::to_string_t(U("game_id"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("game_id")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("game_id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setGameId;
ok &= ModelBase::fromJson(fieldValue, refVal_setGameId);
setGameId(refVal_setGameId);
}
}
return ok;
}
}
void SearchRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void SearchRequest::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_TypeIsSet)
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));
}
}
}
bool SearchRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool SearchRequest::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_setType );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))),
refVal_setType);
setType(refVal_setType);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("query"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("query"))))
{
utility::string_t refVal_setQuery;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query"))), refVal_setQuery );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("query"))),
refVal_setQuery);
setQuery(refVal_setQuery);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("page"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("page"))))
{
int32_t refVal_setPage;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("page"))), refVal_setPage );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("page"))),
refVal_setPage);
setPage(refVal_setPage);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("game_id"))))
{
utility::string_t refVal_setGameId;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))), refVal_setGameId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("game_id"))),
refVal_setGameId);
setGameId(refVal_setGameId);
}
return ok;
}
}
std::shared_ptr<SearchType> SearchRequest::getType() const
{
std::shared_ptr<SearchType> SearchRequest::getType() const
{
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_TypeIsSet = true;
}
}
bool SearchRequest::typeIsSet() const
{
bool SearchRequest::typeIsSet() const
{
return m_TypeIsSet;
}
}
void SearchRequest::unsetType()
{
void SearchRequest::unsetType()
{
m_TypeIsSet = false;
}
utility::string_t SearchRequest::getQuery() const
{
}
utility::string_t SearchRequest::getQuery() const
{
return m_Query;
}
}
void SearchRequest::setQuery(const utility::string_t& value)
{
void SearchRequest::setQuery(const utility::string_t &value)
{
m_Query = value;
m_QueryIsSet = true;
}
}
bool SearchRequest::queryIsSet() const
{
bool SearchRequest::queryIsSet() const
{
return m_QueryIsSet;
}
}
void SearchRequest::unsetQuery()
{
void SearchRequest::unsetQuery()
{
m_QueryIsSet = false;
}
int32_t SearchRequest::getPage() const
{
}
int32_t SearchRequest::getPage() const
{
return m_Page;
}
}
void SearchRequest::setPage(int32_t value)
{
void SearchRequest::setPage(int32_t value)
{
m_Page = value;
m_PageIsSet = true;
}
}
bool SearchRequest::pageIsSet() const
{
bool SearchRequest::pageIsSet() const
{
return m_PageIsSet;
}
}
void SearchRequest::unsetPage()
{
void SearchRequest::unsetPage()
{
m_PageIsSet = false;
}
utility::string_t SearchRequest::getGameId() const
{
}
utility::string_t SearchRequest::getGameId() const
{
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_idIsSet = true;
}
}
bool SearchRequest::gameIdIsSet() const
{
bool SearchRequest::gameIdIsSet() const
{
return m_Game_idIsSet;
}
}
void SearchRequest::unsetGame_id()
{
void SearchRequest::unsetGame_id()
{
m_Game_idIsSet = false;
}
}
}
}
}

View File

@ -10,19 +10,19 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/SearchType.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
SearchType::eSearchType toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
SearchType::eSearchType toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("user")))
return SearchType::eSearchType::SearchType_USER;
if (val == utility::conversions::to_string_t(U("group")))
@ -32,10 +32,10 @@ SearchType::eSearchType toEnum(const EnumUnderlyingType& val)
if (val == utility::conversions::to_string_t(U("cluster")))
return SearchType::eSearchType::SearchType_CLUSTER;
return {};
}
}
EnumUnderlyingType fromEnum(SearchType::eSearchType e)
{
EnumUnderlyingType fromEnum(SearchType::eSearchType e)
{
switch (e)
{
case SearchType::eSearchType::SearchType_USER:
@ -50,36 +50,37 @@ EnumUnderlyingType fromEnum(SearchType::eSearchType e)
break;
}
return {};
}
}
}
}
SearchType::SearchType()
{
}
SearchType::SearchType()
{
}
SearchType::~SearchType()
{
}
SearchType::~SearchType()
{
}
void SearchType::validate()
{
void SearchType::validate()
{
// TODO: implement validation
}
}
web::json::value SearchType::toJson() const
{
web::json::value SearchType::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool SearchType::fromJson(const web::json::value& val)
{
bool SearchType::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void SearchType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void SearchType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -88,10 +89,10 @@ void SearchType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool SearchType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool SearchType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -108,19 +109,17 @@ bool SearchType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, con
}
}
return ok;
}
}
SearchType::eSearchType SearchType::getValue() const
{
SearchType::eSearchType SearchType::getValue() const
{
return m_value;
}
}
void SearchType::setValue(SearchType::eSearchType const value)
{
void SearchType::setValue(SearchType::eSearchType const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,207 +10,212 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ServerMetrics.h"
namespace tribufu {
namespace models {
ServerMetrics::ServerMetrics()
namespace tribufu
{
namespace models
{
ServerMetrics::ServerMetrics()
{
m_Server_count = 0;
m_Server_countIsSet = false;
m_Package_count = 0;
m_Package_countIsSet = false;
m_Country_count = 0;
m_Country_countIsSet = false;
}
}
ServerMetrics::~ServerMetrics()
{
}
ServerMetrics::~ServerMetrics()
{
}
void ServerMetrics::validate()
{
void ServerMetrics::validate()
{
// TODO: implement validation
}
}
web::json::value ServerMetrics::toJson() const
{
web::json::value ServerMetrics::toJson() const
{
web::json::value val = web::json::value::object();
if(m_Server_countIsSet)
if (m_Server_countIsSet)
{
val[utility::conversions::to_string_t(U("server_count"))] = ModelBase::toJson(m_Server_count);
}
if(m_Package_countIsSet)
if (m_Package_countIsSet)
{
val[utility::conversions::to_string_t(U("package_count"))] = ModelBase::toJson(m_Package_count);
}
if(m_Country_countIsSet)
if (m_Country_countIsSet)
{
val[utility::conversions::to_string_t(U("country_count"))] = ModelBase::toJson(m_Country_count);
}
return val;
}
}
bool ServerMetrics::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("server_count"))))
bool ServerMetrics::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("server_count")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("server_count"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("server_count")));
if (!fieldValue.is_null())
{
int32_t refVal_setServerCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setServerCount);
setServerCount(refVal_setServerCount);
}
}
if(val.has_field(utility::conversions::to_string_t(U("package_count"))))
if (val.has_field(utility::conversions::to_string_t(U("package_count"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("package_count")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("package_count")));
if (!fieldValue.is_null())
{
int32_t refVal_setPackageCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setPackageCount);
setPackageCount(refVal_setPackageCount);
}
}
if(val.has_field(utility::conversions::to_string_t(U("country_count"))))
if (val.has_field(utility::conversions::to_string_t(U("country_count"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("country_count")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("country_count")));
if (!fieldValue.is_null())
{
int32_t refVal_setCountryCount;
ok &= ModelBase::fromJson(fieldValue, refVal_setCountryCount);
setCountryCount(refVal_setCountryCount);
}
}
return ok;
}
}
void ServerMetrics::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ServerMetrics::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_Server_countIsSet)
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));
}
}
}
bool ServerMetrics::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ServerMetrics::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("server_count"))), refVal_setServerCount);
setServerCount(refVal_setServerCount);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("package_count"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("package_count"))))
{
int32_t refVal_setPackageCount;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("package_count"))), refVal_setPackageCount );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("package_count"))),
refVal_setPackageCount);
setPackageCount(refVal_setPackageCount);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("country_count"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("country_count"))))
{
int32_t refVal_setCountryCount;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("country_count"))), refVal_setCountryCount );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("country_count"))),
refVal_setCountryCount);
setCountryCount(refVal_setCountryCount);
}
return ok;
}
}
int32_t ServerMetrics::getServerCount() const
{
int32_t ServerMetrics::getServerCount() const
{
return m_Server_count;
}
}
void ServerMetrics::setServerCount(int32_t value)
{
void ServerMetrics::setServerCount(int32_t value)
{
m_Server_count = value;
m_Server_countIsSet = true;
}
}
bool ServerMetrics::serverCountIsSet() const
{
bool ServerMetrics::serverCountIsSet() const
{
return m_Server_countIsSet;
}
}
void ServerMetrics::unsetServer_count()
{
void ServerMetrics::unsetServer_count()
{
m_Server_countIsSet = false;
}
int32_t ServerMetrics::getPackageCount() const
{
}
int32_t ServerMetrics::getPackageCount() const
{
return m_Package_count;
}
}
void ServerMetrics::setPackageCount(int32_t value)
{
void ServerMetrics::setPackageCount(int32_t value)
{
m_Package_count = value;
m_Package_countIsSet = true;
}
}
bool ServerMetrics::packageCountIsSet() const
{
bool ServerMetrics::packageCountIsSet() const
{
return m_Package_countIsSet;
}
}
void ServerMetrics::unsetPackage_count()
{
void ServerMetrics::unsetPackage_count()
{
m_Package_countIsSet = false;
}
int32_t ServerMetrics::getCountryCount() const
{
}
int32_t ServerMetrics::getCountryCount() const
{
return m_Country_count;
}
}
void ServerMetrics::setCountryCount(int32_t value)
{
void ServerMetrics::setCountryCount(int32_t value)
{
m_Country_count = value;
m_Country_countIsSet = true;
}
}
bool ServerMetrics::countryCountIsSet() const
{
bool ServerMetrics::countryCountIsSet() const
{
return m_Country_countIsSet;
}
}
void ServerMetrics::unsetCountry_count()
{
void ServerMetrics::unsetCountry_count()
{
m_Country_countIsSet = false;
}
}
}
}
}

View File

@ -10,19 +10,19 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/ServerStatus.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
ServerStatus::eServerStatus toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
ServerStatus::eServerStatus toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("unknown")))
return ServerStatus::eServerStatus::ServerStatus_UNKNOWN;
if (val == utility::conversions::to_string_t(U("offline")))
@ -30,10 +30,10 @@ ServerStatus::eServerStatus toEnum(const EnumUnderlyingType& val)
if (val == utility::conversions::to_string_t(U("online")))
return ServerStatus::eServerStatus::ServerStatus_ONLINE;
return {};
}
}
EnumUnderlyingType fromEnum(ServerStatus::eServerStatus e)
{
EnumUnderlyingType fromEnum(ServerStatus::eServerStatus e)
{
switch (e)
{
case ServerStatus::eServerStatus::ServerStatus_UNKNOWN:
@ -46,36 +46,37 @@ EnumUnderlyingType fromEnum(ServerStatus::eServerStatus e)
break;
}
return {};
}
}
}
}
ServerStatus::ServerStatus()
{
}
ServerStatus::ServerStatus()
{
}
ServerStatus::~ServerStatus()
{
}
ServerStatus::~ServerStatus()
{
}
void ServerStatus::validate()
{
void ServerStatus::validate()
{
// TODO: implement validation
}
}
web::json::value ServerStatus::toJson() const
{
web::json::value ServerStatus::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool ServerStatus::fromJson(const web::json::value& val)
{
bool ServerStatus::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void ServerStatus::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void ServerStatus::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -84,10 +85,10 @@ void ServerStatus::toMultipart(std::shared_ptr<MultipartFormData> multipart, con
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool ServerStatus::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool ServerStatus::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -104,19 +105,17 @@ bool ServerStatus::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, c
}
}
return ok;
}
}
ServerStatus::eServerStatus ServerStatus::getValue() const
{
ServerStatus::eServerStatus ServerStatus::getValue() const
{
return m_value;
}
}
void ServerStatus::setValue(ServerStatus::eServerStatus const value)
{
void ServerStatus::setValue(ServerStatus::eServerStatus const value)
{
m_value = value;
}
}
}
}
}

View File

@ -10,15 +10,15 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/Subscription.h"
namespace tribufu {
namespace models {
Subscription::Subscription()
namespace tribufu
{
namespace models
{
Subscription::Subscription()
{
m_Id = utility::conversions::to_string_t("");
m_IdIsSet = false;
m_Name = utility::conversions::to_string_t("");
@ -32,382 +32,382 @@ Subscription::Subscription()
m_CreatedIsSet = false;
m_Updated = utility::datetime();
m_UpdatedIsSet = false;
}
}
Subscription::~Subscription()
{
}
Subscription::~Subscription()
{
}
void Subscription::validate()
{
void Subscription::validate()
{
// TODO: implement validation
}
}
web::json::value Subscription::toJson() const
{
web::json::value Subscription::toJson() const
{
web::json::value val = web::json::value::object();
if(m_IdIsSet)
if (m_IdIsSet)
{
val[utility::conversions::to_string_t(U("id"))] = ModelBase::toJson(m_Id);
}
if(m_NameIsSet)
if (m_NameIsSet)
{
val[utility::conversions::to_string_t(U("name"))] = ModelBase::toJson(m_Name);
}
if(m_DescriptionIsSet)
if (m_DescriptionIsSet)
{
val[utility::conversions::to_string_t(U("description"))] = ModelBase::toJson(m_Description);
}
if(m_Image_urlIsSet)
if (m_Image_urlIsSet)
{
val[utility::conversions::to_string_t(U("image_url"))] = ModelBase::toJson(m_Image_url);
}
if(m_PricesIsSet)
if (m_PricesIsSet)
{
val[utility::conversions::to_string_t(U("prices"))] = ModelBase::toJson(m_Prices);
}
if(m_CreatedIsSet)
if (m_CreatedIsSet)
{
val[utility::conversions::to_string_t(U("created"))] = ModelBase::toJson(m_Created);
}
if(m_UpdatedIsSet)
if (m_UpdatedIsSet)
{
val[utility::conversions::to_string_t(U("updated"))] = ModelBase::toJson(m_Updated);
}
return val;
}
}
bool Subscription::fromJson(const web::json::value& val)
{
bool ok = true;
if(val.has_field(utility::conversions::to_string_t(U("id"))))
bool Subscription::fromJson(const web::json::value &val)
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if(!fieldValue.is_null())
bool ok = true;
if (val.has_field(utility::conversions::to_string_t(U("id"))))
{
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("id")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setId;
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
setId(refVal_setId);
}
}
if(val.has_field(utility::conversions::to_string_t(U("name"))))
if (val.has_field(utility::conversions::to_string_t(U("name"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("name")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setName;
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
setName(refVal_setName);
}
}
if(val.has_field(utility::conversions::to_string_t(U("description"))))
if (val.has_field(utility::conversions::to_string_t(U("description"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("description")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("description")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setDescription;
ok &= ModelBase::fromJson(fieldValue, refVal_setDescription);
setDescription(refVal_setDescription);
}
}
if(val.has_field(utility::conversions::to_string_t(U("image_url"))))
if (val.has_field(utility::conversions::to_string_t(U("image_url"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("image_url")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("image_url")));
if (!fieldValue.is_null())
{
utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromJson(fieldValue, refVal_setImageUrl);
setImageUrl(refVal_setImageUrl);
}
}
if(val.has_field(utility::conversions::to_string_t(U("prices"))))
if (val.has_field(utility::conversions::to_string_t(U("prices"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("prices")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("prices")));
if (!fieldValue.is_null())
{
std::map<utility::string_t, double> refVal_setPrices;
ok &= ModelBase::fromJson(fieldValue, refVal_setPrices);
setPrices(refVal_setPrices);
}
}
if(val.has_field(utility::conversions::to_string_t(U("created"))))
if (val.has_field(utility::conversions::to_string_t(U("created"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("created")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromJson(fieldValue, 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"))))
{
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if(!fieldValue.is_null())
const web::json::value &fieldValue = val.at(utility::conversions::to_string_t(U("updated")));
if (!fieldValue.is_null())
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromJson(fieldValue, refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
}
return ok;
}
}
void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void Subscription::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
if(m_IdIsSet)
if (m_IdIsSet)
{
multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(U("id")), m_Id));
}
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));
}
}
}
bool Subscription::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool Subscription::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
if (namePrefix.size() > 0 &&
namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(U(".")))
{
namePrefix += utility::conversions::to_string_t(U("."));
}
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;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))),
refVal_setId);
setId(refVal_setId);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("name"))))
{
utility::string_t refVal_setName;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))),
refVal_setName);
setName(refVal_setName);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("description"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("description"))))
{
utility::string_t refVal_setDescription;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("description"))), refVal_setDescription);
setDescription(refVal_setDescription);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("image_url"))))
{
utility::string_t refVal_setImageUrl;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl );
ok &= ModelBase::fromHttpContent(
multipart->getContent(utility::conversions::to_string_t(U("image_url"))), refVal_setImageUrl);
setImageUrl(refVal_setImageUrl);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("prices"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("prices"))))
{
std::map<utility::string_t, double> refVal_setPrices;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("prices"))), refVal_setPrices );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("prices"))),
refVal_setPrices);
setPrices(refVal_setPrices);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("created"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("created"))))
{
utility::datetime refVal_setCreated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))), refVal_setCreated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("created"))),
refVal_setCreated);
setCreated(refVal_setCreated);
}
if(multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
if (multipart->hasContent(utility::conversions::to_string_t(U("updated"))))
{
utility::datetime refVal_setUpdated;
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))), refVal_setUpdated );
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("updated"))),
refVal_setUpdated);
setUpdated(refVal_setUpdated);
}
return ok;
}
}
utility::string_t Subscription::getId() const
{
utility::string_t Subscription::getId() const
{
return m_Id;
}
}
void Subscription::setId(const utility::string_t& value)
{
void Subscription::setId(const utility::string_t &value)
{
m_Id = value;
m_IdIsSet = true;
}
}
bool Subscription::idIsSet() const
{
bool Subscription::idIsSet() const
{
return m_IdIsSet;
}
}
void Subscription::unsetId()
{
void Subscription::unsetId()
{
m_IdIsSet = false;
}
utility::string_t Subscription::getName() const
{
}
utility::string_t Subscription::getName() const
{
return m_Name;
}
}
void Subscription::setName(const utility::string_t& value)
{
void Subscription::setName(const utility::string_t &value)
{
m_Name = value;
m_NameIsSet = true;
}
}
bool Subscription::nameIsSet() const
{
bool Subscription::nameIsSet() const
{
return m_NameIsSet;
}
}
void Subscription::unsetName()
{
void Subscription::unsetName()
{
m_NameIsSet = false;
}
utility::string_t Subscription::getDescription() const
{
}
utility::string_t Subscription::getDescription() const
{
return m_Description;
}
}
void Subscription::setDescription(const utility::string_t& value)
{
void Subscription::setDescription(const utility::string_t &value)
{
m_Description = value;
m_DescriptionIsSet = true;
}
}
bool Subscription::descriptionIsSet() const
{
bool Subscription::descriptionIsSet() const
{
return m_DescriptionIsSet;
}
}
void Subscription::unsetDescription()
{
void Subscription::unsetDescription()
{
m_DescriptionIsSet = false;
}
utility::string_t Subscription::getImageUrl() const
{
}
utility::string_t Subscription::getImageUrl() const
{
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_urlIsSet = true;
}
}
bool Subscription::imageUrlIsSet() const
{
bool Subscription::imageUrlIsSet() const
{
return m_Image_urlIsSet;
}
}
void Subscription::unsetImage_url()
{
void Subscription::unsetImage_url()
{
m_Image_urlIsSet = false;
}
std::map<utility::string_t, double> Subscription::getPrices() const
{
}
std::map<utility::string_t, double> Subscription::getPrices() const
{
return m_Prices;
}
}
void Subscription::setPrices(std::map<utility::string_t, double> value)
{
void Subscription::setPrices(std::map<utility::string_t, double> value)
{
m_Prices = value;
m_PricesIsSet = true;
}
}
bool Subscription::pricesIsSet() const
{
bool Subscription::pricesIsSet() const
{
return m_PricesIsSet;
}
}
void Subscription::unsetPrices()
{
void Subscription::unsetPrices()
{
m_PricesIsSet = false;
}
utility::datetime Subscription::getCreated() const
{
}
utility::datetime Subscription::getCreated() const
{
return m_Created;
}
}
void Subscription::setCreated(const utility::datetime& value)
{
void Subscription::setCreated(const utility::datetime &value)
{
m_Created = value;
m_CreatedIsSet = true;
}
}
bool Subscription::createdIsSet() const
{
bool Subscription::createdIsSet() const
{
return m_CreatedIsSet;
}
}
void Subscription::unsetCreated()
{
void Subscription::unsetCreated()
{
m_CreatedIsSet = false;
}
utility::datetime Subscription::getUpdated() const
{
}
utility::datetime Subscription::getUpdated() const
{
return m_Updated;
}
}
void Subscription::setUpdated(const utility::datetime& value)
{
void Subscription::setUpdated(const utility::datetime &value)
{
m_Updated = value;
m_UpdatedIsSet = true;
}
}
bool Subscription::updatedIsSet() const
{
bool Subscription::updatedIsSet() const
{
return m_UpdatedIsSet;
}
}
void Subscription::unsetUpdated()
{
void Subscription::unsetUpdated()
{
m_UpdatedIsSet = false;
}
}
}
}
}

View File

@ -10,28 +10,28 @@
* Do not edit the class manually.
*/
#include "tribufu++/model/TokenHintType.h"
namespace tribufu {
namespace models {
namespace
namespace tribufu
{
using EnumUnderlyingType = utility::string_t;
namespace models
{
TokenHintType::eTokenHintType toEnum(const EnumUnderlyingType& val)
{
namespace
{
using EnumUnderlyingType = utility::string_t;
TokenHintType::eTokenHintType toEnum(const EnumUnderlyingType &val)
{
if (val == utility::conversions::to_string_t(U("access_token")))
return TokenHintType::eTokenHintType::TokenHintType_ACCESS_TOKEN;
if (val == utility::conversions::to_string_t(U("refresh_token")))
return TokenHintType::eTokenHintType::TokenHintType_REFRESH_TOKEN;
return {};
}
}
EnumUnderlyingType fromEnum(TokenHintType::eTokenHintType e)
{
EnumUnderlyingType fromEnum(TokenHintType::eTokenHintType e)
{
switch (e)
{
case TokenHintType::eTokenHintType::TokenHintType_ACCESS_TOKEN:
@ -42,36 +42,37 @@ EnumUnderlyingType fromEnum(TokenHintType::eTokenHintType e)
break;
}
return {};
}
}
}
}
TokenHintType::TokenHintType()
{
}
TokenHintType::TokenHintType()
{
}
TokenHintType::~TokenHintType()
{
}
TokenHintType::~TokenHintType()
{
}
void TokenHintType::validate()
{
void TokenHintType::validate()
{
// TODO: implement validation
}
}
web::json::value TokenHintType::toJson() const
{
web::json::value TokenHintType::toJson() const
{
auto val = fromEnum(m_value);
return web::json::value(val);
}
}
bool TokenHintType::fromJson(const web::json::value& val)
{
bool TokenHintType::fromJson(const web::json::value &val)
{
m_value = toEnum(val.as_string());
return true;
}
}
void TokenHintType::toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix) const
{
void TokenHintType::toMultipart(std::shared_ptr<MultipartFormData> multipart,
const utility::string_t &prefix) const
{
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
{
@ -80,10 +81,10 @@ void TokenHintType::toMultipart(std::shared_ptr<MultipartFormData> multipart, co
auto e = fromEnum(m_value);
multipart->add(ModelBase::toHttpContent(namePrefix, e));
}
}
bool TokenHintType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& prefix)
{
bool TokenHintType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t &prefix)
{
bool ok = true;
utility::string_t namePrefix = prefix;
if (!namePrefix.empty() && namePrefix.back() != U('.'))
@ -100,19 +101,17 @@ bool TokenHintType::fromMultiPart(std::shared_ptr<MultipartFormData> multipart,
}
}
return ok;
}
}
TokenHintType::eTokenHintType TokenHintType::getValue() const
{
TokenHintType::eTokenHintType TokenHintType::getValue() const
{
return m_value;
}
}
void TokenHintType::setValue(TokenHintType::eTokenHintType const value)
{
void TokenHintType::setValue(TokenHintType::eTokenHintType const value)
{
m_value = value;
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More