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

io.kubernetes.client.openapi.models.V1ContainerStatusFluentImpl Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

import java.lang.StringBuilder;
import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Integer;
import java.lang.StringBuffer;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class V1ContainerStatusFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1ContainerStatusFluent {

    private String containerID;
    private String image;
    private String imageID;
    private V1ContainerStateBuilder lastState;
    private String name;
    private Boolean ready;
    private Integer restartCount;
    private Boolean started;
    private V1ContainerStateBuilder state;

    public V1ContainerStatusFluentImpl() { 
    }


    public V1ContainerStatusFluentImpl(V1ContainerStatus 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());

    }


    public String getContainerID() {
        return this.containerID;
    }

    public A withContainerID(String containerID) {
        this.containerID=containerID; return (A) this;
    }

    public Boolean hasContainerID() {
        return this.containerID != null;
    }

    public A withNewContainerID(String arg1) {
        return (A)withContainerID(new String(arg1));
    }

    public A withNewContainerID(StringBuilder arg1) {
        return (A)withContainerID(new String(arg1));
    }

    public A withNewContainerID(StringBuffer arg1) {
        return (A)withContainerID(new String(arg1));
    }

    public String getImage() {
        return this.image;
    }

    public A withImage(String image) {
        this.image=image; return (A) this;
    }

    public Boolean hasImage() {
        return this.image != null;
    }

    public A withNewImage(String arg1) {
        return (A)withImage(new String(arg1));
    }

    public A withNewImage(StringBuilder arg1) {
        return (A)withImage(new String(arg1));
    }

    public A withNewImage(StringBuffer arg1) {
        return (A)withImage(new String(arg1));
    }

    public String getImageID() {
        return this.imageID;
    }

    public A withImageID(String imageID) {
        this.imageID=imageID; return (A) this;
    }

    public Boolean hasImageID() {
        return this.imageID != null;
    }

    public A withNewImageID(String arg1) {
        return (A)withImageID(new String(arg1));
    }

    public A withNewImageID(StringBuilder arg1) {
        return (A)withImageID(new String(arg1));
    }

    public A withNewImageID(StringBuffer arg1) {
        return (A)withImageID(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildLastState instead.
 * @return The buildable object.
 */
@Deprecated public V1ContainerState getLastState() {
        return this.lastState!=null?this.lastState.build():null;
    }

    public V1ContainerState buildLastState() {
        return this.lastState!=null?this.lastState.build():null;
    }

    public A withLastState(V1ContainerState lastState) {
        _visitables.get("lastState").remove(this.lastState);
        if (lastState!=null){ this.lastState= new V1ContainerStateBuilder(lastState); _visitables.get("lastState").add(this.lastState);} return (A) this;
    }

    public Boolean hasLastState() {
        return this.lastState != null;
    }

    public V1ContainerStatusFluent.LastStateNested withNewLastState() {
        return new LastStateNestedImpl();
    }

    public V1ContainerStatusFluent.LastStateNested withNewLastStateLike(V1ContainerState item) {
        return new LastStateNestedImpl(item);
    }

    public V1ContainerStatusFluent.LastStateNested editLastState() {
        return withNewLastStateLike(getLastState());
    }

    public V1ContainerStatusFluent.LastStateNested editOrNewLastState() {
        return withNewLastStateLike(getLastState() != null ? getLastState(): new V1ContainerStateBuilder().build());
    }

    public V1ContainerStatusFluent.LastStateNested editOrNewLastStateLike(V1ContainerState item) {
        return withNewLastStateLike(getLastState() != null ? getLastState(): item);
    }

    public String getName() {
        return this.name;
    }

    public A withName(String name) {
        this.name=name; return (A) this;
    }

    public Boolean hasName() {
        return this.name != null;
    }

    public A withNewName(String arg1) {
        return (A)withName(new String(arg1));
    }

    public A withNewName(StringBuilder arg1) {
        return (A)withName(new String(arg1));
    }

    public A withNewName(StringBuffer arg1) {
        return (A)withName(new String(arg1));
    }

    public Boolean isReady() {
        return this.ready;
    }

    public A withReady(Boolean ready) {
        this.ready=ready; return (A) this;
    }

    public Boolean hasReady() {
        return this.ready != null;
    }

    public A withNewReady(String arg1) {
        return (A)withReady(new Boolean(arg1));
    }

    public A withNewReady(boolean arg1) {
        return (A)withReady(new Boolean(arg1));
    }

    public Integer getRestartCount() {
        return this.restartCount;
    }

    public A withRestartCount(Integer restartCount) {
        this.restartCount=restartCount; return (A) this;
    }

    public Boolean hasRestartCount() {
        return this.restartCount != null;
    }

    public Boolean isStarted() {
        return this.started;
    }

    public A withStarted(Boolean started) {
        this.started=started; return (A) this;
    }

    public Boolean hasStarted() {
        return this.started != null;
    }

    public A withNewStarted(String arg1) {
        return (A)withStarted(new Boolean(arg1));
    }

    public A withNewStarted(boolean arg1) {
        return (A)withStarted(new Boolean(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildState instead.
 * @return The buildable object.
 */
@Deprecated public V1ContainerState getState() {
        return this.state!=null?this.state.build():null;
    }

    public V1ContainerState buildState() {
        return this.state!=null?this.state.build():null;
    }

    public A withState(V1ContainerState state) {
        _visitables.get("state").remove(this.state);
        if (state!=null){ this.state= new V1ContainerStateBuilder(state); _visitables.get("state").add(this.state);} return (A) this;
    }

    public Boolean hasState() {
        return this.state != null;
    }

    public V1ContainerStatusFluent.StateNested withNewState() {
        return new StateNestedImpl();
    }

    public V1ContainerStatusFluent.StateNested withNewStateLike(V1ContainerState item) {
        return new StateNestedImpl(item);
    }

    public V1ContainerStatusFluent.StateNested editState() {
        return withNewStateLike(getState());
    }

    public V1ContainerStatusFluent.StateNested editOrNewState() {
        return withNewStateLike(getState() != null ? getState(): new V1ContainerStateBuilder().build());
    }

    public V1ContainerStatusFluent.StateNested editOrNewStateLike(V1ContainerState item) {
        return withNewStateLike(getState() != null ? getState(): item);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1ContainerStatusFluentImpl that = (V1ContainerStatusFluentImpl) 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;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(containerID,  image,  imageID,  lastState,  name,  ready,  restartCount,  started,  state,  super.hashCode());
    }

    public class LastStateNestedImpl extends V1ContainerStateFluentImpl> implements V1ContainerStatusFluent.LastStateNested,io.kubernetes.client.fluent.Nested {
        private final V1ContainerStateBuilder builder;

        LastStateNestedImpl(V1ContainerState item) {
            this.builder = new V1ContainerStateBuilder(this, item);
        }

        LastStateNestedImpl() {
            this.builder = new V1ContainerStateBuilder(this);
        }

        public N and() {
             return (N) V1ContainerStatusFluentImpl.this.withLastState(builder.build());
        }

        public N endLastState() {
             return and();
        }
    }


    public class StateNestedImpl extends V1ContainerStateFluentImpl> implements V1ContainerStatusFluent.StateNested,io.kubernetes.client.fluent.Nested {
        private final V1ContainerStateBuilder builder;

        StateNestedImpl(V1ContainerState item) {
            this.builder = new V1ContainerStateBuilder(this, item);
        }

        StateNestedImpl() {
            this.builder = new V1ContainerStateBuilder(this);
        }

        public N and() {
             return (N) V1ContainerStatusFluentImpl.this.withState(builder.build());
        }

        public N endState() {
             return and();
        }
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy