void fromMap()

in ecd-20201002/include/alibabacloud/ecd_20201002.hpp [3555:3771]


  void fromMap(map<string, boost::any> m) override {
    if (m.find("AccessType") != m.end() && !m["AccessType"].empty()) {
      accessType = make_shared<string>(boost::any_cast<string>(m["AccessType"]));
    }
    if (m.find("AliUid") != m.end() && !m["AliUid"].empty()) {
      aliUid = make_shared<long>(boost::any_cast<long>(m["AliUid"]));
    }
    if (m.find("AppId") != m.end() && !m["AppId"].empty()) {
      appId = make_shared<string>(boost::any_cast<string>(m["AppId"]));
    }
    if (m.find("AuthMode") != m.end() && !m["AuthMode"].empty()) {
      authMode = make_shared<string>(boost::any_cast<string>(m["AuthMode"]));
    }
    if (m.find("CategoryId") != m.end() && !m["CategoryId"].empty()) {
      categoryId = make_shared<long>(boost::any_cast<long>(m["CategoryId"]));
    }
    if (m.find("CategoryType") != m.end() && !m["CategoryType"].empty()) {
      categoryType = make_shared<long>(boost::any_cast<long>(m["CategoryType"]));
    }
    if (m.find("CdsName") != m.end() && !m["CdsName"].empty()) {
      cdsName = make_shared<string>(boost::any_cast<string>(m["CdsName"]));
    }
    if (m.find("CenterResourceId") != m.end() && !m["CenterResourceId"].empty()) {
      centerResourceId = make_shared<string>(boost::any_cast<string>(m["CenterResourceId"]));
    }
    if (m.find("ChargeType") != m.end() && !m["ChargeType"].empty()) {
      chargeType = make_shared<string>(boost::any_cast<string>(m["ChargeType"]));
    }
    if (m.find("Clients") != m.end() && !m["Clients"].empty()) {
      if (typeid(vector<boost::any>) == m["Clients"].type()) {
        vector<DescribeUserResourcesResponseBodyResourcesClients> expect1;
        for(auto item1:boost::any_cast<vector<boost::any>>(m["Clients"])){
          if (typeid(map<string, boost::any>) == item1.type()) {
            DescribeUserResourcesResponseBodyResourcesClients model2;
            model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
            expect1.push_back(model2);
          }
        }
        clients = make_shared<vector<DescribeUserResourcesResponseBodyResourcesClients>>(expect1);
      }
    }
    if (m.find("ConnectionProperties") != m.end() && !m["ConnectionProperties"].empty()) {
      connectionProperties = make_shared<string>(boost::any_cast<string>(m["ConnectionProperties"]));
    }
    if (m.find("CreateTime") != m.end() && !m["CreateTime"].empty()) {
      createTime = make_shared<string>(boost::any_cast<string>(m["CreateTime"]));
    }
    if (m.find("DesktopDurationList") != m.end() && !m["DesktopDurationList"].empty()) {
      if (typeid(vector<boost::any>) == m["DesktopDurationList"].type()) {
        vector<DescribeUserResourcesResponseBodyResourcesDesktopDurationList> expect1;
        for(auto item1:boost::any_cast<vector<boost::any>>(m["DesktopDurationList"])){
          if (typeid(map<string, boost::any>) == item1.type()) {
            DescribeUserResourcesResponseBodyResourcesDesktopDurationList model2;
            model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
            expect1.push_back(model2);
          }
        }
        desktopDurationList = make_shared<vector<DescribeUserResourcesResponseBodyResourcesDesktopDurationList>>(expect1);
      }
    }
    if (m.find("DesktopTimers") != m.end() && !m["DesktopTimers"].empty()) {
      if (typeid(vector<boost::any>) == m["DesktopTimers"].type()) {
        vector<DescribeUserResourcesResponseBodyResourcesDesktopTimers> expect1;
        for(auto item1:boost::any_cast<vector<boost::any>>(m["DesktopTimers"])){
          if (typeid(map<string, boost::any>) == item1.type()) {
            DescribeUserResourcesResponseBodyResourcesDesktopTimers model2;
            model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
            expect1.push_back(model2);
          }
        }
        desktopTimers = make_shared<vector<DescribeUserResourcesResponseBodyResourcesDesktopTimers>>(expect1);
      }
    }
    if (m.find("ExpiredTime") != m.end() && !m["ExpiredTime"].empty()) {
      expiredTime = make_shared<string>(boost::any_cast<string>(m["ExpiredTime"]));
    }
    if (m.find("ExternalDomainId") != m.end() && !m["ExternalDomainId"].empty()) {
      externalDomainId = make_shared<string>(boost::any_cast<string>(m["ExternalDomainId"]));
    }
    if (m.find("ExternalUserId") != m.end() && !m["ExternalUserId"].empty()) {
      externalUserId = make_shared<string>(boost::any_cast<string>(m["ExternalUserId"]));
    }
    if (m.find("FotaUpdate") != m.end() && !m["FotaUpdate"].empty()) {
      if (typeid(map<string, boost::any>) == m["FotaUpdate"].type()) {
        DescribeUserResourcesResponseBodyResourcesFotaUpdate model1;
        model1.fromMap(boost::any_cast<map<string, boost::any>>(m["FotaUpdate"]));
        fotaUpdate = make_shared<DescribeUserResourcesResponseBodyResourcesFotaUpdate>(model1);
      }
    }
    if (m.find("GlobalStatus") != m.end() && !m["GlobalStatus"].empty()) {
      globalStatus = make_shared<bool>(boost::any_cast<bool>(m["GlobalStatus"]));
    }
    if (m.find("HasUpgrade") != m.end() && !m["HasUpgrade"].empty()) {
      hasUpgrade = make_shared<bool>(boost::any_cast<bool>(m["HasUpgrade"]));
    }
    if (m.find("HibernationBeta") != m.end() && !m["HibernationBeta"].empty()) {
      hibernationBeta = make_shared<bool>(boost::any_cast<bool>(m["HibernationBeta"]));
    }
    if (m.find("Icon") != m.end() && !m["Icon"].empty()) {
      icon = make_shared<string>(boost::any_cast<string>(m["Icon"]));
    }
    if (m.find("LastStartTime") != m.end() && !m["LastStartTime"].empty()) {
      lastStartTime = make_shared<string>(boost::any_cast<string>(m["LastStartTime"]));
    }
    if (m.find("LocalName") != m.end() && !m["LocalName"].empty()) {
      localName = make_shared<string>(boost::any_cast<string>(m["LocalName"]));
    }
    if (m.find("ManagementStatuses") != m.end() && !m["ManagementStatuses"].empty()) {
      vector<string> toVec1;
      if (typeid(vector<boost::any>) == m["ManagementStatuses"].type()) {
        vector<boost::any> vec1 = boost::any_cast<vector<boost::any>>(m["ManagementStatuses"]);
        for (auto item:vec1) {
           toVec1.push_back(boost::any_cast<string>(item));
        }
      }
      managementStatuses = make_shared<vector<string>>(toVec1);
    }
    if (m.find("OfficeSiteId") != m.end() && !m["OfficeSiteId"].empty()) {
      officeSiteId = make_shared<string>(boost::any_cast<string>(m["OfficeSiteId"]));
    }
    if (m.find("OrderStatus") != m.end() && !m["OrderStatus"].empty()) {
      orderStatus = make_shared<string>(boost::any_cast<string>(m["OrderStatus"]));
    }
    if (m.find("Os") != m.end() && !m["Os"].empty()) {
      os = make_shared<string>(boost::any_cast<string>(m["Os"]));
    }
    if (m.find("OsDescription") != m.end() && !m["OsDescription"].empty()) {
      osDescription = make_shared<string>(boost::any_cast<string>(m["OsDescription"]));
    }
    if (m.find("OsType") != m.end() && !m["OsType"].empty()) {
      osType = make_shared<string>(boost::any_cast<string>(m["OsType"]));
    }
    if (m.find("OsUpdate") != m.end() && !m["OsUpdate"].empty()) {
      if (typeid(map<string, boost::any>) == m["OsUpdate"].type()) {
        DescribeUserResourcesResponseBodyResourcesOsUpdate model1;
        model1.fromMap(boost::any_cast<map<string, boost::any>>(m["OsUpdate"]));
        osUpdate = make_shared<DescribeUserResourcesResponseBodyResourcesOsUpdate>(model1);
      }
    }
    if (m.find("ProductType") != m.end() && !m["ProductType"].empty()) {
      productType = make_shared<string>(boost::any_cast<string>(m["ProductType"]));
    }
    if (m.find("ProtocolType") != m.end() && !m["ProtocolType"].empty()) {
      protocolType = make_shared<string>(boost::any_cast<string>(m["ProtocolType"]));
    }
    if (m.find("RealDesktopId") != m.end() && !m["RealDesktopId"].empty()) {
      realDesktopId = make_shared<string>(boost::any_cast<string>(m["RealDesktopId"]));
    }
    if (m.find("RegionId") != m.end() && !m["RegionId"].empty()) {
      regionId = make_shared<string>(boost::any_cast<string>(m["RegionId"]));
    }
    if (m.find("RegionLocation") != m.end() && !m["RegionLocation"].empty()) {
      regionLocation = make_shared<string>(boost::any_cast<string>(m["RegionLocation"]));
    }
    if (m.find("ResourceGroupId") != m.end() && !m["ResourceGroupId"].empty()) {
      resourceGroupId = make_shared<string>(boost::any_cast<string>(m["ResourceGroupId"]));
    }
    if (m.find("ResourceId") != m.end() && !m["ResourceId"].empty()) {
      resourceId = make_shared<string>(boost::any_cast<string>(m["ResourceId"]));
    }
    if (m.find("ResourceLevel") != m.end() && !m["ResourceLevel"].empty()) {
      resourceLevel = make_shared<string>(boost::any_cast<string>(m["ResourceLevel"]));
    }
    if (m.find("ResourceName") != m.end() && !m["ResourceName"].empty()) {
      resourceName = make_shared<string>(boost::any_cast<string>(m["ResourceName"]));
    }
    if (m.find("ResourceSessionStatus") != m.end() && !m["ResourceSessionStatus"].empty()) {
      resourceSessionStatus = make_shared<string>(boost::any_cast<string>(m["ResourceSessionStatus"]));
    }
    if (m.find("ResourceStatus") != m.end() && !m["ResourceStatus"].empty()) {
      resourceStatus = make_shared<string>(boost::any_cast<string>(m["ResourceStatus"]));
    }
    if (m.find("ResourceType") != m.end() && !m["ResourceType"].empty()) {
      resourceType = make_shared<string>(boost::any_cast<string>(m["ResourceType"]));
    }
    if (m.find("SessionType") != m.end() && !m["SessionType"].empty()) {
      sessionType = make_shared<string>(boost::any_cast<string>(m["SessionType"]));
    }
    if (m.find("Sessions") != m.end() && !m["Sessions"].empty()) {
      if (typeid(vector<boost::any>) == m["Sessions"].type()) {
        vector<DescribeUserResourcesResponseBodyResourcesSessions> expect1;
        for(auto item1:boost::any_cast<vector<boost::any>>(m["Sessions"])){
          if (typeid(map<string, boost::any>) == item1.type()) {
            DescribeUserResourcesResponseBodyResourcesSessions model2;
            model2.fromMap(boost::any_cast<map<string, boost::any>>(item1));
            expect1.push_back(model2);
          }
        }
        sessions = make_shared<vector<DescribeUserResourcesResponseBodyResourcesSessions>>(expect1);
      }
    }
    if (m.find("SubPayType") != m.end() && !m["SubPayType"].empty()) {
      subPayType = make_shared<string>(boost::any_cast<string>(m["SubPayType"]));
    }
    if (m.find("SupportHibernation") != m.end() && !m["SupportHibernation"].empty()) {
      supportHibernation = make_shared<bool>(boost::any_cast<bool>(m["SupportHibernation"]));
    }
    if (m.find("SupportedActions") != m.end() && !m["SupportedActions"].empty()) {
      vector<string> toVec1;
      if (typeid(vector<boost::any>) == m["SupportedActions"].type()) {
        vector<boost::any> vec1 = boost::any_cast<vector<boost::any>>(m["SupportedActions"]);
        for (auto item:vec1) {
           toVec1.push_back(boost::any_cast<string>(item));
        }
      }
      supportedActions = make_shared<vector<string>>(toVec1);
    }
    if (m.find("ThemeColor") != m.end() && !m["ThemeColor"].empty()) {
      themeColor = make_shared<string>(boost::any_cast<string>(m["ThemeColor"]));
    }
    if (m.find("UserCustomName") != m.end() && !m["UserCustomName"].empty()) {
      userCustomName = make_shared<string>(boost::any_cast<string>(m["UserCustomName"]));
    }
    if (m.find("Version") != m.end() && !m["Version"].empty()) {
      version = make_shared<string>(boost::any_cast<string>(m["Version"]));
    }
  }