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

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

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

import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

public class ContainerStateTerminatedBuilder extends ContainerStateTerminatedFluentImpl implements VisitableBuilder{

    ContainerStateTerminatedFluent fluent;
    Boolean validationEnabled;

    public ContainerStateTerminatedBuilder(){
            this(true);
    }
    public ContainerStateTerminatedBuilder(Boolean validationEnabled){
            this(new ContainerStateTerminated(), validationEnabled);
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminatedFluent fluent){
            this(fluent, true);
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminatedFluent fluent,Boolean validationEnabled){
            this(fluent, new ContainerStateTerminated(), validationEnabled);
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminatedFluent fluent,ContainerStateTerminated instance){
            this(fluent, instance, true);
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminatedFluent fluent,ContainerStateTerminated instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withContainerID(instance.getContainerID()); 
            fluent.withExitCode(instance.getExitCode()); 
            fluent.withFinishedAt(instance.getFinishedAt()); 
            fluent.withMessage(instance.getMessage()); 
            fluent.withReason(instance.getReason()); 
            fluent.withSignal(instance.getSignal()); 
            fluent.withStartedAt(instance.getStartedAt()); 
            this.validationEnabled = validationEnabled; 
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminated instance){
            this(instance,true);
    }
    public ContainerStateTerminatedBuilder(ContainerStateTerminated instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withContainerID(instance.getContainerID()); 
            this.withExitCode(instance.getExitCode()); 
            this.withFinishedAt(instance.getFinishedAt()); 
            this.withMessage(instance.getMessage()); 
            this.withReason(instance.getReason()); 
            this.withSignal(instance.getSignal()); 
            this.withStartedAt(instance.getStartedAt()); 
            this.validationEnabled = validationEnabled; 
    }

    public ContainerStateTerminated build(){
            ContainerStateTerminated buildable = new ContainerStateTerminated(fluent.getContainerID(),fluent.getExitCode(),fluent.getFinishedAt(),fluent.getMessage(),fluent.getReason(),fluent.getSignal(),fluent.getStartedAt());
            io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            ContainerStateTerminatedBuilder that = (ContainerStateTerminatedBuilder) o;
            if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;

            if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
            return true;
    }




}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy