@Test public void testParse() { Map<String, Object> parameters = ImmutableMap.<String, Object>builder() .put("backupRetentionDays", 3) .put("dbVersion", "1.2.3") .put("skuCapacity", 5) .put("skuFamily", "some-family") .put("skuTier", "some-tier") .put("geoRedundantBackup", true) .put("storageAutoGrow", true) .build(); underTest.parse(parameters); assertThat(underTest.getBackupRetentionDays().intValue()).isEqualTo(3); assertThat(underTest.getDbVersion()).isEqualTo("1.2.3"); assertThat(underTest.getSkuCapacity().intValue()).isEqualTo(5); assertThat(underTest.getSkuFamily()).isEqualTo("some-family"); assertThat(underTest.getSkuTier()).isEqualTo("some-tier"); assertThat(underTest.getGeoRedundantBackup()).isTrue(); assertThat(underTest.getStorageAutoGrow()).isTrue(); }
@Override public void parse(Map<String, Object> parameters) { backupRetentionDays = getInt(parameters, BACKUP_RETENTION_DAYS); dbVersion = getParameterOrNull(parameters, DB_VERSION); geoRedundantBackup = Boolean.valueOf(getParameterOrNull(parameters, GEO_REDUNDANT_BACKUP)); skuCapacity = getInt(parameters, SKU_CAPACITY); skuFamily = getParameterOrNull(parameters, SKU_FAMILY); skuTier = getParameterOrNull(parameters, SKU_TIER); storageAutoGrow = Boolean.valueOf(getParameterOrNull(parameters, STORAGE_AUTO_GROW)); }
AzureDatabaseServerV4Parameters extends MappableBase { @Override public void parse(Map<String, Object> parameters) { backupRetentionDays = getInt(parameters, BACKUP_RETENTION_DAYS); dbVersion = getParameterOrNull(parameters, DB_VERSION); geoRedundantBackup = Boolean.valueOf(getParameterOrNull(parameters, GEO_REDUNDANT_BACKUP)); skuCapacity = getInt(parameters, SKU_CAPACITY); skuFamily = getParameterOrNull(parameters, SKU_FAMILY); skuTier = getParameterOrNull(parameters, SKU_TIER); storageAutoGrow = Boolean.valueOf(getParameterOrNull(parameters, STORAGE_AUTO_GROW)); } }
AzureDatabaseServerV4Parameters extends MappableBase { @Override public void parse(Map<String, Object> parameters) { backupRetentionDays = getInt(parameters, BACKUP_RETENTION_DAYS); dbVersion = getParameterOrNull(parameters, DB_VERSION); geoRedundantBackup = Boolean.valueOf(getParameterOrNull(parameters, GEO_REDUNDANT_BACKUP)); skuCapacity = getInt(parameters, SKU_CAPACITY); skuFamily = getParameterOrNull(parameters, SKU_FAMILY); skuTier = getParameterOrNull(parameters, SKU_TIER); storageAutoGrow = Boolean.valueOf(getParameterOrNull(parameters, STORAGE_AUTO_GROW)); }  }
AzureDatabaseServerV4Parameters extends MappableBase { @Override public void parse(Map<String, Object> parameters) { backupRetentionDays = getInt(parameters, BACKUP_RETENTION_DAYS); dbVersion = getParameterOrNull(parameters, DB_VERSION); geoRedundantBackup = Boolean.valueOf(getParameterOrNull(parameters, GEO_REDUNDANT_BACKUP)); skuCapacity = getInt(parameters, SKU_CAPACITY); skuFamily = getParameterOrNull(parameters, SKU_FAMILY); skuTier = getParameterOrNull(parameters, SKU_TIER); storageAutoGrow = Boolean.valueOf(getParameterOrNull(parameters, STORAGE_AUTO_GROW)); }  Integer getBackupRetentionDays(); void setBackupRetentionDays(Integer backupRetentionDays); String getDbVersion(); void setDbVersion(String dbVersion); Boolean getGeoRedundantBackup(); void setGeoRedundantBackup(Boolean geoRedundantBackup); Integer getSkuCapacity(); void setSkuCapacity(Integer skuCapacity); String getSkuFamily(); void setSkuFamily(String skuFamily); String getSkuTier(); void setSkuTier(String skuTier); Boolean getStorageAutoGrow(); void setStorageAutoGrow(Boolean storageAutoGrow); @Override Map<String, Object> asMap(); @Override @JsonIgnore @ApiModelProperty(hidden = true) CloudPlatform getCloudPlatform(); @Override void parse(Map<String, Object> parameters); }
AzureDatabaseServerV4Parameters extends MappableBase { @Override public void parse(Map<String, Object> parameters) { backupRetentionDays = getInt(parameters, BACKUP_RETENTION_DAYS); dbVersion = getParameterOrNull(parameters, DB_VERSION); geoRedundantBackup = Boolean.valueOf(getParameterOrNull(parameters, GEO_REDUNDANT_BACKUP)); skuCapacity = getInt(parameters, SKU_CAPACITY); skuFamily = getParameterOrNull(parameters, SKU_FAMILY); skuTier = getParameterOrNull(parameters, SKU_TIER); storageAutoGrow = Boolean.valueOf(getParameterOrNull(parameters, STORAGE_AUTO_GROW)); }  Integer getBackupRetentionDays(); void setBackupRetentionDays(Integer backupRetentionDays); String getDbVersion(); void setDbVersion(String dbVersion); Boolean getGeoRedundantBackup(); void setGeoRedundantBackup(Boolean geoRedundantBackup); Integer getSkuCapacity(); void setSkuCapacity(Integer skuCapacity); String getSkuFamily(); void setSkuFamily(String skuFamily); String getSkuTier(); void setSkuTier(String skuTier); Boolean getStorageAutoGrow(); void setStorageAutoGrow(Boolean storageAutoGrow); @Override Map<String, Object> asMap(); @Override @JsonIgnore @ApiModelProperty(hidden = true) CloudPlatform getCloudPlatform(); @Override void parse(Map<String, Object> parameters);  }