annotations.io.fabric8.kubernetes.api.model.ContainerStatusFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.Map;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
public class ContainerStatusFluentImpl> extends BaseFluent implements ContainerStatusFluent{
String containerID; String image; String imageID; VisitableBuilder lastState; String name; Boolean ready; Integer restartCount; VisitableBuilder state; Map additionalProperties = new HashMap();
public ContainerStatusFluentImpl(){
}
public ContainerStatusFluentImpl( ContainerStatus instance ){
this.withContainerID(instance.getContainerID()); this.withImage(instance.getImage()); this.withImageID(instance.getImageID()); this.withLastState(instance.getLastState()); this.withName(instance.getName()); this.withReady(instance.getReady()); this.withRestartCount(instance.getRestartCount()); this.withState(instance.getState());
}
public String getContainerID(){
return this.containerID;
}
public T withContainerID( String containerID){
this.containerID=containerID; return (T) this;
}
public String getImage(){
return this.image;
}
public T withImage( String image){
this.image=image; return (T) this;
}
public String getImageID(){
return this.imageID;
}
public T withImageID( String imageID){
this.imageID=imageID; return (T) this;
}
public ContainerState getLastState(){
return this.lastState!=null?this.lastState.build():null;
}
public T withLastState( ContainerState lastState){
if (lastState!=null){ this.lastState= new ContainerStateBuilder(lastState); _visitables.add(this.lastState);} return (T) this;
}
public LastStateNested withNewLastState(){
return new LastStateNestedImpl();
}
public LastStateNested withNewLastStateLike( ContainerState item){
return new LastStateNestedImpl(item);
}
public LastStateNested editLastState(){
return withNewLastStateLike(getLastState());
}
public String getName(){
return this.name;
}
public T withName( String name){
this.name=name; return (T) this;
}
public Boolean isReady(){
return this.ready;
}
public T withReady( Boolean ready){
this.ready=ready; return (T) this;
}
public Integer getRestartCount(){
return this.restartCount;
}
public T withRestartCount( Integer restartCount){
this.restartCount=restartCount; return (T) this;
}
public ContainerState getState(){
return this.state!=null?this.state.build():null;
}
public T withState( ContainerState state){
if (state!=null){ this.state= new ContainerStateBuilder(state); _visitables.add(this.state);} return (T) this;
}
public StateNested withNewState(){
return new StateNestedImpl();
}
public StateNested withNewStateLike( ContainerState item){
return new StateNestedImpl(item);
}
public StateNested editState(){
return withNewStateLike(getState());
}
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;
ContainerStatusFluentImpl that = (ContainerStatusFluentImpl) o;
if (containerID != null ? !containerID.equals(that.containerID) :that.containerID != null) return false;
if (image != null ? !image.equals(that.image) :that.image != null) return false;
if (imageID != null ? !imageID.equals(that.imageID) :that.imageID != null) return false;
if (lastState != null ? !lastState.equals(that.lastState) :that.lastState != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (ready != null ? !ready.equals(that.ready) :that.ready != null) return false;
if (restartCount != null ? !restartCount.equals(that.restartCount) :that.restartCount != null) return false;
if (state != null ? !state.equals(that.state) :that.state != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public class LastStateNestedImpl extends ContainerStateFluentImpl> implements LastStateNested{
private final ContainerStateBuilder builder;
LastStateNestedImpl (){
this.builder = new ContainerStateBuilder(this);
}
LastStateNestedImpl ( ContainerState item){
this.builder = new ContainerStateBuilder(this, item);
}
public N endLastState(){
return and();
}
public N and(){
return (N) ContainerStatusFluentImpl.this.withLastState(builder.build());
}
}
public class StateNestedImpl extends ContainerStateFluentImpl> implements StateNested{
private final ContainerStateBuilder builder;
StateNestedImpl (){
this.builder = new ContainerStateBuilder(this);
}
StateNestedImpl ( ContainerState item){
this.builder = new ContainerStateBuilder(this, item);
}
public N and(){
return (N) ContainerStatusFluentImpl.this.withState(builder.build());
}
public N endState(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy