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

io.dekorate.halkyon.config.ComponentConfig Maven / Gradle / Ivy

There is a newer version: 2.0.0.beta2
Show newest version
package io.dekorate.halkyon.config;

import io.dekorate.kubernetes.config.ConfigKey;
import io.dekorate.kubernetes.config.Configuration;
import io.dekorate.kubernetes.config.Label;
import java.lang.String;
import io.dekorate.kubernetes.config.Env;
import io.dekorate.project.Project;
import io.dekorate.halkyon.model.DeploymentMode;
import java.lang.Object;
import java.util.Map;
import io.sundr.builder.annotations.Buildable;

@io.sundr.builder.annotations.Buildable(builderPackage = "io.dekorate.deps.kubernetes.api.builder") public class ComponentConfig extends Configuration {

    private String partOf = "";
    private String name = "";
    private String version = "";
    private DeploymentMode deploymentMode = io.dekorate.halkyon.model.DeploymentMode.dev;
    private boolean exposeService = false;
    private io.dekorate.kubernetes.config.Env[] envs = new io.dekorate.kubernetes.config.Env[0];
    private io.dekorate.kubernetes.config.Label[] labels = new io.dekorate.kubernetes.config.Label[0];
    private String buildType = "s2i";
    private String remote = "origin";
    private CapabilityConfig[] provides = new io.dekorate.halkyon.config.CapabilityConfig[0];
    private RequiredCapabilityConfig[] requires = new io.dekorate.halkyon.config.RequiredCapabilityConfig[0];

    public ComponentConfig() { 
    }


    public ComponentConfig(Project project,Map attributes,String partOf,String name,String version,DeploymentMode deploymentMode,boolean exposeService,io.dekorate.kubernetes.config.Env[] envs,io.dekorate.kubernetes.config.Label[] labels,String buildType,String remote,CapabilityConfig[] provides,RequiredCapabilityConfig[] requires) { 
        super(project, attributes);
        this.partOf = partOf != null ? partOf : "";
        this.name = name != null ? name : "";
        this.version = version != null ? version : "";
        this.deploymentMode = deploymentMode != null ? deploymentMode : io.dekorate.halkyon.model.DeploymentMode.dev;
        this.exposeService = exposeService;
        this.envs = envs != null ? envs : new io.dekorate.kubernetes.config.Env[0];
        this.labels = labels != null ? labels : new io.dekorate.kubernetes.config.Label[0];
        this.buildType = buildType != null ? buildType : "s2i";
        this.remote = remote != null ? remote : "origin";
        this.provides = provides != null ? provides : new io.dekorate.halkyon.config.CapabilityConfig[0];
        this.requires = requires != null ? requires : new io.dekorate.halkyon.config.RequiredCapabilityConfig[0];
    }


    public String getPartOf() {
        return this.partOf;
    }

    public String getName() {
        return this.name;
    }

    public String getVersion() {
        return this.version;
    }

    public DeploymentMode getDeploymentMode() {
        return this.deploymentMode;
    }

    public boolean isExposeService() {
        return this.exposeService;
    }

    public io.dekorate.kubernetes.config.Env[] getEnvs() {
        return this.envs;
    }

    public io.dekorate.kubernetes.config.Label[] getLabels() {
        return this.labels;
    }

    public String getBuildType() {
        return this.buildType;
    }

    public String getRemote() {
        return this.remote;
    }

    public CapabilityConfig[] getProvides() {
        return this.provides;
    }

    public RequiredCapabilityConfig[] getRequires() {
        return this.requires;
    }

    public static ComponentConfigBuilder newComponentConfigBuilder() {
        return new io.dekorate.halkyon.config.ComponentConfigBuilder();
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        ComponentConfig that = (ComponentConfig) o;
        if (partOf != null ? !partOf.equals(that.partOf) :that.partOf != null) return false;
        if (name != null ? !name.equals(that.name) :that.name != null) return false;
        if (version != null ? !version.equals(that.version) :that.version != null) return false;
        if (deploymentMode != null ? !deploymentMode.equals(that.deploymentMode) :that.deploymentMode != null) return false;
        if (exposeService != that.exposeService) return false;
        if (envs != null ? !envs.equals(that.envs) :that.envs != null) return false;
        if (labels != null ? !labels.equals(that.labels) :that.labels != null) return false;
        if (buildType != null ? !buildType.equals(that.buildType) :that.buildType != null) return false;
        if (remote != null ? !remote.equals(that.remote) :that.remote != null) return false;
        if (provides != null ? !provides.equals(that.provides) :that.provides != null) return false;
        if (requires != null ? !requires.equals(that.requires) :that.requires != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(partOf,  name,  version,  deploymentMode,  exposeService,  envs,  labels,  buildType,  remote,  provides,  requires,  super.hashCode());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy