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

io.kubernetes.client.openapi.models.V1beta1SELinuxStrategyOptionsFluentImpl Maven / Gradle / Ivy

There is a newer version: 22.0.0
Show newest version
package io.kubernetes.client.openapi.models;

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

public class V1beta1SELinuxStrategyOptionsFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1beta1SELinuxStrategyOptionsFluent {

    private String rule;
    private V1SELinuxOptionsBuilder seLinuxOptions;

    public V1beta1SELinuxStrategyOptionsFluentImpl() { 
    }


    public V1beta1SELinuxStrategyOptionsFluentImpl(V1beta1SELinuxStrategyOptions 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;
    }

    public A withNewRule(String arg1) {
        return (A)withRule(new String(arg1));
    }

    public A withNewRule(StringBuilder arg1) {
        return (A)withRule(new String(arg1));
    }

    public A withNewRule(StringBuffer arg1) {
        return (A)withRule(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildSeLinuxOptions instead.
 * @return The buildable object.
 */
@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.get("seLinuxOptions").remove(this.seLinuxOptions);
        if (seLinuxOptions!=null){ this.seLinuxOptions= new V1SELinuxOptionsBuilder(seLinuxOptions); _visitables.get("seLinuxOptions").add(this.seLinuxOptions);} return (A) this;
    }

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

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

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

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

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

    public V1beta1SELinuxStrategyOptionsFluent.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;
        V1beta1SELinuxStrategyOptionsFluentImpl that = (V1beta1SELinuxStrategyOptionsFluentImpl) 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 int hashCode() {
        return java.util.Objects.hash(rule,  seLinuxOptions,  super.hashCode());
    }

    public class SeLinuxOptionsNestedImpl extends V1SELinuxOptionsFluentImpl> implements V1beta1SELinuxStrategyOptionsFluent.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) V1beta1SELinuxStrategyOptionsFluentImpl.this.withSeLinuxOptions(builder.build());
        }

        public N endSeLinuxOptions() {
             return and();
        }
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy