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

annotations.me.snowdrop.istio.adapter.dogstatsd.MetricInfoBuilder Maven / Gradle / Ivy

package me.snowdrop.istio.adapter.dogstatsd;

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

public class MetricInfoBuilder extends me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluentImpl implements VisitableBuilder{

    me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluent fluent;
    Boolean validationEnabled;

    public MetricInfoBuilder(){
            this(true);
    }
    public MetricInfoBuilder(Boolean validationEnabled){
            this(new MetricInfo(), validationEnabled);
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluent fluent){
            this(fluent, true);
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluent fluent,Boolean validationEnabled){
            this(fluent, new MetricInfo(), validationEnabled);
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluent fluent,me.snowdrop.istio.adapter.dogstatsd.MetricInfo instance){
            this(fluent, instance, true);
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfoFluent fluent,me.snowdrop.istio.adapter.dogstatsd.MetricInfo instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withName(instance.getName()); 
            fluent.withTags(instance.getTags()); 
            fluent.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfo instance){
            this(instance,true);
    }
    public MetricInfoBuilder(me.snowdrop.istio.adapter.dogstatsd.MetricInfo instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withName(instance.getName()); 
            this.withTags(instance.getTags()); 
            this.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }

    public me.snowdrop.istio.adapter.dogstatsd.MetricInfo build(){
            MetricInfo buildable = new MetricInfo(fluent.getName(),fluent.getTags(),fluent.getType());
            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;
            MetricInfoBuilder that = (MetricInfoBuilder) 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