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

annotations.io.fabric8.kubernetes.api.model.PodFluent Maven / Gradle / Ivy

There is a newer version: 0.0.54
Show 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.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.Visitable;
import io.fabric8.common.BaseFluent;

public class PodFluent> extends BaseFluent implements Fluent{

     Pod.ApiVersion apiVersion;     String kind;     ObjectMetaBuilder metadata;     PodSpecBuilder spec;     PodStatusBuilder status;     Map additionalProperties = new HashMap();

    public Pod.ApiVersion getApiVersion(){
    return this.apiVersion;
    }
    public T withApiVersion( Pod.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 PodSpec getSpec(){
    return this.spec!=null?this.spec.build():null;
    }
    public T withSpec( PodSpec spec){
    if (spec!=null){ this.spec= new PodSpecBuilder(spec); _visitables.add(this.spec);} return (T) this;
    }
    public SpecNested withNewSpec(){
    return new SpecNested();
    }
    public PodStatus getStatus(){
    return this.status!=null?this.status.build():null;
    }
    public T withStatus( PodStatus status){
    if (status!=null){ this.status= new PodStatusBuilder(status); _visitables.add(this.status);} return (T) this;
    }
    public StatusNested withNewStatus(){
    return new StatusNested();
    }
    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 = new ObjectMetaBuilder(this);
    
            public N endMetadata(){
            return and();
        }
            public N and(){
            return (N) PodFluent.this.withMetadata(builder.build());
        }
    
}
    public class SpecNested extends PodSpecFluent> implements Nested{

        private final PodSpecBuilder builder = new PodSpecBuilder(this);
    
            public N endSpec(){
            return and();
        }
            public N and(){
            return (N) PodFluent.this.withSpec(builder.build());
        }
    
}
    public class StatusNested extends PodStatusFluent> implements Nested{

        private final PodStatusBuilder builder = new PodStatusBuilder(this);
    
            public N and(){
            return (N) PodFluent.this.withStatus(builder.build());
        }
            public N endStatus(){
            return and();
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy