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

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

There is a newer version: 6.13.4
Show newest version
package io.fabric8.kubernetes.api.model;

import java.util.HashMap;
import java.io.Serializable;
import java.util.Map;
import java.util.Map;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;

public class ContainerStateFluentImpl> extends BaseFluent implements ContainerStateFluent{

     VisitableBuilder running;     VisitableBuilder terminated;     VisitableBuilder waiting;     Map additionalProperties = new HashMap();
public ContainerStateFluentImpl(){
    
}
public ContainerStateFluentImpl( ContainerState instance ){
    this.withRunning(instance.getRunning()); this.withTerminated(instance.getTerminated()); this.withWaiting(instance.getWaiting()); 
}

    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 RunningNestedImpl();
    }
    public RunningNested withNewRunningLike( ContainerStateRunning item){
    return new RunningNestedImpl(item);
    }
    public RunningNested editRunning(){
    return withNewRunningLike(getRunning());
    }
    public T withNewRunning( String startedAt){
    return withRunning(new ContainerStateRunning(startedAt));
    }
    public ContainerStateTerminated getTerminated(){
    return this.terminated!=null?this.terminated.build():null;
    }
    public T withTerminated( ContainerStateTerminated terminated){
    if (terminated!=null){ this.terminated= new ContainerStateTerminatedBuilder(terminated); _visitables.add(this.terminated);} return (T) this;
    }
    public TerminatedNested withNewTerminated(){
    return new TerminatedNestedImpl();
    }
    public TerminatedNested withNewTerminatedLike( ContainerStateTerminated item){
    return new TerminatedNestedImpl(item);
    }
    public TerminatedNested editTerminated(){
    return withNewTerminatedLike(getTerminated());
    }
    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 WaitingNestedImpl();
    }
    public WaitingNested withNewWaitingLike( ContainerStateWaiting item){
    return new WaitingNestedImpl(item);
    }
    public WaitingNested editWaiting(){
    return withNewWaitingLike(getWaiting());
    }
    public T withNewWaiting( String message,  String reason){
    return withWaiting(new ContainerStateWaiting(message, reason));
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties( Map map){
    if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
    }
    public T removeFromAdditionalProperties( String key){
    if(key != null) {this.additionalProperties.remove(key);} return (T)this;
    }
    public T removeFromAdditionalProperties( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} 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 boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ContainerStateFluentImpl that = (ContainerStateFluentImpl) o;
if (running != null ? !running.equals(that.running) :that.running != null) return false;
if (terminated != null ? !terminated.equals(that.terminated) :that.terminated != null) return false;
if (waiting != null ? !waiting.equals(that.waiting) :that.waiting != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class RunningNestedImpl extends ContainerStateRunningFluentImpl> implements RunningNested{

        private final ContainerStateRunningBuilder builder;
    
             RunningNestedImpl (){
        this.builder = new ContainerStateRunningBuilder(this);
        }
             RunningNestedImpl ( ContainerStateRunning item){
        this.builder = new ContainerStateRunningBuilder(this, item);
        }
    
            public N and(){
            return (N) ContainerStateFluentImpl.this.withRunning(builder.build());
        }
            public N endRunning(){
            return and();
        }
    
}
    public class TerminatedNestedImpl extends ContainerStateTerminatedFluentImpl> implements TerminatedNested{

        private final ContainerStateTerminatedBuilder builder;
    
             TerminatedNestedImpl ( ContainerStateTerminated item){
        this.builder = new ContainerStateTerminatedBuilder(this, item);
        }
             TerminatedNestedImpl (){
        this.builder = new ContainerStateTerminatedBuilder(this);
        }
    
            public N endTerminated(){
            return and();
        }
            public N and(){
            return (N) ContainerStateFluentImpl.this.withTerminated(builder.build());
        }
    
}
    public class WaitingNestedImpl extends ContainerStateWaitingFluentImpl> implements WaitingNested{

        private final ContainerStateWaitingBuilder builder;
    
             WaitingNestedImpl (){
        this.builder = new ContainerStateWaitingBuilder(this);
        }
             WaitingNestedImpl ( ContainerStateWaiting item){
        this.builder = new ContainerStateWaitingBuilder(this, item);
        }
    
            public N and(){
            return (N) ContainerStateFluentImpl.this.withWaiting(builder.build());
        }
            public N endWaiting(){
            return and();
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy