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

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

There is a newer version: 0.2.12
Show newest version
package io.alauda.kubernetes.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import javax.validation.Valid;
import java.lang.Object;

public class ContainerStateFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements ContainerStateFluent{

    private ContainerStateRunningBuilder running;
    private ContainerStateTerminatedBuilder terminated;
    private ContainerStateWaitingBuilder waiting;

    public ContainerStateFluentImpl(){
    }
    public ContainerStateFluentImpl(ContainerState instance){
            this.withRunning(instance.getRunning()); 
            this.withTerminated(instance.getTerminated()); 
            this.withWaiting(instance.getWaiting()); 
    }

    
/**
 * This method has been deprecated, please use method buildRunning instead.
 */
@Deprecated public ContainerStateRunning getRunning(){
            return this.running!=null?this.running.build():null;
    }

    public ContainerStateRunning buildRunning(){
            return this.running!=null?this.running.build():null;
    }

    public A withRunning(ContainerStateRunning running){
            _visitables.remove(this.running);
            if (running!=null){ this.running= new ContainerStateRunningBuilder(running); _visitables.add(this.running);} return (A) this;
    }

    public Boolean hasRunning(){
            return this.running!=null;
    }

    public ContainerStateFluent.RunningNested withNewRunning(){
            return new RunningNestedImpl();
    }

    public ContainerStateFluent.RunningNested withNewRunningLike(ContainerStateRunning item){
            return new RunningNestedImpl(item);
    }

    public ContainerStateFluent.RunningNested editRunning(){
            return withNewRunningLike(getRunning());
    }

    public ContainerStateFluent.RunningNested editOrNewRunning(){
            return withNewRunningLike(getRunning() != null ? getRunning(): new ContainerStateRunningBuilder().build());
    }

    public ContainerStateFluent.RunningNested editOrNewRunningLike(ContainerStateRunning item){
            return withNewRunningLike(getRunning() != null ? getRunning(): item);
    }

    public A withNewRunning(String startedAt){
            return (A)withRunning(new ContainerStateRunning(startedAt));
    }

    
/**
 * This method has been deprecated, please use method buildTerminated instead.
 */
@Deprecated public ContainerStateTerminated getTerminated(){
            return this.terminated!=null?this.terminated.build():null;
    }

    public ContainerStateTerminated buildTerminated(){
            return this.terminated!=null?this.terminated.build():null;
    }

    public A withTerminated(ContainerStateTerminated terminated){
            _visitables.remove(this.terminated);
            if (terminated!=null){ this.terminated= new ContainerStateTerminatedBuilder(terminated); _visitables.add(this.terminated);} return (A) this;
    }

    public Boolean hasTerminated(){
            return this.terminated!=null;
    }

    public ContainerStateFluent.TerminatedNested withNewTerminated(){
            return new TerminatedNestedImpl();
    }

    public ContainerStateFluent.TerminatedNested withNewTerminatedLike(ContainerStateTerminated item){
            return new TerminatedNestedImpl(item);
    }

    public ContainerStateFluent.TerminatedNested editTerminated(){
            return withNewTerminatedLike(getTerminated());
    }

    public ContainerStateFluent.TerminatedNested editOrNewTerminated(){
            return withNewTerminatedLike(getTerminated() != null ? getTerminated(): new ContainerStateTerminatedBuilder().build());
    }

    public ContainerStateFluent.TerminatedNested editOrNewTerminatedLike(ContainerStateTerminated item){
            return withNewTerminatedLike(getTerminated() != null ? getTerminated(): item);
    }

    
/**
 * This method has been deprecated, please use method buildWaiting instead.
 */
@Deprecated public ContainerStateWaiting getWaiting(){
            return this.waiting!=null?this.waiting.build():null;
    }

    public ContainerStateWaiting buildWaiting(){
            return this.waiting!=null?this.waiting.build():null;
    }

    public A withWaiting(ContainerStateWaiting waiting){
            _visitables.remove(this.waiting);
            if (waiting!=null){ this.waiting= new ContainerStateWaitingBuilder(waiting); _visitables.add(this.waiting);} return (A) this;
    }

    public Boolean hasWaiting(){
            return this.waiting!=null;
    }

    public ContainerStateFluent.WaitingNested withNewWaiting(){
            return new WaitingNestedImpl();
    }

    public ContainerStateFluent.WaitingNested withNewWaitingLike(ContainerStateWaiting item){
            return new WaitingNestedImpl(item);
    }

    public ContainerStateFluent.WaitingNested editWaiting(){
            return withNewWaitingLike(getWaiting());
    }

    public ContainerStateFluent.WaitingNested editOrNewWaiting(){
            return withNewWaitingLike(getWaiting() != null ? getWaiting(): new ContainerStateWaitingBuilder().build());
    }

    public ContainerStateFluent.WaitingNested editOrNewWaitingLike(ContainerStateWaiting item){
            return withNewWaitingLike(getWaiting() != null ? getWaiting(): item);
    }

    public A withNewWaiting(String message,String reason){
            return (A)withWaiting(new ContainerStateWaiting(message, reason));
    }

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


    public class RunningNestedImpl extends ContainerStateRunningFluentImpl> implements ContainerStateFluent.RunningNested,io.alauda.kubernetes.api.builder.Nested{

            private final ContainerStateRunningBuilder builder;
    
            RunningNestedImpl(ContainerStateRunning item){
                    this.builder = new ContainerStateRunningBuilder(this, item);
            }
            RunningNestedImpl(){
                    this.builder = new ContainerStateRunningBuilder(this);
            }
    
    public N and(){
            return (N) ContainerStateFluentImpl.this.withRunning(builder.build());
    }
    public N endRunning(){
            return and();
    }

}
    public class TerminatedNestedImpl extends ContainerStateTerminatedFluentImpl> implements ContainerStateFluent.TerminatedNested,io.alauda.kubernetes.api.builder.Nested{

            private final ContainerStateTerminatedBuilder builder;
    
            TerminatedNestedImpl(ContainerStateTerminated item){
                    this.builder = new ContainerStateTerminatedBuilder(this, item);
            }
            TerminatedNestedImpl(){
                    this.builder = new ContainerStateTerminatedBuilder(this);
            }
    
    public N and(){
            return (N) ContainerStateFluentImpl.this.withTerminated(builder.build());
    }
    public N endTerminated(){
            return and();
    }

}
    public class WaitingNestedImpl extends ContainerStateWaitingFluentImpl> implements ContainerStateFluent.WaitingNested,io.alauda.kubernetes.api.builder.Nested{

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

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy