All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.fabric8.maven.docker.config.SecretConfiguration Maven / Gradle / Ivy

There is a newer version: 0.45.0
Show newest version
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;
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy