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

me.snowdrop.istio.mixer.adapter.prometheus.BucketsDefinitionFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.mixer.adapter.prometheus;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.annotation.JsonUnwrapped;
import java.lang.Boolean;
import java.lang.Object;

public class BucketsDefinitionFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements BucketsDefinitionFluent{

    private VisitableBuilder definition;

    public BucketsDefinitionFluentImpl(){
    }
    public BucketsDefinitionFluentImpl(BucketsDefinition instance){
            this.withDefinition(instance.getDefinition()); 
    }

    
/**
 * This method has been deprecated, please use method buildDefinition instead.
 * @return The buildable object.
 */
@Deprecated public me.snowdrop.istio.mixer.adapter.prometheus.BucketsDefinition.Definition getDefinition(){
            return this.definition!=null?this.definition.build():null;
    }

    public me.snowdrop.istio.mixer.adapter.prometheus.BucketsDefinition.Definition buildDefinition(){
            return this.definition!=null?this.definition.build():null;
    }

    public A withDefinition(me.snowdrop.istio.mixer.adapter.prometheus.BucketsDefinition.Definition definition){
            if (definition instanceof ExponentialBucketsDefinition){ this.definition= new ExponentialBucketsDefinitionBuilder((ExponentialBucketsDefinition)definition); _visitables.add(this.definition);}
            if (definition instanceof LinearBucketsDefinition){ this.definition= new LinearBucketsDefinitionBuilder((LinearBucketsDefinition)definition); _visitables.add(this.definition);}
            if (definition instanceof ExplicitBucketsDefinition){ this.definition= new ExplicitBucketsDefinitionBuilder((ExplicitBucketsDefinition)definition); _visitables.add(this.definition);}
            return (A) this;
    }

    public Boolean hasDefinition(){
            return this.definition != null;
    }

    public A withExponentialBucketsDefinition(ExponentialBucketsDefinition exponentialBucketsDefinition){
            _visitables.remove(this.definition);
            if (exponentialBucketsDefinition!=null){ this.definition= new ExponentialBucketsDefinitionBuilder(exponentialBucketsDefinition); _visitables.add(this.definition);} return (A) this;
    }

    public BucketsDefinitionFluent.ExponentialBucketsDefinitionNested withNewExponentialBucketsDefinition(){
            return new ExponentialBucketsDefinitionNestedImpl();
    }

    public BucketsDefinitionFluent.ExponentialBucketsDefinitionNested withNewExponentialBucketsDefinitionLike(ExponentialBucketsDefinition item){
            return new ExponentialBucketsDefinitionNestedImpl(item);
    }

    public A withLinearBucketsDefinition(LinearBucketsDefinition linearBucketsDefinition){
            _visitables.remove(this.definition);
            if (linearBucketsDefinition!=null){ this.definition= new LinearBucketsDefinitionBuilder(linearBucketsDefinition); _visitables.add(this.definition);} return (A) this;
    }

    public BucketsDefinitionFluent.LinearBucketsDefinitionNested withNewLinearBucketsDefinition(){
            return new LinearBucketsDefinitionNestedImpl();
    }

    public BucketsDefinitionFluent.LinearBucketsDefinitionNested withNewLinearBucketsDefinitionLike(LinearBucketsDefinition item){
            return new LinearBucketsDefinitionNestedImpl(item);
    }

    public A withExplicitBucketsDefinition(ExplicitBucketsDefinition explicitBucketsDefinition){
            _visitables.remove(this.definition);
            if (explicitBucketsDefinition!=null){ this.definition= new ExplicitBucketsDefinitionBuilder(explicitBucketsDefinition); _visitables.add(this.definition);} return (A) this;
    }

    public BucketsDefinitionFluent.ExplicitBucketsDefinitionNested withNewExplicitBucketsDefinition(){
            return new ExplicitBucketsDefinitionNestedImpl();
    }

    public BucketsDefinitionFluent.ExplicitBucketsDefinitionNested withNewExplicitBucketsDefinitionLike(ExplicitBucketsDefinition item){
            return new ExplicitBucketsDefinitionNestedImpl(item);
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            BucketsDefinitionFluentImpl that = (BucketsDefinitionFluentImpl) o;
            if (definition != null ? !definition.equals(that.definition) :that.definition != null) return false;
            return true;
    }


    public class ExponentialBucketsDefinitionNestedImpl extends ExponentialBucketsDefinitionFluentImpl> implements BucketsDefinitionFluent.ExponentialBucketsDefinitionNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ExponentialBucketsDefinitionBuilder builder;
    
            ExponentialBucketsDefinitionNestedImpl(ExponentialBucketsDefinition item){
                    this.builder = new ExponentialBucketsDefinitionBuilder(this, item);
            }
            ExponentialBucketsDefinitionNestedImpl(){
                    this.builder = new ExponentialBucketsDefinitionBuilder(this);
            }
    
    public N and(){
            return (N) BucketsDefinitionFluentImpl.this.withExponentialBucketsDefinition(builder.build());
    }
    public N endExponentialBucketsDefinition(){
            return and();
    }

}
    public class LinearBucketsDefinitionNestedImpl extends LinearBucketsDefinitionFluentImpl> implements BucketsDefinitionFluent.LinearBucketsDefinitionNested,io.fabric8.kubernetes.api.builder.Nested{

            private final LinearBucketsDefinitionBuilder builder;
    
            LinearBucketsDefinitionNestedImpl(LinearBucketsDefinition item){
                    this.builder = new LinearBucketsDefinitionBuilder(this, item);
            }
            LinearBucketsDefinitionNestedImpl(){
                    this.builder = new LinearBucketsDefinitionBuilder(this);
            }
    
    public N and(){
            return (N) BucketsDefinitionFluentImpl.this.withLinearBucketsDefinition(builder.build());
    }
    public N endLinearBucketsDefinition(){
            return and();
    }

}
    public class ExplicitBucketsDefinitionNestedImpl extends ExplicitBucketsDefinitionFluentImpl> implements BucketsDefinitionFluent.ExplicitBucketsDefinitionNested,io.fabric8.kubernetes.api.builder.Nested{

            private final ExplicitBucketsDefinitionBuilder builder;
    
            ExplicitBucketsDefinitionNestedImpl(ExplicitBucketsDefinition item){
                    this.builder = new ExplicitBucketsDefinitionBuilder(this, item);
            }
            ExplicitBucketsDefinitionNestedImpl(){
                    this.builder = new ExplicitBucketsDefinitionBuilder(this);
            }
    
    public N and(){
            return (N) BucketsDefinitionFluentImpl.this.withExplicitBucketsDefinition(builder.build());
    }
    public N endExplicitBucketsDefinition(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy