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

io.fabric8.autoscaling.api.model.v1beta1.RecommendedContainerResourcesFluent Maven / Gradle / Ivy

package io.fabric8.autoscaling.api.model.v1beta1;

import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.model.Quantity;
import java.lang.Object;
import java.lang.String;
import java.util.Map;
import java.util.LinkedHashMap;

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class RecommendedContainerResourcesFluent> extends BaseFluent{
  public RecommendedContainerResourcesFluent() {
  }
  
  public RecommendedContainerResourcesFluent(RecommendedContainerResources instance) {
    this.copyInstance(instance);
  }
  private String containerName;
  private Map lowerBound;
  private Map target;
  private Map uncappedTarget;
  private Map upperBound;
  private Map additionalProperties;
  
  protected void copyInstance(RecommendedContainerResources instance) {
    instance = (instance != null ? instance : new RecommendedContainerResources());
    if (instance != null) {
          this.withContainerName(instance.getContainerName());
          this.withLowerBound(instance.getLowerBound());
          this.withTarget(instance.getTarget());
          this.withUncappedTarget(instance.getUncappedTarget());
          this.withUpperBound(instance.getUpperBound());
          this.withAdditionalProperties(instance.getAdditionalProperties());
        }
  }
  
  public String getContainerName() {
    return this.containerName;
  }
  
  public A withContainerName(String containerName) {
    this.containerName = containerName;
    return (A) this;
  }
  
  public boolean hasContainerName() {
    return this.containerName != null;
  }
  
  public A addToLowerBound(String key,Quantity value) {
    if(this.lowerBound == null && key != null && value != null) { this.lowerBound = new LinkedHashMap(); }
    if(key != null && value != null) {this.lowerBound.put(key, value);} return (A)this;
  }
  
  public A addToLowerBound(Map map) {
    if(this.lowerBound == null && map != null) { this.lowerBound = new LinkedHashMap(); }
    if(map != null) { this.lowerBound.putAll(map);} return (A)this;
  }
  
  public A removeFromLowerBound(String key) {
    if(this.lowerBound == null) { return (A) this; }
    if(key != null && this.lowerBound != null) {this.lowerBound.remove(key);} return (A)this;
  }
  
  public A removeFromLowerBound(Map map) {
    if(this.lowerBound == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.lowerBound != null){this.lowerBound.remove(key);}}} return (A)this;
  }
  
  public Map getLowerBound() {
    return this.lowerBound;
  }
  
  public A withLowerBound(Map lowerBound) {
    if (lowerBound == null) {
      this.lowerBound = null;
    } else {
      this.lowerBound = new LinkedHashMap(lowerBound);
    }
    return (A) this;
  }
  
  public boolean hasLowerBound() {
    return this.lowerBound != null;
  }
  
  public A addToTarget(String key,Quantity value) {
    if(this.target == null && key != null && value != null) { this.target = new LinkedHashMap(); }
    if(key != null && value != null) {this.target.put(key, value);} return (A)this;
  }
  
  public A addToTarget(Map map) {
    if(this.target == null && map != null) { this.target = new LinkedHashMap(); }
    if(map != null) { this.target.putAll(map);} return (A)this;
  }
  
  public A removeFromTarget(String key) {
    if(this.target == null) { return (A) this; }
    if(key != null && this.target != null) {this.target.remove(key);} return (A)this;
  }
  
  public A removeFromTarget(Map map) {
    if(this.target == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.target != null){this.target.remove(key);}}} return (A)this;
  }
  
  public Map getTarget() {
    return this.target;
  }
  
  public A withTarget(Map target) {
    if (target == null) {
      this.target = null;
    } else {
      this.target = new LinkedHashMap(target);
    }
    return (A) this;
  }
  
  public boolean hasTarget() {
    return this.target != null;
  }
  
  public A addToUncappedTarget(String key,Quantity value) {
    if(this.uncappedTarget == null && key != null && value != null) { this.uncappedTarget = new LinkedHashMap(); }
    if(key != null && value != null) {this.uncappedTarget.put(key, value);} return (A)this;
  }
  
  public A addToUncappedTarget(Map map) {
    if(this.uncappedTarget == null && map != null) { this.uncappedTarget = new LinkedHashMap(); }
    if(map != null) { this.uncappedTarget.putAll(map);} return (A)this;
  }
  
  public A removeFromUncappedTarget(String key) {
    if(this.uncappedTarget == null) { return (A) this; }
    if(key != null && this.uncappedTarget != null) {this.uncappedTarget.remove(key);} return (A)this;
  }
  
  public A removeFromUncappedTarget(Map map) {
    if(this.uncappedTarget == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.uncappedTarget != null){this.uncappedTarget.remove(key);}}} return (A)this;
  }
  
  public Map getUncappedTarget() {
    return this.uncappedTarget;
  }
  
  public A withUncappedTarget(Map uncappedTarget) {
    if (uncappedTarget == null) {
      this.uncappedTarget = null;
    } else {
      this.uncappedTarget = new LinkedHashMap(uncappedTarget);
    }
    return (A) this;
  }
  
  public boolean hasUncappedTarget() {
    return this.uncappedTarget != null;
  }
  
  public A addToUpperBound(String key,Quantity value) {
    if(this.upperBound == null && key != null && value != null) { this.upperBound = new LinkedHashMap(); }
    if(key != null && value != null) {this.upperBound.put(key, value);} return (A)this;
  }
  
  public A addToUpperBound(Map map) {
    if(this.upperBound == null && map != null) { this.upperBound = new LinkedHashMap(); }
    if(map != null) { this.upperBound.putAll(map);} return (A)this;
  }
  
  public A removeFromUpperBound(String key) {
    if(this.upperBound == null) { return (A) this; }
    if(key != null && this.upperBound != null) {this.upperBound.remove(key);} return (A)this;
  }
  
  public A removeFromUpperBound(Map map) {
    if(this.upperBound == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.upperBound != null){this.upperBound.remove(key);}}} return (A)this;
  }
  
  public Map getUpperBound() {
    return this.upperBound;
  }
  
  public A withUpperBound(Map upperBound) {
    if (upperBound == null) {
      this.upperBound = null;
    } else {
      this.upperBound = new LinkedHashMap(upperBound);
    }
    return (A) this;
  }
  
  public boolean hasUpperBound() {
    return this.upperBound != null;
  }
  
  public A addToAdditionalProperties(String key,Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  
  public A addToAdditionalProperties(Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  
  public A removeFromAdditionalProperties(String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  
  public A removeFromAdditionalProperties(Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  
  public Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  
  public A withAdditionalProperties(Map additionalProperties) {
    if (additionalProperties == null) {
      this.additionalProperties = null;
    } else {
      this.additionalProperties = new LinkedHashMap(additionalProperties);
    }
    return (A) this;
  }
  
  public boolean hasAdditionalProperties() {
    return this.additionalProperties != 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;
    RecommendedContainerResourcesFluent that = (RecommendedContainerResourcesFluent) o;
    if (!java.util.Objects.equals(containerName, that.containerName)) return false;
    if (!java.util.Objects.equals(lowerBound, that.lowerBound)) return false;
    if (!java.util.Objects.equals(target, that.target)) return false;
    if (!java.util.Objects.equals(uncappedTarget, that.uncappedTarget)) return false;
    if (!java.util.Objects.equals(upperBound, that.upperBound)) return false;
    if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(containerName,  lowerBound,  target,  uncappedTarget,  upperBound,  additionalProperties,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (containerName != null) { sb.append("containerName:"); sb.append(containerName + ","); }
    if (lowerBound != null && !lowerBound.isEmpty()) { sb.append("lowerBound:"); sb.append(lowerBound + ","); }
    if (target != null && !target.isEmpty()) { sb.append("target:"); sb.append(target + ","); }
    if (uncappedTarget != null && !uncappedTarget.isEmpty()) { sb.append("uncappedTarget:"); sb.append(uncappedTarget + ","); }
    if (upperBound != null && !upperBound.isEmpty()) { sb.append("upperBound:"); sb.append(upperBound + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy