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

io.kubernetes.client.openapi.models.V1alpha1VolumeAttachmentSourceFluentImpl 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 V1alpha1VolumeAttachmentSourceFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1alpha1VolumeAttachmentSourceFluent {

    private V1PersistentVolumeSpecBuilder inlineVolumeSpec;
    private String persistentVolumeName;

    public V1alpha1VolumeAttachmentSourceFluentImpl() { 
    }


    public V1alpha1VolumeAttachmentSourceFluentImpl(V1alpha1VolumeAttachmentSource instance) { 
        this.withInlineVolumeSpec(instance.getInlineVolumeSpec());

        this.withPersistentVolumeName(instance.getPersistentVolumeName());

    }


    
/**
 * This method has been deprecated, please use method buildInlineVolumeSpec instead.
 * @return The buildable object.
 */
@Deprecated public V1PersistentVolumeSpec getInlineVolumeSpec() {
        return this.inlineVolumeSpec!=null?this.inlineVolumeSpec.build():null;
    }

    public V1PersistentVolumeSpec buildInlineVolumeSpec() {
        return this.inlineVolumeSpec!=null?this.inlineVolumeSpec.build():null;
    }

    public A withInlineVolumeSpec(V1PersistentVolumeSpec inlineVolumeSpec) {
        _visitables.get("inlineVolumeSpec").remove(this.inlineVolumeSpec);
        if (inlineVolumeSpec!=null){ this.inlineVolumeSpec= new V1PersistentVolumeSpecBuilder(inlineVolumeSpec); _visitables.get("inlineVolumeSpec").add(this.inlineVolumeSpec);} return (A) this;
    }

    public Boolean hasInlineVolumeSpec() {
        return this.inlineVolumeSpec != null;
    }

    public V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested withNewInlineVolumeSpec() {
        return new InlineVolumeSpecNestedImpl();
    }

    public V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested withNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) {
        return new InlineVolumeSpecNestedImpl(item);
    }

    public V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editInlineVolumeSpec() {
        return withNewInlineVolumeSpecLike(getInlineVolumeSpec());
    }

    public V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editOrNewInlineVolumeSpec() {
        return withNewInlineVolumeSpecLike(getInlineVolumeSpec() != null ? getInlineVolumeSpec(): new V1PersistentVolumeSpecBuilder().build());
    }

    public V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested editOrNewInlineVolumeSpecLike(V1PersistentVolumeSpec item) {
        return withNewInlineVolumeSpecLike(getInlineVolumeSpec() != null ? getInlineVolumeSpec(): item);
    }

    public String getPersistentVolumeName() {
        return this.persistentVolumeName;
    }

    public A withPersistentVolumeName(String persistentVolumeName) {
        this.persistentVolumeName=persistentVolumeName; return (A) this;
    }

    public Boolean hasPersistentVolumeName() {
        return this.persistentVolumeName != null;
    }

    public A withNewPersistentVolumeName(String arg1) {
        return (A)withPersistentVolumeName(new String(arg1));
    }

    public A withNewPersistentVolumeName(StringBuilder arg1) {
        return (A)withPersistentVolumeName(new String(arg1));
    }

    public A withNewPersistentVolumeName(StringBuffer arg1) {
        return (A)withPersistentVolumeName(new String(arg1));
    }

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

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

    public class InlineVolumeSpecNestedImpl extends V1PersistentVolumeSpecFluentImpl> implements V1alpha1VolumeAttachmentSourceFluent.InlineVolumeSpecNested,io.kubernetes.client.fluent.Nested {
        private final V1PersistentVolumeSpecBuilder builder;

        InlineVolumeSpecNestedImpl(V1PersistentVolumeSpec item) {
            this.builder = new V1PersistentVolumeSpecBuilder(this, item);
        }

        InlineVolumeSpecNestedImpl() {
            this.builder = new V1PersistentVolumeSpecBuilder(this);
        }

        public N and() {
             return (N) V1alpha1VolumeAttachmentSourceFluentImpl.this.withInlineVolumeSpec(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy