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

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

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

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

public class V1beta1VolumeAttachmentSpecFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1VolumeAttachmentSpecFluent {

    private String attacher;
    private String nodeName;
    private V1beta1VolumeAttachmentSourceBuilder source;

    public V1beta1VolumeAttachmentSpecFluentImpl() { 
    }


    public V1beta1VolumeAttachmentSpecFluentImpl(V1beta1VolumeAttachmentSpec 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 A withNewAttacher(String arg1) {
        return (A)withAttacher(new String(arg1));
    }

    public A withNewAttacher(StringBuilder arg1) {
        return (A)withAttacher(new String(arg1));
    }

    public A withNewAttacher(StringBuffer arg1) {
        return (A)withAttacher(new String(arg1));
    }

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

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

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

    public A withNewNodeName(String arg1) {
        return (A)withNodeName(new String(arg1));
    }

    public A withNewNodeName(StringBuilder arg1) {
        return (A)withNodeName(new String(arg1));
    }

    public A withNewNodeName(StringBuffer arg1) {
        return (A)withNodeName(new String(arg1));
    }

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

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

    public A withSource(V1beta1VolumeAttachmentSource source) {
        _visitables.get("source").remove(this.source);
        if (source!=null){ this.source= new V1beta1VolumeAttachmentSourceBuilder(source); _visitables.get("source").add(this.source);} return (A) this;
    }

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

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

    public V1beta1VolumeAttachmentSpecFluent.SourceNested withNewSourceLike(V1beta1VolumeAttachmentSource item) {
        return new SourceNestedImpl(item);
    }

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

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

    public V1beta1VolumeAttachmentSpecFluent.SourceNested editOrNewSourceLike(V1beta1VolumeAttachmentSource 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;
        V1beta1VolumeAttachmentSpecFluentImpl that = (V1beta1VolumeAttachmentSpecFluentImpl) 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 V1beta1VolumeAttachmentSourceFluentImpl> implements V1beta1VolumeAttachmentSpecFluent.SourceNested,io.kubernetes.client.fluent.Nested {
        private final V1beta1VolumeAttachmentSourceBuilder builder;

        SourceNestedImpl(V1beta1VolumeAttachmentSource item) {
            this.builder = new V1beta1VolumeAttachmentSourceBuilder(this, item);
        }

        SourceNestedImpl() {
            this.builder = new V1beta1VolumeAttachmentSourceBuilder(this);
        }

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

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy