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

io.fabric8.kubernetes.api.model.PersistentVolumeFluent Maven / Gradle / Ivy

The newest version!
package io.fabric8.kubernetes.api.model;

import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.VisitableBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;

public class PersistentVolumeFluent> extends BaseFluent implements Fluent{

     PersistentVolume.ApiVersion apiVersion;     String kind;     VisitableBuilder metadata;     VisitableBuilder spec;     PersistentVolumeStatus status;     Map additionalProperties = new HashMap();

    public PersistentVolume.ApiVersion getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion( PersistentVolume.ApiVersion apiVersion){
    this.apiVersion=apiVersion; return (T) this;
    }
    public String getKind(){
    return this.kind;
    }
    public T withKind( String kind){
    this.kind=kind; return (T) this;
    }
    public ObjectMeta getMetadata(){
    return this.metadata!=null?this.metadata.build():null;
    }
    public T withMetadata( ObjectMeta metadata){
    if (metadata!=null){ this.metadata= new ObjectMetaBuilder(metadata); _visitables.add(this.metadata);} return (T) this;
    }
    public MetadataNested withNewMetadata(){
    return new MetadataNested();
    }
    public MetadataNested withNewMetadataLike( ObjectMeta item){
    return new MetadataNested(item);
    }
    public MetadataNested editMetadata(){
    return withNewMetadataLike(getMetadata());
    }
    public PersistentVolumeSpec getSpec(){
    return this.spec!=null?this.spec.build():null;
    }
    public T withSpec( PersistentVolumeSpec spec){
    if (spec!=null){ this.spec= new PersistentVolumeSpecBuilder(spec); _visitables.add(this.spec);} return (T) this;
    }
    public SpecNested withNewSpec(){
    return new SpecNested();
    }
    public SpecNested withNewSpecLike( PersistentVolumeSpec item){
    return new SpecNested(item);
    }
    public SpecNested editSpec(){
    return withNewSpecLike(getSpec());
    }
    public PersistentVolumeStatus getStatus(){
    return this.status;
    }
    public T withStatus( PersistentVolumeStatus status){
    this.status=status; return (T) this;
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public Map getAdditionalProperties(){
    return this.additionalProperties;
    }
    public T withAdditionalProperties( Map additionalProperties){
    this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
    }

    public class MetadataNested extends ObjectMetaFluent> implements Nested{

        private final ObjectMetaBuilder builder;
    
             MetadataNested (){
        this.builder = new ObjectMetaBuilder(this);
        }
             MetadataNested ( ObjectMeta item){
        this.builder = new ObjectMetaBuilder(this, item);
        }
    
            public N endMetadata(){
            return and();
        }
            public N and(){
            return (N) PersistentVolumeFluent.this.withMetadata(builder.build());
        }
    
}
    public class SpecNested extends PersistentVolumeSpecFluent> implements Nested{

        private final PersistentVolumeSpecBuilder builder;
    
             SpecNested ( PersistentVolumeSpec item){
        this.builder = new PersistentVolumeSpecBuilder(this, item);
        }
             SpecNested (){
        this.builder = new PersistentVolumeSpecBuilder(this);
        }
    
            public N endSpec(){
            return and();
        }
            public N and(){
            return (N) PersistentVolumeFluent.this.withSpec(builder.build());
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy