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

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

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class ContainerStatusFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.ContainerStatusFluent{
  public ContainerStatusFluentImpl() {
  }
  public ContainerStatusFluentImpl(io.fabric8.kubernetes.api.model.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.withStarted(instance.getStarted()); 
    this.withState(instance.getState()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.String containerID;
  private java.lang.String image;
  private java.lang.String imageID;
  private io.fabric8.kubernetes.api.model.ContainerStateBuilder lastState;
  private java.lang.String name;
  private java.lang.Boolean ready;
  private java.lang.Integer restartCount;
  private java.lang.Boolean started;
  private io.fabric8.kubernetes.api.model.ContainerStateBuilder state;
  private java.util.Map additionalProperties;
  public java.lang.String getContainerID() {
    return this.containerID;
  }
  public A withContainerID(java.lang.String containerID) {
    this.containerID=containerID; return (A) this;
  }
  public java.lang.Boolean hasContainerID() {
    return this.containerID != null;
  }
  
  /**
   * Method is deprecated. use withContainerID instead.
   */
  @java.lang.Deprecated
  public A withNewContainerID(java.lang.String arg0) {
    return (A)withContainerID(new String(arg0));
  }
  public java.lang.String getImage() {
    return this.image;
  }
  public A withImage(java.lang.String image) {
    this.image=image; return (A) this;
  }
  public java.lang.Boolean hasImage() {
    return this.image != null;
  }
  
  /**
   * Method is deprecated. use withImage instead.
   */
  @java.lang.Deprecated
  public A withNewImage(java.lang.String arg0) {
    return (A)withImage(new String(arg0));
  }
  public java.lang.String getImageID() {
    return this.imageID;
  }
  public A withImageID(java.lang.String imageID) {
    this.imageID=imageID; return (A) this;
  }
  public java.lang.Boolean hasImageID() {
    return this.imageID != null;
  }
  
  /**
   * Method is deprecated. use withImageID instead.
   */
  @java.lang.Deprecated
  public A withNewImageID(java.lang.String arg0) {
    return (A)withImageID(new String(arg0));
  }
  
  /**
   * This method has been deprecated, please use method buildLastState instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ContainerState getLastState() {
    return this.lastState!=null?this.lastState.build():null;
  }
  public io.fabric8.kubernetes.api.model.ContainerState buildLastState() {
    return this.lastState!=null?this.lastState.build():null;
  }
  public A withLastState(io.fabric8.kubernetes.api.model.ContainerState lastState) {
    _visitables.get("lastState").remove(this.lastState);
    if (lastState!=null){ this.lastState= new io.fabric8.kubernetes.api.model.ContainerStateBuilder(lastState); _visitables.get("lastState").add(this.lastState);} return (A) this;
  }
  public java.lang.Boolean hasLastState() {
    return this.lastState != null;
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested withNewLastState() {
    return new io.fabric8.kubernetes.api.model.ContainerStatusFluentImpl.LastStateNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested withNewLastStateLike(io.fabric8.kubernetes.api.model.ContainerState item) {
    return new io.fabric8.kubernetes.api.model.ContainerStatusFluentImpl.LastStateNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested editLastState() {
    return withNewLastStateLike(getLastState());
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested editOrNewLastState() {
    return withNewLastStateLike(getLastState() != null ? getLastState(): new io.fabric8.kubernetes.api.model.ContainerStateBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested editOrNewLastStateLike(io.fabric8.kubernetes.api.model.ContainerState item) {
    return withNewLastStateLike(getLastState() != null ? getLastState(): item);
  }
  public java.lang.String getName() {
    return this.name;
  }
  public A withName(java.lang.String name) {
    this.name=name; return (A) this;
  }
  public java.lang.Boolean hasName() {
    return this.name != null;
  }
  
  /**
   * Method is deprecated. use withName instead.
   */
  @java.lang.Deprecated
  public A withNewName(java.lang.String arg0) {
    return (A)withName(new String(arg0));
  }
  public java.lang.Boolean getReady() {
    return this.ready;
  }
  public A withReady(java.lang.Boolean ready) {
    this.ready=ready; return (A) this;
  }
  public java.lang.Boolean hasReady() {
    return this.ready != null;
  }
  public java.lang.Integer getRestartCount() {
    return this.restartCount;
  }
  public A withRestartCount(java.lang.Integer restartCount) {
    this.restartCount=restartCount; return (A) this;
  }
  public java.lang.Boolean hasRestartCount() {
    return this.restartCount != null;
  }
  public java.lang.Boolean getStarted() {
    return this.started;
  }
  public A withStarted(java.lang.Boolean started) {
    this.started=started; return (A) this;
  }
  public java.lang.Boolean hasStarted() {
    return this.started != null;
  }
  
  /**
   * This method has been deprecated, please use method buildState instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ContainerState getState() {
    return this.state!=null?this.state.build():null;
  }
  public io.fabric8.kubernetes.api.model.ContainerState buildState() {
    return this.state!=null?this.state.build():null;
  }
  public A withState(io.fabric8.kubernetes.api.model.ContainerState state) {
    _visitables.get("state").remove(this.state);
    if (state!=null){ this.state= new io.fabric8.kubernetes.api.model.ContainerStateBuilder(state); _visitables.get("state").add(this.state);} return (A) this;
  }
  public java.lang.Boolean hasState() {
    return this.state != null;
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested withNewState() {
    return new io.fabric8.kubernetes.api.model.ContainerStatusFluentImpl.StateNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested withNewStateLike(io.fabric8.kubernetes.api.model.ContainerState item) {
    return new io.fabric8.kubernetes.api.model.ContainerStatusFluentImpl.StateNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested editState() {
    return withNewStateLike(getState());
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested editOrNewState() {
    return withNewStateLike(getState() != null ? getState(): new io.fabric8.kubernetes.api.model.ContainerStateBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested editOrNewStateLike(io.fabric8.kubernetes.api.model.ContainerState item) {
    return withNewStateLike(getState() != null ? getState(): item);
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.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 (started != null ? !started.equals(that.started) :that.started != 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 int hashCode() {
    return java.util.Objects.hash(containerID,  image,  imageID,  lastState,  name,  ready,  restartCount,  started,  state,  additionalProperties,  super.hashCode());
  }
  public class LastStateNestedImpl extends io.fabric8.kubernetes.api.model.ContainerStateFluentImpl> implements io.fabric8.kubernetes.api.model.ContainerStatusFluent.LastStateNested,io.fabric8.kubernetes.api.builder.Nested{
    LastStateNestedImpl(io.fabric8.kubernetes.api.model.ContainerState item) {
      this.builder = new io.fabric8.kubernetes.api.model.ContainerStateBuilder(this, item);
    }
    LastStateNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ContainerStateBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ContainerStateBuilder builder;
    public N and() {
      return (N) ContainerStatusFluentImpl.this.withLastState(builder.build());
    }
    public N endLastState() {
      return and();
    }
    
  }
  public class StateNestedImpl extends io.fabric8.kubernetes.api.model.ContainerStateFluentImpl> implements io.fabric8.kubernetes.api.model.ContainerStatusFluent.StateNested,io.fabric8.kubernetes.api.builder.Nested{
    StateNestedImpl(io.fabric8.kubernetes.api.model.ContainerState item) {
      this.builder = new io.fabric8.kubernetes.api.model.ContainerStateBuilder(this, item);
    }
    StateNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ContainerStateBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ContainerStateBuilder builder;
    public N and() {
      return (N) ContainerStatusFluentImpl.this.withState(builder.build());
    }
    public N endState() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy