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

io.kubernetes.client.models.PolicyV1beta1SELinuxStrategyOptionsFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class PolicyV1beta1SELinuxStrategyOptionsFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements PolicyV1beta1SELinuxStrategyOptionsFluent{

    private String rule;
    private V1SELinuxOptionsBuilder seLinuxOptions;

    public PolicyV1beta1SELinuxStrategyOptionsFluentImpl(){
    }
    public PolicyV1beta1SELinuxStrategyOptionsFluentImpl(PolicyV1beta1SELinuxStrategyOptions 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 V1SELinuxOptions getSeLinuxOptions(){
            return this.seLinuxOptions!=null?this.seLinuxOptions.build():null;
    }

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

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

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

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

    public PolicyV1beta1SELinuxStrategyOptionsFluent.SeLinuxOptionsNested withNewSeLinuxOptionsLike(V1SELinuxOptions item){
            return new SeLinuxOptionsNestedImpl(item);
    }

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

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

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

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            PolicyV1beta1SELinuxStrategyOptionsFluentImpl that = (PolicyV1beta1SELinuxStrategyOptionsFluentImpl) 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 V1SELinuxOptionsFluentImpl> implements PolicyV1beta1SELinuxStrategyOptionsFluent.SeLinuxOptionsNested,io.kubernetes.client.fluent.Nested{

            private final V1SELinuxOptionsBuilder builder;
    
            SeLinuxOptionsNestedImpl(V1SELinuxOptions item){
                    this.builder = new V1SELinuxOptionsBuilder(this, item);
            }
            SeLinuxOptionsNestedImpl(){
                    this.builder = new V1SELinuxOptionsBuilder(this);
            }
    
    public N and(){
            return (N) PolicyV1beta1SELinuxStrategyOptionsFluentImpl.this.withSeLinuxOptions(builder.build());
    }
    public N endSeLinuxOptions(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy