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

io.kubernetes.client.models.V1alpha1VolumeAttachmentSpecFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

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

public class V1alpha1VolumeAttachmentSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1alpha1VolumeAttachmentSpecFluent{

    private String attacher;
    private String nodeName;
    private V1alpha1VolumeAttachmentSourceBuilder source;

    public V1alpha1VolumeAttachmentSpecFluentImpl(){
    }
    public V1alpha1VolumeAttachmentSpecFluentImpl(V1alpha1VolumeAttachmentSpec instance){
            this.withAttacher(instance.getAttacher());

            this.withNodeName(instance.getNodeName());

            this.withSource(instance.getSource());

    }

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

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

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

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

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

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

    
/**
 * This method has been deprecated, please use method buildSource instead.
 */
@Deprecated public V1alpha1VolumeAttachmentSource getSource(){
            return this.source!=null?this.source.build():null;
    }

    public V1alpha1VolumeAttachmentSource buildSource(){
            return this.source!=null?this.source.build():null;
    }

    public A withSource(V1alpha1VolumeAttachmentSource source){
            _visitables.remove(this.source);
            if (source!=null){ this.source= new V1alpha1VolumeAttachmentSourceBuilder(source); _visitables.add(this.source);} return (A) this;
    }

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

    public V1alpha1VolumeAttachmentSpecFluent.SourceNested withNewSource(){
            return new SourceNestedImpl();
    }

    public V1alpha1VolumeAttachmentSpecFluent.SourceNested withNewSourceLike(V1alpha1VolumeAttachmentSource item){
            return new SourceNestedImpl(item);
    }

    public V1alpha1VolumeAttachmentSpecFluent.SourceNested editSource(){
            return withNewSourceLike(getSource());
    }

    public V1alpha1VolumeAttachmentSpecFluent.SourceNested editOrNewSource(){
            return withNewSourceLike(getSource() != null ? getSource(): new V1alpha1VolumeAttachmentSourceBuilder().build());
    }

    public V1alpha1VolumeAttachmentSpecFluent.SourceNested editOrNewSourceLike(V1alpha1VolumeAttachmentSource item){
            return withNewSourceLike(getSource() != null ? getSource(): item);
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1alpha1VolumeAttachmentSpecFluentImpl that = (V1alpha1VolumeAttachmentSpecFluentImpl) 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 class SourceNestedImpl extends V1alpha1VolumeAttachmentSourceFluentImpl> implements V1alpha1VolumeAttachmentSpecFluent.SourceNested,io.kubernetes.client.fluent.Nested{

            private final V1alpha1VolumeAttachmentSourceBuilder builder;
    
            SourceNestedImpl(V1alpha1VolumeAttachmentSource item){
                    this.builder = new V1alpha1VolumeAttachmentSourceBuilder(this, item);
            }
            SourceNestedImpl(){
                    this.builder = new V1alpha1VolumeAttachmentSourceBuilder(this);
            }
    
    public N and(){
            return (N) V1alpha1VolumeAttachmentSpecFluentImpl.this.withSource(builder.build());
    }
    public N endSource(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy