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

io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model.storage;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class VolumeAttachmentSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent {

    private java.lang.String attacher;
    private java.lang.String nodeName;
    private io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder source;

    public VolumeAttachmentSpecFluentImpl() {
    }

    public VolumeAttachmentSpecFluentImpl(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpec instance) {
        this.withAttacher(instance.getAttacher()); 
        this.withNodeName(instance.getNodeName()); 
        this.withSource(instance.getSource()); 
    }

    public java.lang.String getAttacher() {
        return this.attacher;
    }

    public A withAttacher(java.lang.String attacher) {
        this.attacher=attacher; return (A) this;
    }

    public java.lang.Boolean hasAttacher() {
        return this.attacher != null;
    }

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

    public java.lang.String getNodeName() {
        return this.nodeName;
    }

    public A withNodeName(java.lang.String nodeName) {
        this.nodeName=nodeName; return (A) this;
    }

    public java.lang.Boolean hasNodeName() {
        return this.nodeName != null;
    }

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

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildSource instead.
     * @return The buildable object.
     */
        public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource getSource() {
        return this.source!=null?this.source.build():null;
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource buildSource() {
        return this.source!=null?this.source.build():null;
    }

    public A withSource(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource source) {
        _visitables.get("source").remove(this.source);
        if (source!=null){ this.source= new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder(source); _visitables.get("source").add(this.source);} return (A) this;
    }

    public java.lang.Boolean hasSource() {
        return this.source != null;
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested withNewSource() {
        return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluentImpl.SourceNestedImpl();
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested withNewSourceLike(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource item) {
        return new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluentImpl.SourceNestedImpl(item);
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested editSource() {
        return withNewSourceLike(getSource());
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested editOrNewSource() {
        return withNewSourceLike(getSource() != null ? getSource(): new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder().build());
    }

    public io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested editOrNewSourceLike(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource item) {
        return withNewSourceLike(getSource() != null ? getSource(): item);
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        VolumeAttachmentSpecFluentImpl that = (VolumeAttachmentSpecFluentImpl) o;
        if (attacher != null ? !attacher.equals(that.attacher) :that.attacher != null) return false;
        if (nodeName != null ? !nodeName.equals(that.nodeName) :that.nodeName != null) return false;
        if (source != null ? !source.equals(that.source) :that.source != null) return false;
        return true;
    }

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

    public class SourceNestedImpl extends io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceFluentImpl> implements io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSpecFluent.SourceNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder builder;

            SourceNestedImpl(io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSource item) {
                this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder(this, item);
                        
            }

            SourceNestedImpl() {
                this.builder = new io.fabric8.kubernetes.api.model.storage.VolumeAttachmentSourceBuilder(this);
                        
            }

            public N and() {
                return (N) VolumeAttachmentSpecFluentImpl.this.withSource(builder.build());
            }

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


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy