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

annotations.me.snowdrop.servicecatalog.api.model.ServiceBindingConditionBuilder Maven / Gradle / Ivy

The newest version!
package me.snowdrop.servicecatalog.api.model;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;

public class ServiceBindingConditionBuilder extends ServiceBindingConditionFluentImpl implements VisitableBuilder{

    ServiceBindingConditionFluent fluent;
    Boolean validationEnabled;
    Validator validator;

    public ServiceBindingConditionBuilder(){
            this(true);
    }
    public ServiceBindingConditionBuilder(Boolean validationEnabled){
            this(new ServiceBindingCondition(), validationEnabled);
    }
    public ServiceBindingConditionBuilder(ServiceBindingConditionFluent fluent){
            this(fluent, true);
    }
    public ServiceBindingConditionBuilder(ServiceBindingConditionFluent fluent,Boolean validationEnabled){
            this(fluent, new ServiceBindingCondition(), validationEnabled);
    }
    public ServiceBindingConditionBuilder(ServiceBindingConditionFluent fluent,ServiceBindingCondition instance){
            this(fluent, instance, true);
    }
    public ServiceBindingConditionBuilder(ServiceBindingConditionFluent fluent,ServiceBindingCondition instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withLastTransitionTime(instance.getLastTransitionTime()); 
            fluent.withMessage(instance.getMessage()); 
            fluent.withReason(instance.getReason()); 
            fluent.withStatus(instance.getStatus()); 
            fluent.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }
    public ServiceBindingConditionBuilder(ServiceBindingCondition instance){
            this(instance,true);
    }
    public ServiceBindingConditionBuilder(ServiceBindingCondition instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withLastTransitionTime(instance.getLastTransitionTime()); 
            this.withMessage(instance.getMessage()); 
            this.withReason(instance.getReason()); 
            this.withStatus(instance.getStatus()); 
            this.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }
    public ServiceBindingConditionBuilder(Validator validator){
            this(new ServiceBindingCondition(), true);
    }
    public ServiceBindingConditionBuilder(ServiceBindingConditionFluent fluent,ServiceBindingCondition instance,Validator validator){
            this.fluent = fluent; 
            fluent.withLastTransitionTime(instance.getLastTransitionTime()); 
            fluent.withMessage(instance.getMessage()); 
            fluent.withReason(instance.getReason()); 
            fluent.withStatus(instance.getStatus()); 
            fluent.withType(instance.getType()); 
            this.validator = validator;
            this.validationEnabled = validator != null; 
    }
    public ServiceBindingConditionBuilder(ServiceBindingCondition instance,Validator validator){
            this.fluent = this; 
            this.withLastTransitionTime(instance.getLastTransitionTime()); 
            this.withMessage(instance.getMessage()); 
            this.withReason(instance.getReason()); 
            this.withStatus(instance.getStatus()); 
            this.withType(instance.getType()); 
            this.validator = validator; 
            this.validationEnabled = validator != null; 
    }

    public ServiceBindingCondition build(){
            ServiceBindingCondition buildable = new ServiceBindingCondition(fluent.getLastTransitionTime(),fluent.getMessage(),fluent.getReason(),fluent.getStatus(),fluent.getType());
            if (validationEnabled) {io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable, validator);}
            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;
            ServiceBindingConditionBuilder that = (ServiceBindingConditionBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy