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

io.alauda.kubernetes.api.model.JobConditionBuilder Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

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

public class JobConditionBuilder extends JobConditionFluentImpl implements VisitableBuilder{

    JobConditionFluent fluent;
    Boolean validationEnabled;

    public JobConditionBuilder(){
            this(true);
    }
    public JobConditionBuilder(Boolean validationEnabled){
            this(new JobCondition(), validationEnabled);
    }
    public JobConditionBuilder(JobConditionFluent fluent){
            this(fluent, true);
    }
    public JobConditionBuilder(JobConditionFluent fluent,Boolean validationEnabled){
            this(fluent, new JobCondition(), validationEnabled);
    }
    public JobConditionBuilder(JobConditionFluent fluent,JobCondition instance){
            this(fluent, instance, true);
    }
    public JobConditionBuilder(JobConditionFluent fluent,JobCondition instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withLastProbeTime(instance.getLastProbeTime()); 
            fluent.withLastTransitionTime(instance.getLastTransitionTime()); 
            fluent.withMessage(instance.getMessage()); 
            fluent.withReason(instance.getReason()); 
            fluent.withStatus(instance.getStatus()); 
            fluent.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }
    public JobConditionBuilder(JobCondition instance){
            this(instance,true);
    }
    public JobConditionBuilder(JobCondition instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withLastProbeTime(instance.getLastProbeTime()); 
            this.withLastTransitionTime(instance.getLastTransitionTime()); 
            this.withMessage(instance.getMessage()); 
            this.withReason(instance.getReason()); 
            this.withStatus(instance.getStatus()); 
            this.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }

    public JobCondition build(){
            JobCondition buildable = new JobCondition(fluent.getLastProbeTime(),fluent.getLastTransitionTime(),fluent.getMessage(),fluent.getReason(),fluent.getStatus(),fluent.getType());
            io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
            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;
            JobConditionBuilder that = (JobConditionBuilder) 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