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

io.ap4k.openshift.config.OpenshiftConfigBuilder Maven / Gradle / Ivy

The newest version!
package io.ap4k.openshift.config;

import io.ap4k.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class OpenshiftConfigBuilder extends OpenshiftConfigFluentImpl implements VisitableBuilder{

    OpenshiftConfigFluent fluent;
    Boolean validationEnabled;

    public OpenshiftConfigBuilder(){
            this(true);
    }
    public OpenshiftConfigBuilder(Boolean validationEnabled){
            this(new OpenshiftConfig(), validationEnabled);
    }
    public OpenshiftConfigBuilder(OpenshiftConfigFluent fluent){
            this(fluent, true);
    }
    public OpenshiftConfigBuilder(OpenshiftConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new OpenshiftConfig(), validationEnabled);
    }
    public OpenshiftConfigBuilder(OpenshiftConfigFluent fluent,OpenshiftConfig instance){
            this(fluent, instance, true);
    }
    public OpenshiftConfigBuilder(OpenshiftConfigFluent fluent,OpenshiftConfig instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withProject(instance.getProject()); 
            fluent.withAttributes(instance.getAttributes()); 
            fluent.withGroup(instance.getGroup()); 
            fluent.withName(instance.getName()); 
            fluent.withVersion(instance.getVersion()); 
            fluent.withInitContainers(instance.getInitContainers()); 
            fluent.withLabels(instance.getLabels()); 
            fluent.withAnnotations(instance.getAnnotations()); 
            fluent.withEnvVars(instance.getEnvVars()); 
            fluent.withWorkingDir(instance.getWorkingDir()); 
            fluent.withCommand(instance.getCommand()); 
            fluent.withArguments(instance.getArguments()); 
            fluent.withReplicas(instance.getReplicas()); 
            fluent.withServiceAccount(instance.getServiceAccount()); 
            fluent.withHost(instance.getHost()); 
            fluent.withPorts(instance.getPorts()); 
            fluent.withServiceType(instance.getServiceType()); 
            fluent.withPvcVolumes(instance.getPvcVolumes()); 
            fluent.withSecretVolumes(instance.getSecretVolumes()); 
            fluent.withConfigMapVolumes(instance.getConfigMapVolumes()); 
            fluent.withGitRepoVolumes(instance.getGitRepoVolumes()); 
            fluent.withAwsElasticBlockStoreVolumes(instance.getAwsElasticBlockStoreVolumes()); 
            fluent.withAzureDiskVolumes(instance.getAzureDiskVolumes()); 
            fluent.withAzureFileVolumes(instance.getAzureFileVolumes()); 
            fluent.withMounts(instance.getMounts()); 
            fluent.withImagePullPolicy(instance.getImagePullPolicy()); 
            fluent.withLivenessProbe(instance.getLivenessProbe()); 
            fluent.withReadinessProbe(instance.getReadinessProbe()); 
            fluent.withSidecars(instance.getSidecars()); 
            fluent.withExpose(instance.isExpose()); 
            fluent.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            fluent.withBuildResourceGenerationEnabled(instance.isBuildResourceGenerationEnabled()); 
            fluent.withBuilderImage(instance.getBuilderImage()); 
            fluent.withBuildEnvVars(instance.getBuildEnvVars()); 
            fluent.withAutoBuildEnabled(instance.isAutoBuildEnabled()); 
            this.validationEnabled = validationEnabled; 
    }
    public OpenshiftConfigBuilder(OpenshiftConfig instance){
            this(instance,true);
    }
    public OpenshiftConfigBuilder(OpenshiftConfig instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withProject(instance.getProject()); 
            this.withAttributes(instance.getAttributes()); 
            this.withGroup(instance.getGroup()); 
            this.withName(instance.getName()); 
            this.withVersion(instance.getVersion()); 
            this.withInitContainers(instance.getInitContainers()); 
            this.withLabels(instance.getLabels()); 
            this.withAnnotations(instance.getAnnotations()); 
            this.withEnvVars(instance.getEnvVars()); 
            this.withWorkingDir(instance.getWorkingDir()); 
            this.withCommand(instance.getCommand()); 
            this.withArguments(instance.getArguments()); 
            this.withReplicas(instance.getReplicas()); 
            this.withServiceAccount(instance.getServiceAccount()); 
            this.withHost(instance.getHost()); 
            this.withPorts(instance.getPorts()); 
            this.withServiceType(instance.getServiceType()); 
            this.withPvcVolumes(instance.getPvcVolumes()); 
            this.withSecretVolumes(instance.getSecretVolumes()); 
            this.withConfigMapVolumes(instance.getConfigMapVolumes()); 
            this.withGitRepoVolumes(instance.getGitRepoVolumes()); 
            this.withAwsElasticBlockStoreVolumes(instance.getAwsElasticBlockStoreVolumes()); 
            this.withAzureDiskVolumes(instance.getAzureDiskVolumes()); 
            this.withAzureFileVolumes(instance.getAzureFileVolumes()); 
            this.withMounts(instance.getMounts()); 
            this.withImagePullPolicy(instance.getImagePullPolicy()); 
            this.withLivenessProbe(instance.getLivenessProbe()); 
            this.withReadinessProbe(instance.getReadinessProbe()); 
            this.withSidecars(instance.getSidecars()); 
            this.withExpose(instance.isExpose()); 
            this.withAutoDeployEnabled(instance.isAutoDeployEnabled()); 
            this.withBuildResourceGenerationEnabled(instance.isBuildResourceGenerationEnabled()); 
            this.withBuilderImage(instance.getBuilderImage()); 
            this.withBuildEnvVars(instance.getBuildEnvVars()); 
            this.withAutoBuildEnabled(instance.isAutoBuildEnabled()); 
            this.validationEnabled = validationEnabled; 
    }

    public EditableOpenshiftConfig build(){
            EditableOpenshiftConfig buildable = new EditableOpenshiftConfig(fluent.getProject(),fluent.getAttributes(),fluent.getGroup(),fluent.getName(),fluent.getVersion(),fluent.getInitContainers(),fluent.getLabels(),fluent.getAnnotations(),fluent.getEnvVars(),fluent.getWorkingDir(),fluent.getCommand(),fluent.getArguments(),fluent.getReplicas(),fluent.getServiceAccount(),fluent.getHost(),fluent.getPorts(),fluent.getServiceType(),fluent.getPvcVolumes(),fluent.getSecretVolumes(),fluent.getConfigMapVolumes(),fluent.getGitRepoVolumes(),fluent.getAwsElasticBlockStoreVolumes(),fluent.getAzureDiskVolumes(),fluent.getAzureFileVolumes(),fluent.getMounts(),fluent.getImagePullPolicy(),fluent.getLivenessProbe(),fluent.getReadinessProbe(),fluent.getSidecars(),fluent.isExpose(),fluent.isAutoDeployEnabled(),fluent.isBuildResourceGenerationEnabled(),fluent.getBuilderImage(),fluent.getBuildEnvVars(),fluent.isAutoBuildEnabled());
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            OpenshiftConfigBuilder that = (OpenshiftConfigBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy