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

me.snowdrop.istio.mixer.adapter.redisquota.OverrideFluentImpl Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class OverrideFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements me.snowdrop.istio.mixer.adapter.redisquota.OverrideFluent{

    private Map dimensions;
    private Integer maxAmount;

    public OverrideFluentImpl(){
    }
    public OverrideFluentImpl(me.snowdrop.istio.mixer.adapter.redisquota.Override instance){
            this.withDimensions(instance.getDimensions()); 
            this.withMaxAmount(instance.getMaxAmount()); 
    }

    public A addToDimensions(String key,String value){
            if(this.dimensions == null && key != null && value != null) { this.dimensions = new LinkedHashMap(); }
            if(key != null && value != null) {this.dimensions.put(key, value);} return (A)this;
    }

    public A addToDimensions(Map map){
            if(this.dimensions == null && map != null) { this.dimensions = new LinkedHashMap(); }
            if(map != null) { this.dimensions.putAll(map);} return (A)this;
    }

    public A removeFromDimensions(String key){
            if(this.dimensions == null) { return (A) this; }
            if(key != null && this.dimensions != null) {this.dimensions.remove(key);} return (A)this;
    }

    public A removeFromDimensions(Map map){
            if(this.dimensions == null) { return (A) this; }
            if(map != null) { for(Object key : map.keySet()) {if (this.dimensions != null){this.dimensions.remove(key);}}} return (A)this;
    }

    public Map getDimensions(){
            return this.dimensions;
    }

    public A withDimensions(Map dimensions){
            if (dimensions == null) { this.dimensions =  null;} else {this.dimensions = new LinkedHashMap(dimensions);} return (A) this;
    }

    public Boolean hasDimensions(){
            return this.dimensions != null;
    }

    public Integer getMaxAmount(){
            return this.maxAmount;
    }

    public A withMaxAmount(Integer maxAmount){
            this.maxAmount=maxAmount; return (A) this;
    }

    public Boolean hasMaxAmount(){
            return this.maxAmount != null;
    }

    public A withNewMaxAmount(String arg1){
            return (A)withMaxAmount(new Integer(arg1));
    }

    public A withNewMaxAmount(int arg1){
            return (A)withMaxAmount(new Integer(arg1));
    }

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




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy