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

annotations.io.alauda.kubernetes.api.model.PipelineTaskArgumentActionFluentImpl 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 javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class PipelineTaskArgumentActionFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements PipelineTaskArgumentActionFluent{

    private String action;
    private PipelineTaskArgumentWhenBuilder when;

    public PipelineTaskArgumentActionFluentImpl(){
    }
    public PipelineTaskArgumentActionFluentImpl(PipelineTaskArgumentAction instance){
            this.withAction(instance.getAction()); 
            this.withWhen(instance.getWhen()); 
    }

    public String getAction(){
            return this.action;
    }

    public A withAction(String action){
            this.action=action; return (A) this;
    }

    public Boolean hasAction(){
            return this.action!=null;
    }

    
/**
 * This method has been deprecated, please use method buildWhen instead.
 */
@Deprecated public PipelineTaskArgumentWhen getWhen(){
            return this.when!=null?this.when.build():null;
    }

    public PipelineTaskArgumentWhen buildWhen(){
            return this.when!=null?this.when.build():null;
    }

    public A withWhen(PipelineTaskArgumentWhen when){
            _visitables.remove(this.when);
            if (when!=null){ this.when= new PipelineTaskArgumentWhenBuilder(when); _visitables.add(this.when);} return (A) this;
    }

    public Boolean hasWhen(){
            return this.when!=null;
    }

    public PipelineTaskArgumentActionFluent.WhenNested withNewWhen(){
            return new WhenNestedImpl();
    }

    public PipelineTaskArgumentActionFluent.WhenNested withNewWhenLike(PipelineTaskArgumentWhen item){
            return new WhenNestedImpl(item);
    }

    public PipelineTaskArgumentActionFluent.WhenNested editWhen(){
            return withNewWhenLike(getWhen());
    }

    public PipelineTaskArgumentActionFluent.WhenNested editOrNewWhen(){
            return withNewWhenLike(getWhen() != null ? getWhen(): new PipelineTaskArgumentWhenBuilder().build());
    }

    public PipelineTaskArgumentActionFluent.WhenNested editOrNewWhenLike(PipelineTaskArgumentWhen item){
            return withNewWhenLike(getWhen() != null ? getWhen(): item);
    }

    public A withNewWhen(String name,Boolean value){
            return (A)withWhen(new PipelineTaskArgumentWhen(name, value));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            PipelineTaskArgumentActionFluentImpl that = (PipelineTaskArgumentActionFluentImpl) o;
            if (action != null ? !action.equals(that.action) :that.action != null) return false;
            if (when != null ? !when.equals(that.when) :that.when != null) return false;
            return true;
    }


    public class WhenNestedImpl extends PipelineTaskArgumentWhenFluentImpl> implements PipelineTaskArgumentActionFluent.WhenNested,io.alauda.kubernetes.api.builder.Nested{

            private final PipelineTaskArgumentWhenBuilder builder;
    
            WhenNestedImpl(PipelineTaskArgumentWhen item){
                    this.builder = new PipelineTaskArgumentWhenBuilder(this, item);
            }
            WhenNestedImpl(){
                    this.builder = new PipelineTaskArgumentWhenBuilder(this);
            }
    
    public N and(){
            return (N) PipelineTaskArgumentActionFluentImpl.this.withWhen(builder.build());
    }
    public N endWhen(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy