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

me.snowdrop.istio.api.model.v1.networking.DestinationWeightBuilder Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.networking;

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

public class DestinationWeightBuilder extends DestinationWeightFluentImpl implements VisitableBuilder{

    DestinationWeightFluent fluent;
    Boolean validationEnabled;

    public DestinationWeightBuilder(){
            this(true);
    }
    public DestinationWeightBuilder(Boolean validationEnabled){
            this(new DestinationWeight(), validationEnabled);
    }
    public DestinationWeightBuilder(DestinationWeightFluent fluent){
            this(fluent, true);
    }
    public DestinationWeightBuilder(DestinationWeightFluent fluent,Boolean validationEnabled){
            this(fluent, new DestinationWeight(), validationEnabled);
    }
    public DestinationWeightBuilder(DestinationWeightFluent fluent,DestinationWeight instance){
            this(fluent, instance, true);
    }
    public DestinationWeightBuilder(DestinationWeightFluent fluent,DestinationWeight instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withDestination(instance.getDestination()); 
            fluent.withWeight(instance.getWeight()); 
            this.validationEnabled = validationEnabled; 
    }
    public DestinationWeightBuilder(DestinationWeight instance){
            this(instance,true);
    }
    public DestinationWeightBuilder(DestinationWeight instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withDestination(instance.getDestination()); 
            this.withWeight(instance.getWeight()); 
            this.validationEnabled = validationEnabled; 
    }

    public DestinationWeight build(){
            DestinationWeight buildable = new DestinationWeight(fluent.getDestination(),fluent.getWeight());
            io.fabric8.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;
            DestinationWeightBuilder that = (DestinationWeightBuilder) 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