io.alauda.kubernetes.api.model.AuthProviderConfigFluentImpl Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.String;
import java.lang.Boolean;
import java.util.Map;
import java.util.LinkedHashMap;
public class AuthProviderConfigFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements AuthProviderConfigFluent{
private Map config = new LinkedHashMap();
private String name;
public AuthProviderConfigFluentImpl(){
}
public AuthProviderConfigFluentImpl(AuthProviderConfig instance){
this.withConfig(instance.getConfig());
this.withName(instance.getName());
}
public A addToConfig(String key,String value){
if(key != null && value != null) {this.config.put(key, value);} return (A)this;
}
public A addToConfig(Map map){
if(map != null) { this.config.putAll(map);} return (A)this;
}
public A removeFromConfig(String key){
if(key != null) {this.config.remove(key);} return (A)this;
}
public A removeFromConfig(Map map){
if(map != null) { for(Object key : map.keySet()) {this.config.remove(key);}} return (A)this;
}
public Map getConfig(){
return this.config;
}
public A withConfig(Map config){
this.config.clear();
if (config != null) {this.config.putAll(config);} return (A) this;
}
public Boolean hasConfig(){
return this.config!=null;
}
public String getName(){
return this.name;
}
public A withName(String name){
this.name=name; return (A) this;
}
public Boolean hasName(){
return this.name!=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;
AuthProviderConfigFluentImpl that = (AuthProviderConfigFluentImpl) o;
if (config != null ? !config.equals(that.config) :that.config != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
return true;
}
}