protected WebAppProperty generateProperty(@NotNull final WebAppBase webAppBase, @NotNull final AppServicePlan plan) { final Map<String, String> appSettingsMap = new HashMap<>(); final Map<String, AppSetting> appSetting = webAppBase.getAppSettings(); for (final String key : appSetting.keySet()) { final AppSetting setting = appSetting.get(key); if (setting != null) { appSettingsMap.put(setting.key(), setting.value()); } } final Map<String, Object> propertyMap = new HashMap<>(); propertyMap.put(KEY_NAME, webAppBase.name()); propertyMap.put(KEY_TYPE, webAppBase.type()); propertyMap.put(KEY_RESOURCE_GRP, webAppBase.resourceGroupName()); propertyMap.put(KEY_LOCATION, webAppBase.regionName()); propertyMap.put(KEY_SUB_ID, webAppBase.manager().subscriptionId()); propertyMap.put(KEY_STATUS, webAppBase.state()); propertyMap.put(KEY_PLAN, plan.name()); propertyMap.put(KEY_URL, webAppBase.defaultHostName()); propertyMap.put(KEY_PRICING, plan.pricingTier().toString()); final String javaVersion = webAppBase.javaVersion().toString(); if (!javaVersion.equals("null")) { propertyMap.put(KEY_JAVA_VERSION, webAppBase.javaVersion().toString()); propertyMap.put(KEY_JAVA_CONTAINER, webAppBase.javaContainer()); propertyMap.put(KEY_JAVA_CONTAINER_VERSION, webAppBase.javaContainerVersion()); } propertyMap.put(KEY_OPERATING_SYS, webAppBase.operatingSystem()); propertyMap.put(KEY_APP_SETTING, appSettingsMap); return new WebAppProperty(propertyMap); }