mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 04:00:51 +00:00
update samples
This commit is contained in:
parent
af60ec7d04
commit
1e48c95d48
@ -69,9 +69,9 @@ bool ApiResponse::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("code")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int32_t refVal_code;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_code);
|
||||
setCode(refVal_code);
|
||||
int32_t refVal_setCode;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCode);
|
||||
setCode(refVal_setCode);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("type"))))
|
||||
@ -79,9 +79,9 @@ bool ApiResponse::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("type")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_type;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_type);
|
||||
setType(refVal_type);
|
||||
utility::string_t refVal_setType;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setType);
|
||||
setType(refVal_setType);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("message"))))
|
||||
@ -89,9 +89,9 @@ bool ApiResponse::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("message")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_message;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_message);
|
||||
setMessage(refVal_message);
|
||||
utility::string_t refVal_setMessage;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setMessage);
|
||||
setMessage(refVal_setMessage);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -129,21 +129,21 @@ bool ApiResponse::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, co
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("code"))))
|
||||
{
|
||||
int32_t refVal_code;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code"))), refVal_code );
|
||||
setCode(refVal_code);
|
||||
int32_t refVal_setCode;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("code"))), refVal_setCode );
|
||||
setCode(refVal_setCode);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("type"))))
|
||||
{
|
||||
utility::string_t refVal_type;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("type"))), refVal_type );
|
||||
setType(refVal_type);
|
||||
utility::string_t 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("message"))))
|
||||
{
|
||||
utility::string_t refVal_message;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("message"))), refVal_message );
|
||||
setMessage(refVal_message);
|
||||
utility::string_t refVal_setMessage;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("message"))), refVal_setMessage );
|
||||
setMessage(refVal_setMessage);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ bool Category::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_id);
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -73,9 +73,9 @@ bool Category::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_name);
|
||||
setName(refVal_name);
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -109,15 +109,15 @@ bool Category::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_id );
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_name );
|
||||
setName(refVal_name);
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
setName(refVal_setName);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -87,9 +87,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_id);
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("petId"))))
|
||||
@ -97,9 +97,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("petId")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_petId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_petId);
|
||||
setPetId(refVal_petId);
|
||||
int64_t refVal_setPetId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPetId);
|
||||
setPetId(refVal_setPetId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("quantity"))))
|
||||
@ -107,9 +107,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("quantity")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int32_t refVal_quantity;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_quantity);
|
||||
setQuantity(refVal_quantity);
|
||||
int32_t refVal_setQuantity;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setQuantity);
|
||||
setQuantity(refVal_setQuantity);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("shipDate"))))
|
||||
@ -117,9 +117,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("shipDate")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::datetime refVal_shipDate;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_shipDate);
|
||||
setShipDate(refVal_shipDate);
|
||||
utility::datetime refVal_setShipDate;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setShipDate);
|
||||
setShipDate(refVal_setShipDate);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("status"))))
|
||||
@ -127,9 +127,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_status;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_status);
|
||||
setStatus(refVal_status);
|
||||
utility::string_t refVal_setStatus;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setStatus);
|
||||
setStatus(refVal_setStatus);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("complete"))))
|
||||
@ -137,9 +137,9 @@ bool Order::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("complete")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
bool refVal_complete;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_complete);
|
||||
setComplete(refVal_complete);
|
||||
bool refVal_setComplete;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setComplete);
|
||||
setComplete(refVal_setComplete);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -189,39 +189,39 @@ bool Order::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const ut
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_id );
|
||||
setId(refVal_id);
|
||||
int64_t 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("petId"))))
|
||||
{
|
||||
int64_t refVal_petId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("petId"))), refVal_petId );
|
||||
setPetId(refVal_petId);
|
||||
int64_t refVal_setPetId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("petId"))), refVal_setPetId );
|
||||
setPetId(refVal_setPetId);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("quantity"))))
|
||||
{
|
||||
int32_t refVal_quantity;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("quantity"))), refVal_quantity );
|
||||
setQuantity(refVal_quantity);
|
||||
int32_t refVal_setQuantity;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("quantity"))), refVal_setQuantity );
|
||||
setQuantity(refVal_setQuantity);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("shipDate"))))
|
||||
{
|
||||
utility::datetime refVal_shipDate;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("shipDate"))), refVal_shipDate );
|
||||
setShipDate(refVal_shipDate);
|
||||
utility::datetime refVal_setShipDate;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("shipDate"))), refVal_setShipDate );
|
||||
setShipDate(refVal_setShipDate);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("status"))))
|
||||
{
|
||||
utility::string_t refVal_status;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_status );
|
||||
setStatus(refVal_status);
|
||||
utility::string_t refVal_setStatus;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus );
|
||||
setStatus(refVal_setStatus);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("complete"))))
|
||||
{
|
||||
bool refVal_complete;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("complete"))), refVal_complete );
|
||||
setComplete(refVal_complete);
|
||||
bool refVal_setComplete;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("complete"))), refVal_setComplete );
|
||||
setComplete(refVal_setComplete);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -84,9 +84,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_id);
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("category"))))
|
||||
@ -94,9 +94,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("category")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
std::shared_ptr<Category> refVal_category;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_category);
|
||||
setCategory(refVal_category);
|
||||
std::shared_ptr<Category> refVal_setCategory;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setCategory);
|
||||
setCategory(refVal_setCategory);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -104,9 +104,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_name);
|
||||
setName(refVal_name);
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("photoUrls"))))
|
||||
@ -114,9 +114,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("photoUrls")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
std::vector<utility::string_t> refVal_photoUrls;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_photoUrls);
|
||||
setPhotoUrls(refVal_photoUrls);
|
||||
std::vector<utility::string_t> refVal_setPhotoUrls;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhotoUrls);
|
||||
setPhotoUrls(refVal_setPhotoUrls);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("tags"))))
|
||||
@ -124,9 +124,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("tags")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
std::vector<std::shared_ptr<Tag>> refVal_tags;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_tags);
|
||||
setTags(refVal_tags);
|
||||
std::vector<std::shared_ptr<Tag>> refVal_setTags;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setTags);
|
||||
setTags(refVal_setTags);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("status"))))
|
||||
@ -134,9 +134,9 @@ bool Pet::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("status")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_status;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_status);
|
||||
setStatus(refVal_status);
|
||||
utility::string_t refVal_setStatus;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setStatus);
|
||||
setStatus(refVal_setStatus);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -186,39 +186,39 @@ bool Pet::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const util
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_id );
|
||||
setId(refVal_id);
|
||||
int64_t 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("category"))))
|
||||
{
|
||||
std::shared_ptr<Category> refVal_category;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("category"))), refVal_category );
|
||||
setCategory(refVal_category);
|
||||
std::shared_ptr<Category> refVal_setCategory;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("category"))), refVal_setCategory );
|
||||
setCategory(refVal_setCategory);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_name );
|
||||
setName(refVal_name);
|
||||
utility::string_t 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("photoUrls"))))
|
||||
{
|
||||
std::vector<utility::string_t> refVal_photoUrls;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photoUrls"))), refVal_photoUrls );
|
||||
setPhotoUrls(refVal_photoUrls);
|
||||
std::vector<utility::string_t> refVal_setPhotoUrls;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("photoUrls"))), refVal_setPhotoUrls );
|
||||
setPhotoUrls(refVal_setPhotoUrls);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("tags"))))
|
||||
{
|
||||
std::vector<std::shared_ptr<Tag>> refVal_tags;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_tags );
|
||||
setTags(refVal_tags);
|
||||
std::vector<std::shared_ptr<Tag>> refVal_setTags;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("tags"))), refVal_setTags );
|
||||
setTags(refVal_setTags);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("status"))))
|
||||
{
|
||||
utility::string_t refVal_status;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_status );
|
||||
setStatus(refVal_status);
|
||||
utility::string_t refVal_setStatus;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("status"))), refVal_setStatus );
|
||||
setStatus(refVal_setStatus);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -63,9 +63,9 @@ bool Tag::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_id);
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("name"))))
|
||||
@ -73,9 +73,9 @@ bool Tag::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("name")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_name);
|
||||
setName(refVal_name);
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setName);
|
||||
setName(refVal_setName);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -109,15 +109,15 @@ bool Tag::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const util
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_id );
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_setId );
|
||||
setId(refVal_setId);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("name"))))
|
||||
{
|
||||
utility::string_t refVal_name;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_name );
|
||||
setName(refVal_name);
|
||||
utility::string_t refVal_setName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("name"))), refVal_setName );
|
||||
setName(refVal_setName);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
@ -99,9 +99,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("id")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_id);
|
||||
setId(refVal_id);
|
||||
int64_t refVal_setId;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setId);
|
||||
setId(refVal_setId);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("username"))))
|
||||
@ -109,9 +109,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("username")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_username;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_username);
|
||||
setUsername(refVal_username);
|
||||
utility::string_t refVal_setUsername;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUsername);
|
||||
setUsername(refVal_setUsername);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("firstName"))))
|
||||
@ -119,9 +119,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("firstName")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_firstName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_firstName);
|
||||
setFirstName(refVal_firstName);
|
||||
utility::string_t refVal_setFirstName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setFirstName);
|
||||
setFirstName(refVal_setFirstName);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("lastName"))))
|
||||
@ -129,9 +129,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("lastName")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_lastName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_lastName);
|
||||
setLastName(refVal_lastName);
|
||||
utility::string_t refVal_setLastName;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setLastName);
|
||||
setLastName(refVal_setLastName);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("email"))))
|
||||
@ -139,9 +139,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("email")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_email;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_email);
|
||||
setEmail(refVal_email);
|
||||
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"))))
|
||||
@ -149,9 +149,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("password")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_password;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_password);
|
||||
setPassword(refVal_password);
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPassword);
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("phone"))))
|
||||
@ -159,9 +159,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("phone")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
utility::string_t refVal_phone;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_phone);
|
||||
setPhone(refVal_phone);
|
||||
utility::string_t refVal_setPhone;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setPhone);
|
||||
setPhone(refVal_setPhone);
|
||||
}
|
||||
}
|
||||
if(val.has_field(utility::conversions::to_string_t(U("userStatus"))))
|
||||
@ -169,9 +169,9 @@ bool User::fromJson(const web::json::value& val)
|
||||
const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(U("userStatus")));
|
||||
if(!fieldValue.is_null())
|
||||
{
|
||||
int32_t refVal_userStatus;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_userStatus);
|
||||
setUserStatus(refVal_userStatus);
|
||||
int32_t refVal_setUserStatus;
|
||||
ok &= ModelBase::fromJson(fieldValue, refVal_setUserStatus);
|
||||
setUserStatus(refVal_setUserStatus);
|
||||
}
|
||||
}
|
||||
return ok;
|
||||
@ -229,51 +229,51 @@ bool User::fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const uti
|
||||
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("id"))))
|
||||
{
|
||||
int64_t refVal_id;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("id"))), refVal_id );
|
||||
setId(refVal_id);
|
||||
int64_t 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("username"))))
|
||||
{
|
||||
utility::string_t refVal_username;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("username"))), refVal_username );
|
||||
setUsername(refVal_username);
|
||||
utility::string_t refVal_setUsername;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("username"))), refVal_setUsername );
|
||||
setUsername(refVal_setUsername);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("firstName"))))
|
||||
{
|
||||
utility::string_t refVal_firstName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("firstName"))), refVal_firstName );
|
||||
setFirstName(refVal_firstName);
|
||||
utility::string_t refVal_setFirstName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("firstName"))), refVal_setFirstName );
|
||||
setFirstName(refVal_setFirstName);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("lastName"))))
|
||||
{
|
||||
utility::string_t refVal_lastName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lastName"))), refVal_lastName );
|
||||
setLastName(refVal_lastName);
|
||||
utility::string_t refVal_setLastName;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("lastName"))), refVal_setLastName );
|
||||
setLastName(refVal_setLastName);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("email"))))
|
||||
{
|
||||
utility::string_t refVal_email;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_email );
|
||||
setEmail(refVal_email);
|
||||
utility::string_t refVal_setEmail;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("email"))), refVal_setEmail );
|
||||
setEmail(refVal_setEmail);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("password"))))
|
||||
{
|
||||
utility::string_t refVal_password;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_password );
|
||||
setPassword(refVal_password);
|
||||
utility::string_t refVal_setPassword;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("password"))), refVal_setPassword );
|
||||
setPassword(refVal_setPassword);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("phone"))))
|
||||
{
|
||||
utility::string_t refVal_phone;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_phone );
|
||||
setPhone(refVal_phone);
|
||||
utility::string_t refVal_setPhone;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("phone"))), refVal_setPhone );
|
||||
setPhone(refVal_setPhone);
|
||||
}
|
||||
if(multipart->hasContent(utility::conversions::to_string_t(U("userStatus"))))
|
||||
{
|
||||
int32_t refVal_userStatus;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("userStatus"))), refVal_userStatus );
|
||||
setUserStatus(refVal_userStatus);
|
||||
int32_t refVal_setUserStatus;
|
||||
ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(U("userStatus"))), refVal_setUserStatus );
|
||||
setUserStatus(refVal_setUserStatus);
|
||||
}
|
||||
return ok;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user