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

io.fabric8.knative.messaging.v1.ChannelTemplateSpecFluent Maven / Gradle / Ivy

package io.fabric8.knative.messaging.v1;

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

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class ChannelTemplateSpecFluent> extends BaseFluent{
  public ChannelTemplateSpecFluent() {
  }
  public ChannelTemplateSpecFluent(ChannelTemplateSpec instance) {
    instance = (instance != null ? instance : new ChannelTemplateSpec());

    if (instance != null) {
      this.withApiVersion(instance.getApiVersion());
      this.withKind(instance.getKind());
      this.withSpec(instance.getSpec());
      this.withApiVersion(instance.getApiVersion());
      this.withKind(instance.getKind());
      this.withSpec(instance.getSpec());
    }
  }
  private String apiVersion;
  private String kind;
  private Map spec;
  public String getApiVersion() {
    return this.apiVersion;
  }
  public A withApiVersion(String apiVersion) {
    this.apiVersion=apiVersion; return (A) this;
  }
  public boolean hasApiVersion() {
    return this.apiVersion != null;
  }
  public String getKind() {
    return this.kind;
  }
  public A withKind(String kind) {
    this.kind=kind; return (A) this;
  }
  public boolean hasKind() {
    return this.kind != null;
  }
  public A addToSpec(String key,Object value) {
    if(this.spec == null && key != null && value != null) { this.spec = new LinkedHashMap(); }
    if(key != null && value != null) {this.spec.put(key, value);} return (A)this;
  }
  public A addToSpec(Map map) {
    if(this.spec == null && map != null) { this.spec = new LinkedHashMap(); }
    if(map != null) { this.spec.putAll(map);} return (A)this;
  }
  public A removeFromSpec(String key) {
    if(this.spec == null) { return (A) this; }
    if(key != null && this.spec != null) {this.spec.remove(key);} return (A)this;
  }
  public A removeFromSpec(Map map) {
    if(this.spec == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.spec != null){this.spec.remove(key);}}} return (A)this;
  }
  public Map getSpec() {
    return this.spec;
  }
  public A withSpec(Map spec) {
    if (spec == null) { this.spec =  null;} else {this.spec = new LinkedHashMap(spec);} return (A) this;
  }
  public boolean hasSpec() {
    return this.spec != 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;
    ChannelTemplateSpecFluent that = (ChannelTemplateSpecFluent) o;
    if (!java.util.Objects.equals(apiVersion, that.apiVersion)) return false;

    if (!java.util.Objects.equals(kind, that.kind)) return false;

    if (!java.util.Objects.equals(spec, that.spec)) return false;

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(apiVersion,  kind,  spec,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (apiVersion != null) { sb.append("apiVersion:"); sb.append(apiVersion + ","); }
    if (kind != null) { sb.append("kind:"); sb.append(kind + ","); }
    if (spec != null && !spec.isEmpty()) { sb.append("spec:"); sb.append(spec); }
    sb.append("}");
    return sb.toString();
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy