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

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

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

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

public class DestinationWeightBuilder extends me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluentImpl implements VisitableBuilder{

    me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluent fluent;
    Boolean validationEnabled;

    public DestinationWeightBuilder(){
            this(true);
    }
    public DestinationWeightBuilder(Boolean validationEnabled){
            this(new DestinationWeight(), validationEnabled);
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluent fluent){
            this(fluent, true);
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluent fluent,Boolean validationEnabled){
            this(fluent, new DestinationWeight(), validationEnabled);
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluent fluent,me.snowdrop.istio.api.model.v1.routing.DestinationWeight instance){
            this(fluent, instance, true);
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeightFluent fluent,me.snowdrop.istio.api.model.v1.routing.DestinationWeight instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withDestination(instance.getDestination()); 
            fluent.withLabels(instance.getLabels()); 
            fluent.withWeight(instance.getWeight()); 
            this.validationEnabled = validationEnabled; 
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeight instance){
            this(instance,true);
    }
    public DestinationWeightBuilder(me.snowdrop.istio.api.model.v1.routing.DestinationWeight instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withDestination(instance.getDestination()); 
            this.withLabels(instance.getLabels()); 
            this.withWeight(instance.getWeight()); 
            this.validationEnabled = validationEnabled; 
    }

    public me.snowdrop.istio.api.model.v1.routing.DestinationWeight build(){
            DestinationWeight buildable = new DestinationWeight(fluent.getDestination(),fluent.getLabels(),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