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

io.fabric8.kubernetes.api.model.discovery.v1.EndpointConditionsFluent Maven / Gradle / Ivy

The newest version!
package io.fabric8.kubernetes.api.model.discovery.v1;

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

/**
 * Generated
 */
@SuppressWarnings("unchecked")
public class EndpointConditionsFluent> extends BaseFluent{
  public EndpointConditionsFluent() {
  }
  
  public EndpointConditionsFluent(EndpointConditions instance) {
    this.copyInstance(instance);
  }
  private Boolean ready;
  private Boolean serving;
  private Boolean terminating;
  private Map additionalProperties;
  
  protected void copyInstance(EndpointConditions instance) {
    instance = (instance != null ? instance : new EndpointConditions());
    if (instance != null) {
          this.withReady(instance.getReady());
          this.withServing(instance.getServing());
          this.withTerminating(instance.getTerminating());
          this.withAdditionalProperties(instance.getAdditionalProperties());
        }
  }
  
  public Boolean getReady() {
    return this.ready;
  }
  
  public A withReady(Boolean ready) {
    this.ready = ready;
    return (A) this;
  }
  
  public boolean hasReady() {
    return this.ready != null;
  }
  
  public Boolean getServing() {
    return this.serving;
  }
  
  public A withServing(Boolean serving) {
    this.serving = serving;
    return (A) this;
  }
  
  public boolean hasServing() {
    return this.serving != null;
  }
  
  public Boolean getTerminating() {
    return this.terminating;
  }
  
  public A withTerminating(Boolean terminating) {
    this.terminating = terminating;
    return (A) this;
  }
  
  public boolean hasTerminating() {
    return this.terminating != 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;
    EndpointConditionsFluent that = (EndpointConditionsFluent) o;
    if (!java.util.Objects.equals(ready, that.ready)) return false;
    if (!java.util.Objects.equals(serving, that.serving)) return false;
    if (!java.util.Objects.equals(terminating, that.terminating)) return false;
    if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
    return true;
  }
  
  public int hashCode() {
    return java.util.Objects.hash(ready,  serving,  terminating,  additionalProperties,  super.hashCode());
  }
  
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (ready != null) { sb.append("ready:"); sb.append(ready + ","); }
    if (serving != null) { sb.append("serving:"); sb.append(serving + ","); }
    if (terminating != null) { sb.append("terminating:"); sb.append(terminating + ","); }
    if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
    sb.append("}");
    return sb.toString();
  }
  
  public A withReady() {
    return withReady(true);
  }
  
  public A withServing() {
    return withServing(true);
  }
  
  public A withTerminating() {
    return withTerminating(true);
  }
  

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy