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

io.kubernetes.client.models.V1alpha1VolumeAttachmentStatusFluentImpl 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.util.LinkedHashMap;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class V1alpha1VolumeAttachmentStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1alpha1VolumeAttachmentStatusFluent{

    private V1alpha1VolumeErrorBuilder attachError;
    private Boolean attached;
    private Map attachmentMetadata;
    private V1alpha1VolumeErrorBuilder detachError;

    public V1alpha1VolumeAttachmentStatusFluentImpl(){
    }
    public V1alpha1VolumeAttachmentStatusFluentImpl(V1alpha1VolumeAttachmentStatus instance){
            this.withAttachError(instance.getAttachError());

            this.withAttached(instance.isAttached());

            this.withAttachmentMetadata(instance.getAttachmentMetadata());

            this.withDetachError(instance.getDetachError());

    }

    
/**
 * This method has been deprecated, please use method buildAttachError instead.
 */
@Deprecated public V1alpha1VolumeError getAttachError(){
            return this.attachError!=null?this.attachError.build():null;
    }

    public V1alpha1VolumeError buildAttachError(){
            return this.attachError!=null?this.attachError.build():null;
    }

    public A withAttachError(V1alpha1VolumeError attachError){
            _visitables.remove(this.attachError);
            if (attachError!=null){ this.attachError= new V1alpha1VolumeErrorBuilder(attachError); _visitables.add(this.attachError);} return (A) this;
    }

    public Boolean hasAttachError(){
            return this.attachError != null;
    }

    public V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachError(){
            return new AttachErrorNestedImpl();
    }

    public V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested withNewAttachErrorLike(V1alpha1VolumeError item){
            return new AttachErrorNestedImpl(item);
    }

    public V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested editAttachError(){
            return withNewAttachErrorLike(getAttachError());
    }

    public V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachError(){
            return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): new V1alpha1VolumeErrorBuilder().build());
    }

    public V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested editOrNewAttachErrorLike(V1alpha1VolumeError item){
            return withNewAttachErrorLike(getAttachError() != null ? getAttachError(): item);
    }

    public Boolean isAttached(){
            return this.attached;
    }

    public A withAttached(Boolean attached){
            this.attached=attached; return (A) this;
    }

    public Boolean hasAttached(){
            return this.attached != null;
    }

    public A withNewAttached(boolean arg1){
            return (A)withAttached(new Boolean(arg1));
    }

    public A withNewAttached(String arg1){
            return (A)withAttached(new Boolean(arg1));
    }

    public A addToAttachmentMetadata(String key,String value){
            if(this.attachmentMetadata == null && key != null && value != null) { this.attachmentMetadata = new LinkedHashMap(); }
            if(key != null && value != null) {this.attachmentMetadata.put(key, value);} return (A)this;
    }

    public A addToAttachmentMetadata(Map map){
            if(this.attachmentMetadata == null && map != null) { this.attachmentMetadata = new LinkedHashMap(); }
            if(map != null) { this.attachmentMetadata.putAll(map);} return (A)this;
    }

    public A removeFromAttachmentMetadata(String key){
            if(this.attachmentMetadata == null) { return (A) this; }
            if(key != null && this.attachmentMetadata != null) {this.attachmentMetadata.remove(key);} return (A)this;
    }

    public A removeFromAttachmentMetadata(Map map){
            if(this.attachmentMetadata == null) { return (A) this; }
            if(map != null) { for(Object key : map.keySet()) {if (this.attachmentMetadata != null){this.attachmentMetadata.remove(key);}}} return (A)this;
    }

    public Map getAttachmentMetadata(){
            return this.attachmentMetadata;
    }

    public A withAttachmentMetadata(Map attachmentMetadata){
            if (attachmentMetadata == null) { this.attachmentMetadata =  null;} else {this.attachmentMetadata = new LinkedHashMap(attachmentMetadata);} return (A) this;
    }

    public Boolean hasAttachmentMetadata(){
            return this.attachmentMetadata != null;
    }

    
/**
 * This method has been deprecated, please use method buildDetachError instead.
 */
@Deprecated public V1alpha1VolumeError getDetachError(){
            return this.detachError!=null?this.detachError.build():null;
    }

    public V1alpha1VolumeError buildDetachError(){
            return this.detachError!=null?this.detachError.build():null;
    }

    public A withDetachError(V1alpha1VolumeError detachError){
            _visitables.remove(this.detachError);
            if (detachError!=null){ this.detachError= new V1alpha1VolumeErrorBuilder(detachError); _visitables.add(this.detachError);} return (A) this;
    }

    public Boolean hasDetachError(){
            return this.detachError != null;
    }

    public V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachError(){
            return new DetachErrorNestedImpl();
    }

    public V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested withNewDetachErrorLike(V1alpha1VolumeError item){
            return new DetachErrorNestedImpl(item);
    }

    public V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested editDetachError(){
            return withNewDetachErrorLike(getDetachError());
    }

    public V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachError(){
            return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): new V1alpha1VolumeErrorBuilder().build());
    }

    public V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested editOrNewDetachErrorLike(V1alpha1VolumeError item){
            return withNewDetachErrorLike(getDetachError() != null ? getDetachError(): 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;
            V1alpha1VolumeAttachmentStatusFluentImpl that = (V1alpha1VolumeAttachmentStatusFluentImpl) o;
            if (attachError != null ? !attachError.equals(that.attachError) :that.attachError != null) return false;
            if (attached != null ? !attached.equals(that.attached) :that.attached != null) return false;
            if (attachmentMetadata != null ? !attachmentMetadata.equals(that.attachmentMetadata) :that.attachmentMetadata != null) return false;
            if (detachError != null ? !detachError.equals(that.detachError) :that.detachError != null) return false;
            return true;
    }


    public class AttachErrorNestedImpl extends V1alpha1VolumeErrorFluentImpl> implements V1alpha1VolumeAttachmentStatusFluent.AttachErrorNested,io.kubernetes.client.fluent.Nested{

            private final V1alpha1VolumeErrorBuilder builder;
    
            AttachErrorNestedImpl(V1alpha1VolumeError item){
                    this.builder = new V1alpha1VolumeErrorBuilder(this, item);
            }
            AttachErrorNestedImpl(){
                    this.builder = new V1alpha1VolumeErrorBuilder(this);
            }
    
    public N and(){
            return (N) V1alpha1VolumeAttachmentStatusFluentImpl.this.withAttachError(builder.build());
    }
    public N endAttachError(){
            return and();
    }

}
    public class DetachErrorNestedImpl extends V1alpha1VolumeErrorFluentImpl> implements V1alpha1VolumeAttachmentStatusFluent.DetachErrorNested,io.kubernetes.client.fluent.Nested{

            private final V1alpha1VolumeErrorBuilder builder;
    
            DetachErrorNestedImpl(V1alpha1VolumeError item){
                    this.builder = new V1alpha1VolumeErrorBuilder(this, item);
            }
            DetachErrorNestedImpl(){
                    this.builder = new V1alpha1VolumeErrorBuilder(this);
            }
    
    public N and(){
            return (N) V1alpha1VolumeAttachmentStatusFluentImpl.this.withDetachError(builder.build());
    }
    public N endDetachError(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy