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

io.kubernetes.client.openapi.models.V1IngressRuleFluentImpl 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 V1IngressRuleFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1IngressRuleFluent {

    private String host;
    private V1HTTPIngressRuleValueBuilder http;

    public V1IngressRuleFluentImpl() { 
    }


    public V1IngressRuleFluentImpl(V1IngressRule instance) { 
        this.withHost(instance.getHost());

        this.withHttp(instance.getHttp());

    }


    public String getHost() {
        return this.host;
    }

    public A withHost(String host) {
        this.host=host; return (A) this;
    }

    public Boolean hasHost() {
        return this.host != null;
    }

    public A withNewHost(String arg1) {
        return (A)withHost(new String(arg1));
    }

    public A withNewHost(StringBuilder arg1) {
        return (A)withHost(new String(arg1));
    }

    public A withNewHost(StringBuffer arg1) {
        return (A)withHost(new String(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildHttp instead.
 * @return The buildable object.
 */
@Deprecated public V1HTTPIngressRuleValue getHttp() {
        return this.http!=null?this.http.build():null;
    }

    public V1HTTPIngressRuleValue buildHttp() {
        return this.http!=null?this.http.build():null;
    }

    public A withHttp(V1HTTPIngressRuleValue http) {
        _visitables.get("http").remove(this.http);
        if (http!=null){ this.http= new V1HTTPIngressRuleValueBuilder(http); _visitables.get("http").add(this.http);} return (A) this;
    }

    public Boolean hasHttp() {
        return this.http != null;
    }

    public V1IngressRuleFluent.HttpNested withNewHttp() {
        return new HttpNestedImpl();
    }

    public V1IngressRuleFluent.HttpNested withNewHttpLike(V1HTTPIngressRuleValue item) {
        return new HttpNestedImpl(item);
    }

    public V1IngressRuleFluent.HttpNested editHttp() {
        return withNewHttpLike(getHttp());
    }

    public V1IngressRuleFluent.HttpNested editOrNewHttp() {
        return withNewHttpLike(getHttp() != null ? getHttp(): new V1HTTPIngressRuleValueBuilder().build());
    }

    public V1IngressRuleFluent.HttpNested editOrNewHttpLike(V1HTTPIngressRuleValue item) {
        return withNewHttpLike(getHttp() != null ? getHttp(): item);
    }

    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        V1IngressRuleFluentImpl that = (V1IngressRuleFluentImpl) o;
        if (host != null ? !host.equals(that.host) :that.host != null) return false;
        if (http != null ? !http.equals(that.http) :that.http != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(host,  http,  super.hashCode());
    }

    public class HttpNestedImpl extends V1HTTPIngressRuleValueFluentImpl> implements V1IngressRuleFluent.HttpNested,io.kubernetes.client.fluent.Nested {
        private final V1HTTPIngressRuleValueBuilder builder;

        HttpNestedImpl(V1HTTPIngressRuleValue item) {
            this.builder = new V1HTTPIngressRuleValueBuilder(this, item);
        }

        HttpNestedImpl() {
            this.builder = new V1HTTPIngressRuleValueBuilder(this);
        }

        public N and() {
             return (N) V1IngressRuleFluentImpl.this.withHttp(builder.build());
        }

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


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy