io.fabric8.kubernetes.api.model.ContainerStateFluent Maven / Gradle / Ivy
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 ContainerStateFluent> extends BaseFluent implements Fluent{
ContainerStateRunningBuilder running; ContainerStateTerminatedBuilder termination; ContainerStateWaitingBuilder waiting; Map additionalProperties = new HashMap();
public ContainerStateRunning getRunning(){
return this.running!=null?this.running.build():null;
}
public T withRunning( ContainerStateRunning running){
if (running!=null){ this.running= new ContainerStateRunningBuilder(running); _visitables.add(this.running);} return (T) this;
}
public RunningNested withNewRunning(){
return new RunningNested();
}
public T withNewRunning( String startedAt){
return withRunning(new ContainerStateRunning(startedAt));
}
public ContainerStateTerminated getTermination(){
return this.termination!=null?this.termination.build():null;
}
public T withTermination( ContainerStateTerminated termination){
if (termination!=null){ this.termination= new ContainerStateTerminatedBuilder(termination); _visitables.add(this.termination);} return (T) this;
}
public TerminationNested withNewTermination(){
return new TerminationNested();
}
public ContainerStateWaiting getWaiting(){
return this.waiting!=null?this.waiting.build():null;
}
public T withWaiting( ContainerStateWaiting waiting){
if (waiting!=null){ this.waiting= new ContainerStateWaitingBuilder(waiting); _visitables.add(this.waiting);} return (T) this;
}
public WaitingNested withNewWaiting(){
return new WaitingNested();
}
public T withNewWaiting( String reason){
return withWaiting(new ContainerStateWaiting(reason));
}
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 RunningNested extends ContainerStateRunningFluent> implements Nested{
private final ContainerStateRunningBuilder builder = new ContainerStateRunningBuilder(this);
public N endRunning(){
return and();
}
public N and(){
return (N) ContainerStateFluent.this.withRunning(builder.build());
}
}
public class TerminationNested extends ContainerStateTerminatedFluent> implements Nested{
private final ContainerStateTerminatedBuilder builder = new ContainerStateTerminatedBuilder(this);
public N endTermination(){
return and();
}
public N and(){
return (N) ContainerStateFluent.this.withTermination(builder.build());
}
}
public class WaitingNested extends ContainerStateWaitingFluent> implements Nested{
private final ContainerStateWaitingBuilder builder = new ContainerStateWaitingBuilder(this);
public N and(){
return (N) ContainerStateFluent.this.withWaiting(builder.build());
}
public N endWaiting(){
return and();
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy