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

io.alauda.kubernetes.api.model.PipelineTaskArgumentDisplayFluentImpl 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.util.LinkedHashMap;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class PipelineTaskArgumentDisplayFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements PipelineTaskArgumentDisplayFluent{

    private Boolean advanced;
    private Map args = new LinkedHashMap();
    private I18nNameBuilder description;
    private I18nNameBuilder name;
    private String related;
    private String type;

    public PipelineTaskArgumentDisplayFluentImpl(){
    }
    public PipelineTaskArgumentDisplayFluentImpl(PipelineTaskArgumentDisplay instance){
            this.withAdvanced(instance.getAdvanced()); 
            this.withArgs(instance.getArgs()); 
            this.withDescription(instance.getDescription()); 
            this.withName(instance.getName()); 
            this.withRelated(instance.getRelated()); 
            this.withType(instance.getType()); 
    }

    public Boolean isAdvanced(){
            return this.advanced;
    }

    public A withAdvanced(Boolean advanced){
            this.advanced=advanced; return (A) this;
    }

    public Boolean hasAdvanced(){
            return this.advanced!=null;
    }

    public A addToArgs(String key,String value){
            if(key != null && value != null) {this.args.put(key, value);} return (A)this;
    }

    public A addToArgs(Map map){
            if(map != null) { this.args.putAll(map);} return (A)this;
    }

    public A removeFromArgs(String key){
            if(key != null) {this.args.remove(key);} return (A)this;
    }

    public A removeFromArgs(Map map){
            if(map != null) { for(Object key : map.keySet()) {this.args.remove(key);}} return (A)this;
    }

    public Map getArgs(){
            return this.args;
    }

    public A withArgs(Map args){
            this.args.clear();
            if (args != null) {this.args.putAll(args);} return (A) this;
    }

    public Boolean hasArgs(){
            return this.args!=null;
    }

    
/**
 * This method has been deprecated, please use method buildDescription instead.
 */
@Deprecated public I18nName getDescription(){
            return this.description!=null?this.description.build():null;
    }

    public I18nName buildDescription(){
            return this.description!=null?this.description.build():null;
    }

    public A withDescription(I18nName description){
            _visitables.remove(this.description);
            if (description!=null){ this.description= new I18nNameBuilder(description); _visitables.add(this.description);} return (A) this;
    }

    public Boolean hasDescription(){
            return this.description!=null;
    }

    public PipelineTaskArgumentDisplayFluent.DescriptionNested withNewDescription(){
            return new DescriptionNestedImpl();
    }

    public PipelineTaskArgumentDisplayFluent.DescriptionNested withNewDescriptionLike(I18nName item){
            return new DescriptionNestedImpl(item);
    }

    public PipelineTaskArgumentDisplayFluent.DescriptionNested editDescription(){
            return withNewDescriptionLike(getDescription());
    }

    public PipelineTaskArgumentDisplayFluent.DescriptionNested editOrNewDescription(){
            return withNewDescriptionLike(getDescription() != null ? getDescription(): new I18nNameBuilder().build());
    }

    public PipelineTaskArgumentDisplayFluent.DescriptionNested editOrNewDescriptionLike(I18nName item){
            return withNewDescriptionLike(getDescription() != null ? getDescription(): item);
    }

    public A withNewDescription(String en,String zhCN){
            return (A)withDescription(new I18nName(en, zhCN));
    }

    
/**
 * This method has been deprecated, please use method buildName instead.
 */
@Deprecated public I18nName getName(){
            return this.name!=null?this.name.build():null;
    }

    public I18nName buildName(){
            return this.name!=null?this.name.build():null;
    }

    public A withName(I18nName name){
            _visitables.remove(this.name);
            if (name!=null){ this.name= new I18nNameBuilder(name); _visitables.add(this.name);} return (A) this;
    }

    public Boolean hasName(){
            return this.name!=null;
    }

    public PipelineTaskArgumentDisplayFluent.NameNested withNewName(){
            return new NameNestedImpl();
    }

    public PipelineTaskArgumentDisplayFluent.NameNested withNewNameLike(I18nName item){
            return new NameNestedImpl(item);
    }

    public PipelineTaskArgumentDisplayFluent.NameNested editName(){
            return withNewNameLike(getName());
    }

    public PipelineTaskArgumentDisplayFluent.NameNested editOrNewName(){
            return withNewNameLike(getName() != null ? getName(): new I18nNameBuilder().build());
    }

    public PipelineTaskArgumentDisplayFluent.NameNested editOrNewNameLike(I18nName item){
            return withNewNameLike(getName() != null ? getName(): item);
    }

    public A withNewName(String en,String zhCN){
            return (A)withName(new I18nName(en, zhCN));
    }

    public String getRelated(){
            return this.related;
    }

    public A withRelated(String related){
            this.related=related; return (A) this;
    }

    public Boolean hasRelated(){
            return this.related!=null;
    }

    public String getType(){
            return this.type;
    }

    public A withType(String type){
            this.type=type; return (A) this;
    }

    public Boolean hasType(){
            return this.type!=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;
            PipelineTaskArgumentDisplayFluentImpl that = (PipelineTaskArgumentDisplayFluentImpl) o;
            if (advanced != null ? !advanced.equals(that.advanced) :that.advanced != null) return false;
            if (args != null ? !args.equals(that.args) :that.args != null) return false;
            if (description != null ? !description.equals(that.description) :that.description != null) return false;
            if (name != null ? !name.equals(that.name) :that.name != null) return false;
            if (related != null ? !related.equals(that.related) :that.related != null) return false;
            if (type != null ? !type.equals(that.type) :that.type != null) return false;
            return true;
    }


    public class DescriptionNestedImpl extends I18nNameFluentImpl> implements PipelineTaskArgumentDisplayFluent.DescriptionNested,io.alauda.kubernetes.api.builder.Nested{

            private final I18nNameBuilder builder;
    
            DescriptionNestedImpl(I18nName item){
                    this.builder = new I18nNameBuilder(this, item);
            }
            DescriptionNestedImpl(){
                    this.builder = new I18nNameBuilder(this);
            }
    
    public N and(){
            return (N) PipelineTaskArgumentDisplayFluentImpl.this.withDescription(builder.build());
    }
    public N endDescription(){
            return and();
    }

}
    public class NameNestedImpl extends I18nNameFluentImpl> implements PipelineTaskArgumentDisplayFluent.NameNested,io.alauda.kubernetes.api.builder.Nested{

            private final I18nNameBuilder builder;
    
            NameNestedImpl(I18nName item){
                    this.builder = new I18nNameBuilder(this, item);
            }
            NameNestedImpl(){
                    this.builder = new I18nNameBuilder(this);
            }
    
    public N and(){
            return (N) PipelineTaskArgumentDisplayFluentImpl.this.withName(builder.build());
    }
    public N endName(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy