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

io.kubernetes.client.openapi.models.V1NodeConfigSourceFluentImpl Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class V1NodeConfigSourceFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1NodeConfigSourceFluent {

    private V1ConfigMapNodeConfigSourceBuilder configMap;

    public V1NodeConfigSourceFluentImpl() { 
    }


    public V1NodeConfigSourceFluentImpl(V1NodeConfigSource instance) { 
        this.withConfigMap(instance.getConfigMap());

    }


    
/**
 * This method has been deprecated, please use method buildConfigMap instead.
 * @return The buildable object.
 */
@Deprecated public V1ConfigMapNodeConfigSource getConfigMap() {
        return this.configMap!=null?this.configMap.build():null;
    }

    public V1ConfigMapNodeConfigSource buildConfigMap() {
        return this.configMap!=null?this.configMap.build():null;
    }

    public A withConfigMap(V1ConfigMapNodeConfigSource configMap) {
        _visitables.get("configMap").remove(this.configMap);
        if (configMap!=null){ this.configMap= new V1ConfigMapNodeConfigSourceBuilder(configMap); _visitables.get("configMap").add(this.configMap);} return (A) this;
    }

    public Boolean hasConfigMap() {
        return this.configMap != null;
    }

    public V1NodeConfigSourceFluent.ConfigMapNested withNewConfigMap() {
        return new ConfigMapNestedImpl();
    }

    public V1NodeConfigSourceFluent.ConfigMapNested withNewConfigMapLike(V1ConfigMapNodeConfigSource item) {
        return new ConfigMapNestedImpl(item);
    }

    public V1NodeConfigSourceFluent.ConfigMapNested editConfigMap() {
        return withNewConfigMapLike(getConfigMap());
    }

    public V1NodeConfigSourceFluent.ConfigMapNested editOrNewConfigMap() {
        return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): new V1ConfigMapNodeConfigSourceBuilder().build());
    }

    public V1NodeConfigSourceFluent.ConfigMapNested editOrNewConfigMapLike(V1ConfigMapNodeConfigSource item) {
        return withNewConfigMapLike(getConfigMap() != null ? getConfigMap(): item);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1NodeConfigSourceFluentImpl that = (V1NodeConfigSourceFluentImpl) o;
        if (configMap != null ? !configMap.equals(that.configMap) :that.configMap != null) return false;
        return true;
    }

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

    public class ConfigMapNestedImpl extends V1ConfigMapNodeConfigSourceFluentImpl> implements V1NodeConfigSourceFluent.ConfigMapNested,io.kubernetes.client.fluent.Nested {
        private final V1ConfigMapNodeConfigSourceBuilder builder;

        ConfigMapNestedImpl(V1ConfigMapNodeConfigSource item) {
            this.builder = new V1ConfigMapNodeConfigSourceBuilder(this, item);
        }

        ConfigMapNestedImpl() {
            this.builder = new V1ConfigMapNodeConfigSourceBuilder(this);
        }

        public N and() {
             return (N) V1NodeConfigSourceFluentImpl.this.withConfigMap(builder.build());
        }

        public N endConfigMap() {
             return and();
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy