/*
 * 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.skipper.client;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * Configuration properties for making a connection to the Skipper server.
 * @author Mark Pollack
 */
@ConfigurationProperties("spring.cloud.skipper.client")
public class SkipperClientProperties {

	public static final String DEFAULT_HOME = System.getProperty("user.home") + java.io.File.separator + ".skipper";

	public static final String DEFAULT_SCHEME = "http";

	public static final String DEFAULT_HOST = "localhost";

	public static final int DEFAULT_PORT = 7577; // = skpr :)

	public static final String DEFAULT_TARGET = DEFAULT_SCHEME + "://" + DEFAULT_HOST + ":" + DEFAULT_PORT + "/";

	public static final String DEFAULT_USERNAME = "";

	public static final String DEFAULT_PASSWORD = "";

	public static final String DEFAULT_SKIP_SSL_VALIDATION = "true";

	public static final String DEFAULT_CREDENTIALS_PROVIDER_COMMAND = "";

	private String home = DEFAULT_HOME;

	private String uri = DEFAULT_TARGET;

	private String username = DEFAULT_USERNAME;

	private String password = DEFAULT_PASSWORD;

	private boolean skipSllValidation = Boolean.getBoolean(DEFAULT_SKIP_SSL_VALIDATION);

	private String credentialsProviderCommand = DEFAULT_CREDENTIALS_PROVIDER_COMMAND;

	public String getHome() {
		return home;
	}

	public void setHome(String home) {
		this.home = home;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String url) {
		this.uri = url;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public boolean isSkipSllValidation() {
		return skipSllValidation;
	}

	public void setSkipSllValidation(boolean skipSllValidation) {
		this.skipSllValidation = skipSllValidation;
	}

	public String getCredentialsProviderCommand() {
		return credentialsProviderCommand;
	}

	public void setCredentialsProviderCommand(String credentialsProviderCommand) {
		this.credentialsProviderCommand = credentialsProviderCommand;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}
}

@@ -944,123 +944,8 @@
  %7B%0A%0A
-%09public static final String DEFAULT_HOME = System.getProperty(%22user.home%22) + java.io.File.separator + %22.skipper%22;%0A%0A
 %09pub
@@ -993,16 +993,16 @@
 %22http%22;%0A
+
 %0A%09public
@@ -1470,46 +1470,8 @@
 %22;%0A%0A
-%09private String home = DEFAULT_HOME;%0A%0A
 %09pri
@@ -1684,16 +1684,16 @@
 TION);%0A%0A
+
 %09private
@@ -1772,114 +1772,8 @@
 D;%0A%0A
-%09public String getHome() %7B%0A%09%09return home;%0A%09%7D%0A%0A%09public void setHome(String home) %7B%0A%09%09this.home = home;%0A%09%7D%0A%0A
 %09pub

Remove skipperHome from Skipper Client