/*
 * Copyright 2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.cloud.dataflow.server.cloudfoundry.config;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

/**
 * {@link ConfigurationProperties} class to configure various settings of Data Flow
 * running on Cloud Foundry.
 *
 * @author Eric Bottard
 */
@Validated
@ConfigurationProperties(CloudFoundryServerConfigurationProperties.PREFIX)
public class CloudFoundryServerConfigurationProperties {

	public static final String PREFIX = "spring.cloud.dataflow.server.cloudfoundry";
	/**
	 * Whether to turn on reactor style stacktraces.
	 */
	public boolean debugReactor = false;
	/**
	 * The target percentag of free disk space to always aim for when cleaning downloaded
	 * resources (typically via the local maven repository). Specify as an integer greater
	 * than zero and less than 100. Default is 25.
	 */
	private int freeDiskSpacePercentage = 25;

	private int maxPoolSize = 10;

	int maxWaitTime = 30000;

	@Min(0)
	@Max(100)
	public int getFreeDiskSpacePercentage() {
		return freeDiskSpacePercentage;
	}

	public void setFreeDiskSpacePercentage(int freeDiskSpacePercentage) {
		this.freeDiskSpacePercentage = freeDiskSpacePercentage;
	}

	public boolean isDebugReactor() {
		return debugReactor;
	}

	public void setDebugReactor(boolean debugReactor) {
		this.debugReactor = debugReactor;
	}

	public int getMaxPoolSize() {
		return maxPoolSize;
	}

	public void setMaxPoolSize(int maxPoolSize) {
		this.maxPoolSize = maxPoolSize;
	}

	public int getMaxWaitTime() {
		return maxWaitTime;
	}

	public void setMaxWaitTime(int maxWaitTime) {
		this.maxWaitTime = maxWaitTime;
	}

}

@@ -686,91 +686,8 @@
 g;%0A%0A
-import javax.validation.constraints.Max;%0Aimport javax.validation.constraints.Min;%0A%0A
 impo
@@ -1295,576 +1295,66 @@
 se;%0A
-%09/**%0A%09 * The target percentag of free disk space to always aim for when cleaning downloaded%0A%09 * resources (typically via the local maven repository). Specify as an integer greater%0A%09 * than zero and less than 100. Default is 25.%0A%09 */%0A%09private int freeDiskSpacePercentage = 25;%0A%0A%09private int maxPoolSize = 10;%0A%0A%09int maxWaitTime = 30000;%0A%0A%09@Min(0)%0A%09@Max(100)%0A%09public int getFreeDiskSpacePercentage() %7B%0A%09%09return freeDiskSpacePercentage;%0A%09%7D%0A%0A%09public void setFreeDiskSpacePercentage(int freeDiskSpacePercentage) %7B%0A%09%09this.freeDiskSpacePercentage = freeDiskSpacePercentage;%0A%09%7D
+%0A%09private int maxPoolSize = 10;%0A%0A%09int maxWaitTime = 30000;
 %0A%0A%09p

Remove freeDiskSpacePercentage property