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

me.snowdrop.istio.api.model.v1.networking.ServiceEntryBuilder 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 ServiceEntryBuilder extends ServiceEntryFluentImpl implements VisitableBuilder{

    ServiceEntryFluent fluent;
    Boolean validationEnabled;

    public ServiceEntryBuilder(){
            this(true);
    }
    public ServiceEntryBuilder(Boolean validationEnabled){
            this(new ServiceEntry(), validationEnabled);
    }
    public ServiceEntryBuilder(ServiceEntryFluent fluent){
            this(fluent, true);
    }
    public ServiceEntryBuilder(ServiceEntryFluent fluent,Boolean validationEnabled){
            this(fluent, new ServiceEntry(), validationEnabled);
    }
    public ServiceEntryBuilder(ServiceEntryFluent fluent,ServiceEntry instance){
            this(fluent, instance, true);
    }
    public ServiceEntryBuilder(ServiceEntryFluent fluent,ServiceEntry instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withAddresses(instance.getAddresses()); 
            fluent.withEndpoints(instance.getEndpoints()); 
            fluent.withHosts(instance.getHosts()); 
            fluent.withLocation(instance.getLocation()); 
            fluent.withPorts(instance.getPorts()); 
            fluent.withResolution(instance.getResolution()); 
            this.validationEnabled = validationEnabled; 
    }
    public ServiceEntryBuilder(ServiceEntry instance){
            this(instance,true);
    }
    public ServiceEntryBuilder(ServiceEntry instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withAddresses(instance.getAddresses()); 
            this.withEndpoints(instance.getEndpoints()); 
            this.withHosts(instance.getHosts()); 
            this.withLocation(instance.getLocation()); 
            this.withPorts(instance.getPorts()); 
            this.withResolution(instance.getResolution()); 
            this.validationEnabled = validationEnabled; 
    }

    public ServiceEntry build(){
            ServiceEntry buildable = new ServiceEntry(fluent.getAddresses(),fluent.getEndpoints(),fluent.getHosts(),fluent.getLocation(),fluent.getPorts(),fluent.getResolution());
            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;
            ServiceEntryBuilder that = (ServiceEntryBuilder) 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