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

annotations.io.fabric8.knative.messaging.v1.ChannelTemplateSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.messaging.v1;

import java.lang.Deprecated;
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;

public class ChannelTemplateSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.messaging.v1.ChannelTemplateSpecFluent {

    private java.lang.String apiVersion;
    private java.lang.String kind;
    private java.util.Map spec;

    public ChannelTemplateSpecFluentImpl() {
    }

    public ChannelTemplateSpecFluentImpl(io.fabric8.knative.messaging.v1.ChannelTemplateSpec instance) {
        this.withApiVersion(instance.getApiVersion()); 
        this.withKind(instance.getKind()); 
        this.withSpec(instance.getSpec()); 
    }

    public java.lang.String getApiVersion() {
        return this.apiVersion;
    }

    public A withApiVersion(java.lang.String apiVersion) {
        this.apiVersion=apiVersion; return (A) this;
    }

    public java.lang.Boolean hasApiVersion() {
        return this.apiVersion != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withApiVersion instead.
     */
        public A withNewApiVersion(java.lang.String arg0) {
        return (A)withApiVersion(new String(arg0));
    }

    public java.lang.String getKind() {
        return this.kind;
    }

    public A withKind(java.lang.String kind) {
        this.kind=kind; return (A) this;
    }

    public java.lang.Boolean hasKind() {
        return this.kind != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withKind instead.
     */
        public A withNewKind(java.lang.String arg0) {
        return (A)withKind(new String(arg0));
    }

    public A addToSpec(java.lang.String key,java.lang.Object value) {
        if(this.spec == null && key != null && value != null) { this.spec = new java.util.LinkedHashMap(); }
        if(key != null && value != null) {this.spec.put(key, value);} return (A)this;
    }

    public A addToSpec(java.util.Map map) {
        if(this.spec == null && map != null) { this.spec = new java.util.LinkedHashMap(); }
        if(map != null) { this.spec.putAll(map);} return (A)this;
    }

    public A removeFromSpec(java.lang.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(java.util.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 java.util.Map getSpec() {
        return this.spec;
    }

    public A withSpec(java.util.Map spec) {
        if (spec == null) { this.spec =  null;} else {this.spec = new java.util.LinkedHashMap(spec);} return (A) this;
    }

    public java.lang.Boolean hasSpec() {
        return this.spec != null;
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ChannelTemplateSpecFluentImpl that = (ChannelTemplateSpecFluentImpl) o;
        if (apiVersion != null ? !apiVersion.equals(that.apiVersion) :that.apiVersion != null) return false;
        if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
        if (spec != null ? !spec.equals(that.spec) :that.spec != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(apiVersion,  kind,  spec,  super.hashCode());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy