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

io.alauda.kubernetes.api.model.LimitRangeItemFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

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

public class LimitRangeItemFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements LimitRangeItemFluent{

    private Map _default = new LinkedHashMap();
    private Map defaultRequest = new LinkedHashMap();
    private Map max = new LinkedHashMap();
    private Map maxLimitRequestRatio = new LinkedHashMap();
    private Map min = new LinkedHashMap();
    private String type;

    public LimitRangeItemFluentImpl(){
    }
    public LimitRangeItemFluentImpl(LimitRangeItem instance){
            this.withDefault(instance.getDefault()); 
            this.withDefaultRequest(instance.getDefaultRequest()); 
            this.withMax(instance.getMax()); 
            this.withMaxLimitRequestRatio(instance.getMaxLimitRequestRatio()); 
            this.withMin(instance.getMin()); 
            this.withType(instance.getType()); 
    }

    public A addToDefault(String key,Quantity value){
            if(key != null && value != null) {this._default.put(key, value);} return (A)this;
    }

    public A addToDefault(Map map){
            if(map != null) { this._default.putAll(map);} return (A)this;
    }

    public A removeFromDefault(String key){
            if(key != null) {this._default.remove(key);} return (A)this;
    }

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

    public Map getDefault(){
            return this._default;
    }

    public A withDefault(Map _default){
            this._default.clear();
            if (_default != null) {this._default.putAll(_default);} return (A) this;
    }

    public Boolean hasDefault(){
            return this._default!=null;
    }

    public A addToDefaultRequest(String key,Quantity value){
            if(key != null && value != null) {this.defaultRequest.put(key, value);} return (A)this;
    }

    public A addToDefaultRequest(Map map){
            if(map != null) { this.defaultRequest.putAll(map);} return (A)this;
    }

    public A removeFromDefaultRequest(String key){
            if(key != null) {this.defaultRequest.remove(key);} return (A)this;
    }

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

    public Map getDefaultRequest(){
            return this.defaultRequest;
    }

    public A withDefaultRequest(Map defaultRequest){
            this.defaultRequest.clear();
            if (defaultRequest != null) {this.defaultRequest.putAll(defaultRequest);} return (A) this;
    }

    public Boolean hasDefaultRequest(){
            return this.defaultRequest!=null;
    }

    public A addToMax(String key,Quantity value){
            if(key != null && value != null) {this.max.put(key, value);} return (A)this;
    }

    public A addToMax(Map map){
            if(map != null) { this.max.putAll(map);} return (A)this;
    }

    public A removeFromMax(String key){
            if(key != null) {this.max.remove(key);} return (A)this;
    }

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

    public Map getMax(){
            return this.max;
    }

    public A withMax(Map max){
            this.max.clear();
            if (max != null) {this.max.putAll(max);} return (A) this;
    }

    public Boolean hasMax(){
            return this.max!=null;
    }

    public A addToMaxLimitRequestRatio(String key,Quantity value){
            if(key != null && value != null) {this.maxLimitRequestRatio.put(key, value);} return (A)this;
    }

    public A addToMaxLimitRequestRatio(Map map){
            if(map != null) { this.maxLimitRequestRatio.putAll(map);} return (A)this;
    }

    public A removeFromMaxLimitRequestRatio(String key){
            if(key != null) {this.maxLimitRequestRatio.remove(key);} return (A)this;
    }

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

    public Map getMaxLimitRequestRatio(){
            return this.maxLimitRequestRatio;
    }

    public A withMaxLimitRequestRatio(Map maxLimitRequestRatio){
            this.maxLimitRequestRatio.clear();
            if (maxLimitRequestRatio != null) {this.maxLimitRequestRatio.putAll(maxLimitRequestRatio);} return (A) this;
    }

    public Boolean hasMaxLimitRequestRatio(){
            return this.maxLimitRequestRatio!=null;
    }

    public A addToMin(String key,Quantity value){
            if(key != null && value != null) {this.min.put(key, value);} return (A)this;
    }

    public A addToMin(Map map){
            if(map != null) { this.min.putAll(map);} return (A)this;
    }

    public A removeFromMin(String key){
            if(key != null) {this.min.remove(key);} return (A)this;
    }

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

    public Map getMin(){
            return this.min;
    }

    public A withMin(Map min){
            this.min.clear();
            if (min != null) {this.min.putAll(min);} return (A) this;
    }

    public Boolean hasMin(){
            return this.min!=null;
    }

    public String getType(){
            return this.type;
    }

    public A withType(String type){
            this.type=type; return (A) this;
    }

    public Boolean hasType(){
            return this.type!=null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            LimitRangeItemFluentImpl that = (LimitRangeItemFluentImpl) o;
            if (_default != null ? !_default.equals(that._default) :that._default != null) return false;
            if (defaultRequest != null ? !defaultRequest.equals(that.defaultRequest) :that.defaultRequest != null) return false;
            if (max != null ? !max.equals(that.max) :that.max != null) return false;
            if (maxLimitRequestRatio != null ? !maxLimitRequestRatio.equals(that.maxLimitRequestRatio) :that.maxLimitRequestRatio != null) return false;
            if (min != null ? !min.equals(that.min) :that.min != null) return false;
            if (type != null ? !type.equals(that.type) :that.type != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy