in linkedmall-20230930/include/alibabacloud/linkedmall_20230930.hpp [3179:3335]
void fromMap(map<string, boost::any> m) override {
if (m.find("brandName") != m.end() && !m["brandName"].empty()) {
brandName = make_shared<string>(boost::any_cast<string>(m["brandName"]));
}
if (m.find("canSell") != m.end() && !m["canSell"].empty()) {
canSell = make_shared<bool>(boost::any_cast<bool>(m["canSell"]));
}
if (m.find("categoryChain") != m.end() && !m["categoryChain"].empty()) {
if (typeid(vector<boost::any>) == m["categoryChain"].type()) {
vector<Category> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["categoryChain"])){
if (typeid(map<string, boost::any>) == item1.type()) {
Category model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
categoryChain = make_shared<vector<Category>>(expect1);
}
}
if (m.find("categoryLeafId") != m.end() && !m["categoryLeafId"].empty()) {
categoryLeafId = make_shared<long>(boost::any_cast<long>(m["categoryLeafId"]));
}
if (m.find("descPath") != m.end() && !m["descPath"].empty()) {
descPath = make_shared<string>(boost::any_cast<string>(m["descPath"]));
}
if (m.find("divisionCode") != m.end() && !m["divisionCode"].empty()) {
divisionCode = make_shared<string>(boost::any_cast<string>(m["divisionCode"]));
}
if (m.find("extendProperties") != m.end() && !m["extendProperties"].empty()) {
if (typeid(vector<boost::any>) == m["extendProperties"].type()) {
vector<ProductExtendProperty> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["extendProperties"])){
if (typeid(map<string, boost::any>) == item1.type()) {
ProductExtendProperty model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
extendProperties = make_shared<vector<ProductExtendProperty>>(expect1);
}
}
if (m.find("fuzzyQuantity") != m.end() && !m["fuzzyQuantity"].empty()) {
fuzzyQuantity = make_shared<string>(boost::any_cast<string>(m["fuzzyQuantity"]));
}
if (m.find("images") != m.end() && !m["images"].empty()) {
vector<string> toVec1;
if (typeid(vector<boost::any>) == m["images"].type()) {
vector<boost::any> vec1 = boost::any_cast<vector<boost::any>>(m["images"]);
for (auto item:vec1) {
toVec1.push_back(boost::any_cast<string>(item));
}
}
images = make_shared<vector<string>>(toVec1);
}
if (m.find("inGroup") != m.end() && !m["inGroup"].empty()) {
inGroup = make_shared<bool>(boost::any_cast<bool>(m["inGroup"]));
}
if (m.find("limitRules") != m.end() && !m["limitRules"].empty()) {
if (typeid(vector<boost::any>) == m["limitRules"].type()) {
vector<LimitRule> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["limitRules"])){
if (typeid(map<string, boost::any>) == item1.type()) {
LimitRule model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
limitRules = make_shared<vector<LimitRule>>(expect1);
}
}
if (m.find("lmItemId") != m.end() && !m["lmItemId"].empty()) {
lmItemId = make_shared<string>(boost::any_cast<string>(m["lmItemId"]));
}
if (m.find("picUrl") != m.end() && !m["picUrl"].empty()) {
picUrl = make_shared<string>(boost::any_cast<string>(m["picUrl"]));
}
if (m.find("productId") != m.end() && !m["productId"].empty()) {
productId = make_shared<string>(boost::any_cast<string>(m["productId"]));
}
if (m.find("productSpecs") != m.end() && !m["productSpecs"].empty()) {
if (typeid(vector<boost::any>) == m["productSpecs"].type()) {
vector<ProductSpec> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["productSpecs"])){
if (typeid(map<string, boost::any>) == item1.type()) {
ProductSpec model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
productSpecs = make_shared<vector<ProductSpec>>(expect1);
}
}
if (m.find("productStatus") != m.end() && !m["productStatus"].empty()) {
productStatus = make_shared<string>(boost::any_cast<string>(m["productStatus"]));
}
if (m.find("productType") != m.end() && !m["productType"].empty()) {
productType = make_shared<string>(boost::any_cast<string>(m["productType"]));
}
if (m.find("properties") != m.end() && !m["properties"].empty()) {
if (typeid(vector<boost::any>) == m["properties"].type()) {
vector<ProductProperty> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["properties"])){
if (typeid(map<string, boost::any>) == item1.type()) {
ProductProperty model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
properties = make_shared<vector<ProductProperty>>(expect1);
}
}
if (m.find("quantity") != m.end() && !m["quantity"].empty()) {
quantity = make_shared<long>(boost::any_cast<long>(m["quantity"]));
}
if (m.find("requestId") != m.end() && !m["requestId"].empty()) {
requestId = make_shared<string>(boost::any_cast<string>(m["requestId"]));
}
if (m.find("servicePromises") != m.end() && !m["servicePromises"].empty()) {
vector<string> toVec1;
if (typeid(vector<boost::any>) == m["servicePromises"].type()) {
vector<boost::any> vec1 = boost::any_cast<vector<boost::any>>(m["servicePromises"]);
for (auto item:vec1) {
toVec1.push_back(boost::any_cast<string>(item));
}
}
servicePromises = make_shared<vector<string>>(toVec1);
}
if (m.find("shopId") != m.end() && !m["shopId"].empty()) {
shopId = make_shared<string>(boost::any_cast<string>(m["shopId"]));
}
if (m.find("skus") != m.end() && !m["skus"].empty()) {
if (typeid(vector<boost::any>) == m["skus"].type()) {
vector<Sku> expect1;
for(auto item1:boost::any_cast<vector<boost::any>>(m["skus"])){
if (typeid(map<string, boost::any>) == item1.type()) {
Sku model2;
model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
expect1.push_back(model2);
}
}
skus = make_shared<vector<Sku>>(expect1);
}
}
if (m.find("soldQuantity") != m.end() && !m["soldQuantity"].empty()) {
soldQuantity = make_shared<string>(boost::any_cast<string>(m["soldQuantity"]));
}
if (m.find("taxCode") != m.end() && !m["taxCode"].empty()) {
taxCode = make_shared<string>(boost::any_cast<string>(m["taxCode"]));
}
if (m.find("taxRate") != m.end() && !m["taxRate"].empty()) {
taxRate = make_shared<long>(boost::any_cast<long>(m["taxRate"]));
}
if (m.find("title") != m.end() && !m["title"].empty()) {
title = make_shared<string>(boost::any_cast<string>(m["title"]));
}
}