io.fabric8.maven.docker.config.SecretConfiguration Maven / Gradle / Ivy
package io.fabric8.maven.docker.config;
import org.apache.maven.plugins.annotations.Parameter;
import java.io.Serializable;
import java.util.Map;
/**
* @since 15/07/24
*/
public class SecretConfiguration implements Serializable {
@Parameter
private Map envs;
@Parameter
private Map files;
public Map getEnvs() {
return envs;
}
public Map getFiles() {
return files;
}
public static class Builder {
private final SecretConfiguration config = new SecretConfiguration();
private boolean isEmpty = true;
public SecretConfiguration build() {
return isEmpty ? null : config;
}
public SecretConfiguration.Builder envs(Map envs) {
config.envs = envs;
if (envs != null && !envs.isEmpty()) {
isEmpty = false;
}
return this;
}
public SecretConfiguration.Builder files(Map files) {
config.files = files;
if (files != null && !files.isEmpty()) {
isEmpty = false;
}
return this;
}
}
}