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

annotations.me.snowdrop.applicationcrd.api.model.ObjectStatusBuilder Maven / Gradle / Ivy

package me.snowdrop.applicationcrd.api.model;

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

public class ObjectStatusBuilder extends ObjectStatusFluentImpl implements VisitableBuilder{

    ObjectStatusFluent fluent;
    Boolean validationEnabled;
    Validator validator;

    public ObjectStatusBuilder(){
            this(true);
    }
    public ObjectStatusBuilder(Boolean validationEnabled){
            this(new ObjectStatus(), validationEnabled);
    }
    public ObjectStatusBuilder(ObjectStatusFluent fluent){
            this(fluent, true);
    }
    public ObjectStatusBuilder(ObjectStatusFluent fluent,Boolean validationEnabled){
            this(fluent, new ObjectStatus(), validationEnabled);
    }
    public ObjectStatusBuilder(ObjectStatusFluent fluent,ObjectStatus instance){
            this(fluent, instance, true);
    }
    public ObjectStatusBuilder(ObjectStatusFluent fluent,ObjectStatus instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withGroup(instance.getGroup()); 
            fluent.withKind(instance.getKind()); 
            fluent.withLink(instance.getLink()); 
            fluent.withName(instance.getName()); 
            fluent.withStatus(instance.getStatus()); 
            this.validationEnabled = validationEnabled; 
    }
    public ObjectStatusBuilder(ObjectStatus instance){
            this(instance,true);
    }
    public ObjectStatusBuilder(ObjectStatus instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withGroup(instance.getGroup()); 
            this.withKind(instance.getKind()); 
            this.withLink(instance.getLink()); 
            this.withName(instance.getName()); 
            this.withStatus(instance.getStatus()); 
            this.validationEnabled = validationEnabled; 
    }
    public ObjectStatusBuilder(Validator validator){
            this(new ObjectStatus(), true);
    }
    public ObjectStatusBuilder(ObjectStatusFluent fluent,ObjectStatus instance,Validator validator){
            this.fluent = fluent; 
            fluent.withGroup(instance.getGroup()); 
            fluent.withKind(instance.getKind()); 
            fluent.withLink(instance.getLink()); 
            fluent.withName(instance.getName()); 
            fluent.withStatus(instance.getStatus()); 
            this.validator = validator;
            this.validationEnabled = validator != null; 
    }
    public ObjectStatusBuilder(ObjectStatus instance,Validator validator){
            this.fluent = this; 
            this.withGroup(instance.getGroup()); 
            this.withKind(instance.getKind()); 
            this.withLink(instance.getLink()); 
            this.withName(instance.getName()); 
            this.withStatus(instance.getStatus()); 
            this.validator = validator; 
            this.validationEnabled = validator != null; 
    }

    public ObjectStatus build(){
            ObjectStatus buildable = new ObjectStatus(fluent.getGroup(),fluent.getKind(),fluent.getLink(),fluent.getName(),fluent.getStatus());
            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;
            ObjectStatusBuilder that = (ObjectStatusBuilder) 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