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

annotations.io.alauda.devops.api.model.RecreateDeploymentStrategyParamsBuilder Maven / Gradle / Ivy

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

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

public class RecreateDeploymentStrategyParamsBuilder extends RecreateDeploymentStrategyParamsFluentImpl implements VisitableBuilder{

    RecreateDeploymentStrategyParamsFluent fluent;
    Boolean validationEnabled;

    public RecreateDeploymentStrategyParamsBuilder(){
            this(true);
    }
    public RecreateDeploymentStrategyParamsBuilder(Boolean validationEnabled){
            this(new RecreateDeploymentStrategyParams(), validationEnabled);
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParamsFluent fluent){
            this(fluent, true);
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParamsFluent fluent,Boolean validationEnabled){
            this(fluent, new RecreateDeploymentStrategyParams(), validationEnabled);
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParamsFluent fluent,RecreateDeploymentStrategyParams instance){
            this(fluent, instance, true);
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParamsFluent fluent,RecreateDeploymentStrategyParams instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withMid(instance.getMid()); 
            fluent.withPost(instance.getPost()); 
            fluent.withPre(instance.getPre()); 
            fluent.withTimeoutSeconds(instance.getTimeoutSeconds()); 
            this.validationEnabled = validationEnabled; 
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParams instance){
            this(instance,true);
    }
    public RecreateDeploymentStrategyParamsBuilder(RecreateDeploymentStrategyParams instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withMid(instance.getMid()); 
            this.withPost(instance.getPost()); 
            this.withPre(instance.getPre()); 
            this.withTimeoutSeconds(instance.getTimeoutSeconds()); 
            this.validationEnabled = validationEnabled; 
    }

    public RecreateDeploymentStrategyParams build(){
            RecreateDeploymentStrategyParams buildable = new RecreateDeploymentStrategyParams(fluent.getMid(),fluent.getPost(),fluent.getPre(),fluent.getTimeoutSeconds());
            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;
            RecreateDeploymentStrategyParamsBuilder that = (RecreateDeploymentStrategyParamsBuilder) 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