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

io.dekorate.jaxrs.config.JaxrsConfigFluentImpl Maven / Gradle / Ivy

There is a newer version: 4.1.4
Show newest version
package io.dekorate.jaxrs.config;

import io.dekorate.project.Project;
import io.dekorate.kubernetes.config.ConfigKey;
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(value = "unchecked")
  public class JaxrsConfigFluentImpl> extends BaseFluent implements JaxrsConfigFluent{
  public JaxrsConfigFluentImpl() {
  }
  public JaxrsConfigFluentImpl(JaxrsConfig instance) {
    this.withPath(instance.getPath()); 
  }
  private String path;
  private Project project;
  private Map attributes = new LinkedHashMap();
  public String getPath() {
    return this.path;
  }
  public A withPath(String path) {
    this.path=path; return (A) this;
  }
  public Boolean hasPath() {
    return this.path != null;
  }
  public Project getProject() {
    return this.project;
  }
  public A withProject(Project project) {
    this.project=project; return (A) this;
  }
  public Boolean hasProject() {
    return this.project != null;
  }
  public A addToAttributes(ConfigKey key,Object value) {
    if(this.attributes == null && key != null && value != null) { this.attributes = new LinkedHashMap(); }
    if(key != null && value != null) {this.attributes.put(key, value);} return (A)this;
  }
  public A addToAttributes(Map map) {
    if(this.attributes == null && map != null) { this.attributes = new LinkedHashMap(); }
    if(map != null) { this.attributes.putAll(map);} return (A)this;
  }
  public A removeFromAttributes(ConfigKey key) {
    if(this.attributes == null) { return (A) this; }
    if(key != null && this.attributes != null) {this.attributes.remove(key);} return (A)this;
  }
  public A removeFromAttributes(Map map) {
    if(this.attributes == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.attributes != null){this.attributes.remove(key);}}} return (A)this;
  }
  public Map getAttributes() {
    return this.attributes;
  }
  public A withAttributes(Map attributes) {
    if (attributes == null) { this.attributes =  null;} else {this.attributes = new LinkedHashMap(attributes);} return (A) this;
  }
  public Boolean hasAttributes() {
    return this.attributes != null;
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    JaxrsConfigFluentImpl that = (JaxrsConfigFluentImpl) o;
    if (path != null ? !path.equals(that.path) :that.path != null) return false;
    if (project != null ? !project.equals(that.project) :that.project != null) return false;
    if (attributes != null ? !attributes.equals(that.attributes) :that.attributes != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(path,  project,  attributes,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (path != null) { sb.append("path:"); sb.append(path + ","); }
    if (project != null) { sb.append("project:"); sb.append(project + ","); }
    if (attributes != null && !attributes.isEmpty()) { sb.append("attributes:"); sb.append(attributes); }
    sb.append("}");
    return sb.toString();
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy