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

io.dekorate.openshift.config.OpenshiftConfig Maven / Gradle / Ivy

There is a newer version: 4.1.4
Show newest version
package io.dekorate.openshift.config;

import io.dekorate.kubernetes.config.AzureDiskVolume;
import io.dekorate.kubernetes.config.PersistentVolumeClaimVolume;
import io.dekorate.kubernetes.config.Port;
import io.dekorate.kubernetes.config.Label;
import io.dekorate.kubernetes.config.Mount;
import java.lang.String;
import io.dekorate.kubernetes.config.Env;
import io.dekorate.kubernetes.config.Probe;
import io.dekorate.kubernetes.config.ResourceRequirements;
import io.dekorate.kubernetes.config.Container;
import io.dekorate.kubernetes.annotation.ServiceType;
import java.lang.Boolean;
import io.sundr.builder.annotations.Buildable;
import io.dekorate.kubernetes.config.AwsElasticBlockStoreVolume;
import io.dekorate.kubernetes.config.ConfigMapVolume;
import io.dekorate.kubernetes.config.ConfigKey;
import io.dekorate.kubernetes.config.SecretVolume;
import io.dekorate.kubernetes.config.BaseConfig;
import io.dekorate.kubernetes.config.Annotation;
import io.dekorate.kubernetes.config.AzureFileVolume;
import io.dekorate.kubernetes.config.HostAlias;
import java.lang.Integer;
import io.dekorate.project.Project;
import io.dekorate.kubernetes.annotation.ImagePullPolicy;
import java.lang.Object;
import java.util.Map;
import io.dekorate.kubernetes.config.GitRepoVolume;

@Buildable(builderPackage = "io.fabric8.kubernetes.api.builder") public class OpenshiftConfig extends BaseConfig {

    private io.dekorate.kubernetes.config.Container[] initContainers = new io.dekorate.kubernetes.config.Container[0];
    private Integer replicas;
    private Boolean headless;

    public OpenshiftConfig() {
    }

    public OpenshiftConfig(Project project,Map attributes,String partOf,String name,String version,io.dekorate.kubernetes.config.Label[] labels,io.dekorate.kubernetes.config.Annotation[] annotations,io.dekorate.kubernetes.config.Env[] envVars,String workingDir,String[] command,String[] arguments,String serviceAccount,String host,io.dekorate.kubernetes.config.Port[] ports,ServiceType serviceType,io.dekorate.kubernetes.config.PersistentVolumeClaimVolume[] pvcVolumes,io.dekorate.kubernetes.config.SecretVolume[] secretVolumes,io.dekorate.kubernetes.config.ConfigMapVolume[] configMapVolumes,io.dekorate.kubernetes.config.GitRepoVolume[] gitRepoVolumes,io.dekorate.kubernetes.config.AwsElasticBlockStoreVolume[] awsElasticBlockStoreVolumes,io.dekorate.kubernetes.config.AzureDiskVolume[] azureDiskVolumes,io.dekorate.kubernetes.config.AzureFileVolume[] azureFileVolumes,io.dekorate.kubernetes.config.Mount[] mounts,ImagePullPolicy imagePullPolicy,String[] imagePullSecrets,HostAlias[] hostAliases,io.dekorate.kubernetes.config.Probe livenessProbe,io.dekorate.kubernetes.config.Probe readinessProbe,io.dekorate.kubernetes.config.ResourceRequirements requestResources,io.dekorate.kubernetes.config.ResourceRequirements limitResources,io.dekorate.kubernetes.config.Container[] sidecars,Boolean expose,Boolean autoDeployEnabled,io.dekorate.kubernetes.config.Container[] initContainers,Integer replicas,Boolean headless) {
        super(project, attributes, partOf, name, version, labels, annotations, envVars, workingDir, command, arguments, serviceAccount, host, ports, serviceType, pvcVolumes, secretVolumes, configMapVolumes, gitRepoVolumes, awsElasticBlockStoreVolumes, azureDiskVolumes, azureFileVolumes, mounts, imagePullPolicy, imagePullSecrets, hostAliases, livenessProbe, readinessProbe, requestResources, limitResources, sidecars, expose, autoDeployEnabled);
        this.initContainers = initContainers != null ? initContainers : new io.dekorate.kubernetes.config.Container[0];
        this.replicas = replicas;
        this.headless = headless;
    }

    public io.dekorate.kubernetes.config.Container[] getInitContainers() {
        return this.initContainers;
    }

    public Integer getReplicas() {
        return this.replicas;
    }

    public Boolean getHeadless() {
        return this.headless;
    }

    public boolean isHeadless() {
        return this.headless != null &&  this.headless;
    }

    public static OpenshiftConfigBuilder newOpenshiftConfigBuilder() {
        return new io.dekorate.openshift.config.OpenshiftConfigBuilder();
    }

    public static OpenshiftConfigBuilder newOpenshiftConfigBuilderFromDefaults() {
        return new io.dekorate.openshift.config.OpenshiftConfigBuilder().withReplicas(1).withServiceType(io.dekorate.kubernetes.annotation.ServiceType.ClusterIP).withImagePullPolicy(io.dekorate.kubernetes.annotation.ImagePullPolicy.IfNotPresent).withExpose(false).withHeadless(false).withAutoDeployEnabled(false);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OpenshiftConfig that = (OpenshiftConfig) o;
        if (initContainers != null ? !initContainers.equals(that.initContainers) :that.initContainers != null) return false;
        if (replicas != null ? !replicas.equals(that.replicas) :that.replicas != null) return false;
        if (headless != null ? !headless.equals(that.headless) :that.headless != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(initContainers,  replicas,  headless,  super.hashCode());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy