io.strimzi.api.kafka.model.InlineLoggingFluentImpl Maven / Gradle / Ivy
package io.strimzi.api.kafka.model;
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;
/**
* Logging config is given inline with the resource
*/
public class InlineLoggingFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.strimzi.api.kafka.model.InlineLoggingFluent {
private java.util.Map loggers;
public InlineLoggingFluentImpl() {
}
public InlineLoggingFluentImpl(io.strimzi.api.kafka.model.InlineLogging instance) {
this.withLoggers(instance.getLoggers());
}
public A addToLoggers(java.lang.String key,java.lang.String value) {
if(this.loggers == null && key != null && value != null) { this.loggers = new java.util.LinkedHashMap(); }
if(key != null && value != null) {this.loggers.put(key, value);} return (A)this;
}
public A addToLoggers(java.util.Map map) {
if(this.loggers == null && map != null) { this.loggers = new java.util.LinkedHashMap(); }
if(map != null) { this.loggers.putAll(map);} return (A)this;
}
public A removeFromLoggers(java.lang.String key) {
if(this.loggers == null) { return (A) this; }
if(key != null && this.loggers != null) {this.loggers.remove(key);} return (A)this;
}
public A removeFromLoggers(java.util.Map map) {
if(this.loggers == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.loggers != null){this.loggers.remove(key);}}} return (A)this;
}
public java.util.Map getLoggers() {
return this.loggers;
}
public A withLoggers(java.util.Map loggers) {
if (loggers == null) { this.loggers = null;} else {this.loggers = new java.util.LinkedHashMap(loggers);} return (A) this;
}
public java.lang.Boolean hasLoggers() {
return this.loggers != null;
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
InlineLoggingFluentImpl that = (InlineLoggingFluentImpl) o;
if (loggers != null ? !loggers.equals(that.loggers) :that.loggers != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(loggers, super.hashCode());
}
}