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

annotations.io.alauda.kubernetes.api.model.EmptyDirVolumeSourceFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import com.fasterxml.jackson.databind.JsonSerializer;
import java.lang.String;
import com.fasterxml.jackson.databind.JsonDeserializer;
import java.lang.Deprecated;
import io.alauda.kubernetes.api.builder.BaseFluent;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.lang.Boolean;
import java.lang.Override;
import com.fasterxml.jackson.core.JsonParser;
import javax.validation.Valid;
import java.lang.Object;

public class EmptyDirVolumeSourceFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements EmptyDirVolumeSourceFluent{

    private String medium;
    private QuantityBuilder sizeLimit;

    public EmptyDirVolumeSourceFluentImpl(){
    }
    public EmptyDirVolumeSourceFluentImpl(EmptyDirVolumeSource instance){
            this.withMedium(instance.getMedium()); 
            this.withSizeLimit(instance.getSizeLimit()); 
    }

    public String getMedium(){
            return this.medium;
    }

    public A withMedium(String medium){
            this.medium=medium; return (A) this;
    }

    public Boolean hasMedium(){
            return this.medium!=null;
    }

    
/**
 * This method has been deprecated, please use method buildSizeLimit instead.
 */
@Deprecated public Quantity getSizeLimit(){
            return this.sizeLimit!=null?this.sizeLimit.build():null;
    }

    public Quantity buildSizeLimit(){
            return this.sizeLimit!=null?this.sizeLimit.build():null;
    }

    public A withSizeLimit(Quantity sizeLimit){
            _visitables.remove(this.sizeLimit);
            if (sizeLimit!=null){ this.sizeLimit= new QuantityBuilder(sizeLimit); _visitables.add(this.sizeLimit);} return (A) this;
    }

    public Boolean hasSizeLimit(){
            return this.sizeLimit!=null;
    }

    public EmptyDirVolumeSourceFluent.SizeLimitNested withNewSizeLimit(){
            return new SizeLimitNestedImpl();
    }

    public EmptyDirVolumeSourceFluent.SizeLimitNested withNewSizeLimitLike(Quantity item){
            return new SizeLimitNestedImpl(item);
    }

    public EmptyDirVolumeSourceFluent.SizeLimitNested editSizeLimit(){
            return withNewSizeLimitLike(getSizeLimit());
    }

    public EmptyDirVolumeSourceFluent.SizeLimitNested editOrNewSizeLimit(){
            return withNewSizeLimitLike(getSizeLimit() != null ? getSizeLimit(): new QuantityBuilder().build());
    }

    public EmptyDirVolumeSourceFluent.SizeLimitNested editOrNewSizeLimitLike(Quantity item){
            return withNewSizeLimitLike(getSizeLimit() != null ? getSizeLimit(): item);
    }

    public A withNewSizeLimit(String amount){
            return (A)withSizeLimit(new Quantity(amount));
    }

    public A withNewSizeLimit(String amount,String format){
            return (A)withSizeLimit(new Quantity(amount, format));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            EmptyDirVolumeSourceFluentImpl that = (EmptyDirVolumeSourceFluentImpl) o;
            if (medium != null ? !medium.equals(that.medium) :that.medium != null) return false;
            if (sizeLimit != null ? !sizeLimit.equals(that.sizeLimit) :that.sizeLimit != null) return false;
            return true;
    }


    public class SizeLimitNestedImpl extends QuantityFluentImpl> implements EmptyDirVolumeSourceFluent.SizeLimitNested,io.alauda.kubernetes.api.builder.Nested{

            private final QuantityBuilder builder;
    
            SizeLimitNestedImpl(Quantity item){
                    this.builder = new QuantityBuilder(this, item);
            }
            SizeLimitNestedImpl(){
                    this.builder = new QuantityBuilder(this);
            }
    
    public N and(){
            return (N) EmptyDirVolumeSourceFluentImpl.this.withSizeLimit(builder.build());
    }
    public N endSizeLimit(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy