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

io.alauda.devops.api.model.RecreateDeploymentStrategyParamsFluentImpl Maven / Gradle / Ivy

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

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

public class RecreateDeploymentStrategyParamsFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements RecreateDeploymentStrategyParamsFluent{

    private LifecycleHookBuilder mid;
    private LifecycleHookBuilder post;
    private LifecycleHookBuilder pre;
    private Long timeoutSeconds;

    public RecreateDeploymentStrategyParamsFluentImpl(){
    }
    public RecreateDeploymentStrategyParamsFluentImpl(RecreateDeploymentStrategyParams instance){
            this.withMid(instance.getMid()); 
            this.withPost(instance.getPost()); 
            this.withPre(instance.getPre()); 
            this.withTimeoutSeconds(instance.getTimeoutSeconds()); 
    }

    
/**
 * This method has been deprecated, please use method buildMid instead.
 */
@Deprecated public LifecycleHook getMid(){
            return this.mid!=null?this.mid.build():null;
    }

    public LifecycleHook buildMid(){
            return this.mid!=null?this.mid.build():null;
    }

    public A withMid(LifecycleHook mid){
            _visitables.remove(this.mid);
            if (mid!=null){ this.mid= new LifecycleHookBuilder(mid); _visitables.add(this.mid);} return (A) this;
    }

    public Boolean hasMid(){
            return this.mid!=null;
    }

    public RecreateDeploymentStrategyParamsFluent.MidNested withNewMid(){
            return new MidNestedImpl();
    }

    public RecreateDeploymentStrategyParamsFluent.MidNested withNewMidLike(LifecycleHook item){
            return new MidNestedImpl(item);
    }

    public RecreateDeploymentStrategyParamsFluent.MidNested editMid(){
            return withNewMidLike(getMid());
    }

    public RecreateDeploymentStrategyParamsFluent.MidNested editOrNewMid(){
            return withNewMidLike(getMid() != null ? getMid(): new LifecycleHookBuilder().build());
    }

    public RecreateDeploymentStrategyParamsFluent.MidNested editOrNewMidLike(LifecycleHook item){
            return withNewMidLike(getMid() != null ? getMid(): item);
    }

    
/**
 * This method has been deprecated, please use method buildPost instead.
 */
@Deprecated public LifecycleHook getPost(){
            return this.post!=null?this.post.build():null;
    }

    public LifecycleHook buildPost(){
            return this.post!=null?this.post.build():null;
    }

    public A withPost(LifecycleHook post){
            _visitables.remove(this.post);
            if (post!=null){ this.post= new LifecycleHookBuilder(post); _visitables.add(this.post);} return (A) this;
    }

    public Boolean hasPost(){
            return this.post!=null;
    }

    public RecreateDeploymentStrategyParamsFluent.PostNested withNewPost(){
            return new PostNestedImpl();
    }

    public RecreateDeploymentStrategyParamsFluent.PostNested withNewPostLike(LifecycleHook item){
            return new PostNestedImpl(item);
    }

    public RecreateDeploymentStrategyParamsFluent.PostNested editPost(){
            return withNewPostLike(getPost());
    }

    public RecreateDeploymentStrategyParamsFluent.PostNested editOrNewPost(){
            return withNewPostLike(getPost() != null ? getPost(): new LifecycleHookBuilder().build());
    }

    public RecreateDeploymentStrategyParamsFluent.PostNested editOrNewPostLike(LifecycleHook item){
            return withNewPostLike(getPost() != null ? getPost(): item);
    }

    
/**
 * This method has been deprecated, please use method buildPre instead.
 */
@Deprecated public LifecycleHook getPre(){
            return this.pre!=null?this.pre.build():null;
    }

    public LifecycleHook buildPre(){
            return this.pre!=null?this.pre.build():null;
    }

    public A withPre(LifecycleHook pre){
            _visitables.remove(this.pre);
            if (pre!=null){ this.pre= new LifecycleHookBuilder(pre); _visitables.add(this.pre);} return (A) this;
    }

    public Boolean hasPre(){
            return this.pre!=null;
    }

    public RecreateDeploymentStrategyParamsFluent.PreNested withNewPre(){
            return new PreNestedImpl();
    }

    public RecreateDeploymentStrategyParamsFluent.PreNested withNewPreLike(LifecycleHook item){
            return new PreNestedImpl(item);
    }

    public RecreateDeploymentStrategyParamsFluent.PreNested editPre(){
            return withNewPreLike(getPre());
    }

    public RecreateDeploymentStrategyParamsFluent.PreNested editOrNewPre(){
            return withNewPreLike(getPre() != null ? getPre(): new LifecycleHookBuilder().build());
    }

    public RecreateDeploymentStrategyParamsFluent.PreNested editOrNewPreLike(LifecycleHook item){
            return withNewPreLike(getPre() != null ? getPre(): item);
    }

    public Long getTimeoutSeconds(){
            return this.timeoutSeconds;
    }

    public A withTimeoutSeconds(Long timeoutSeconds){
            this.timeoutSeconds=timeoutSeconds; return (A) this;
    }

    public Boolean hasTimeoutSeconds(){
            return this.timeoutSeconds!=null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            RecreateDeploymentStrategyParamsFluentImpl that = (RecreateDeploymentStrategyParamsFluentImpl) o;
            if (mid != null ? !mid.equals(that.mid) :that.mid != null) return false;
            if (post != null ? !post.equals(that.post) :that.post != null) return false;
            if (pre != null ? !pre.equals(that.pre) :that.pre != null) return false;
            if (timeoutSeconds != null ? !timeoutSeconds.equals(that.timeoutSeconds) :that.timeoutSeconds != null) return false;
            return true;
    }


    public class MidNestedImpl extends LifecycleHookFluentImpl> implements RecreateDeploymentStrategyParamsFluent.MidNested,io.alauda.kubernetes.api.builder.Nested{

            private final LifecycleHookBuilder builder;
    
            MidNestedImpl(LifecycleHook item){
                    this.builder = new LifecycleHookBuilder(this, item);
            }
            MidNestedImpl(){
                    this.builder = new LifecycleHookBuilder(this);
            }
    
    public N and(){
            return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withMid(builder.build());
    }
    public N endMid(){
            return and();
    }

}
    public class PostNestedImpl extends LifecycleHookFluentImpl> implements RecreateDeploymentStrategyParamsFluent.PostNested,io.alauda.kubernetes.api.builder.Nested{

            private final LifecycleHookBuilder builder;
    
            PostNestedImpl(LifecycleHook item){
                    this.builder = new LifecycleHookBuilder(this, item);
            }
            PostNestedImpl(){
                    this.builder = new LifecycleHookBuilder(this);
            }
    
    public N and(){
            return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withPost(builder.build());
    }
    public N endPost(){
            return and();
    }

}
    public class PreNestedImpl extends LifecycleHookFluentImpl> implements RecreateDeploymentStrategyParamsFluent.PreNested,io.alauda.kubernetes.api.builder.Nested{

            private final LifecycleHookBuilder builder;
    
            PreNestedImpl(LifecycleHook item){
                    this.builder = new LifecycleHookBuilder(this, item);
            }
            PreNestedImpl(){
                    this.builder = new LifecycleHookBuilder(this);
            }
    
    public N and(){
            return (N) RecreateDeploymentStrategyParamsFluentImpl.this.withPre(builder.build());
    }
    public N endPre(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy