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

io.alauda.kubernetes.api.model.extensions.SELinuxStrategyOptionsFluentImpl Maven / Gradle / Ivy

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

import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import io.alauda.kubernetes.api.model.SELinuxOptionsBuilder;
import java.lang.String;
import io.alauda.kubernetes.api.model.SELinuxOptionsFluentImpl;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import io.alauda.kubernetes.api.model.SELinuxOptions;
import java.lang.Object;
import java.lang.Boolean;

public class SELinuxStrategyOptionsFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements SELinuxStrategyOptionsFluent{

    private String rule;
    private SELinuxOptionsBuilder seLinuxOptions;

    public SELinuxStrategyOptionsFluentImpl(){
    }
    public SELinuxStrategyOptionsFluentImpl(SELinuxStrategyOptions instance){
            this.withRule(instance.getRule()); 
            this.withSeLinuxOptions(instance.getSeLinuxOptions()); 
    }

    public String getRule(){
            return this.rule;
    }

    public A withRule(String rule){
            this.rule=rule; return (A) this;
    }

    public Boolean hasRule(){
            return this.rule!=null;
    }

    
/**
 * This method has been deprecated, please use method buildSeLinuxOptions instead.
 */
@Deprecated public SELinuxOptions getSeLinuxOptions(){
            return this.seLinuxOptions!=null?this.seLinuxOptions.build():null;
    }

    public SELinuxOptions buildSeLinuxOptions(){
            return this.seLinuxOptions!=null?this.seLinuxOptions.build():null;
    }

    public A withSeLinuxOptions(SELinuxOptions seLinuxOptions){
            _visitables.remove(this.seLinuxOptions);
            if (seLinuxOptions!=null){ this.seLinuxOptions= new SELinuxOptionsBuilder(seLinuxOptions); _visitables.add(this.seLinuxOptions);} return (A) this;
    }

    public Boolean hasSeLinuxOptions(){
            return this.seLinuxOptions!=null;
    }

    public SELinuxStrategyOptionsFluent.SeLinuxOptionsNested withNewSeLinuxOptions(){
            return new SeLinuxOptionsNestedImpl();
    }

    public SELinuxStrategyOptionsFluent.SeLinuxOptionsNested withNewSeLinuxOptionsLike(SELinuxOptions item){
            return new SeLinuxOptionsNestedImpl(item);
    }

    public SELinuxStrategyOptionsFluent.SeLinuxOptionsNested editSeLinuxOptions(){
            return withNewSeLinuxOptionsLike(getSeLinuxOptions());
    }

    public SELinuxStrategyOptionsFluent.SeLinuxOptionsNested editOrNewSeLinuxOptions(){
            return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): new SELinuxOptionsBuilder().build());
    }

    public SELinuxStrategyOptionsFluent.SeLinuxOptionsNested editOrNewSeLinuxOptionsLike(SELinuxOptions item){
            return withNewSeLinuxOptionsLike(getSeLinuxOptions() != null ? getSeLinuxOptions(): item);
    }

    public A withNewSeLinuxOptions(String level,String role,String type,String user){
            return (A)withSeLinuxOptions(new SELinuxOptions(level, role, type, user));
    }

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


    public class SeLinuxOptionsNestedImpl extends SELinuxOptionsFluentImpl> implements SELinuxStrategyOptionsFluent.SeLinuxOptionsNested,io.alauda.kubernetes.api.builder.Nested{

            private final SELinuxOptionsBuilder builder;
    
            SeLinuxOptionsNestedImpl(SELinuxOptions item){
                    this.builder = new SELinuxOptionsBuilder(this, item);
            }
            SeLinuxOptionsNestedImpl(){
                    this.builder = new SELinuxOptionsBuilder(this);
            }
    
    public N and(){
            return (N) SELinuxStrategyOptionsFluentImpl.this.withSeLinuxOptions(builder.build());
    }
    public N endSeLinuxOptions(){
            return and();
    }

}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy