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

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

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

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

public class V1SessionAffinityConfigFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1SessionAffinityConfigFluent {

    private V1ClientIPConfigBuilder clientIP;

    public V1SessionAffinityConfigFluentImpl() { 
    }


    public V1SessionAffinityConfigFluentImpl(V1SessionAffinityConfig instance) { 
        this.withClientIP(instance.getClientIP());

    }


    
/**
 * This method has been deprecated, please use method buildClientIP instead.
 * @return The buildable object.
 */
@Deprecated public V1ClientIPConfig getClientIP() {
        return this.clientIP!=null?this.clientIP.build():null;
    }

    public V1ClientIPConfig buildClientIP() {
        return this.clientIP!=null?this.clientIP.build():null;
    }

    public A withClientIP(V1ClientIPConfig clientIP) {
        _visitables.get("clientIP").remove(this.clientIP);
        if (clientIP!=null){ this.clientIP= new V1ClientIPConfigBuilder(clientIP); _visitables.get("clientIP").add(this.clientIP);} return (A) this;
    }

    public Boolean hasClientIP() {
        return this.clientIP != null;
    }

    public V1SessionAffinityConfigFluent.ClientIPNested withNewClientIP() {
        return new ClientIPNestedImpl();
    }

    public V1SessionAffinityConfigFluent.ClientIPNested withNewClientIPLike(V1ClientIPConfig item) {
        return new ClientIPNestedImpl(item);
    }

    public V1SessionAffinityConfigFluent.ClientIPNested editClientIP() {
        return withNewClientIPLike(getClientIP());
    }

    public V1SessionAffinityConfigFluent.ClientIPNested editOrNewClientIP() {
        return withNewClientIPLike(getClientIP() != null ? getClientIP(): new V1ClientIPConfigBuilder().build());
    }

    public V1SessionAffinityConfigFluent.ClientIPNested editOrNewClientIPLike(V1ClientIPConfig item) {
        return withNewClientIPLike(getClientIP() != null ? getClientIP(): item);
    }

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

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

    public class ClientIPNestedImpl extends V1ClientIPConfigFluentImpl> implements V1SessionAffinityConfigFluent.ClientIPNested,io.kubernetes.client.fluent.Nested {
        private final V1ClientIPConfigBuilder builder;

        ClientIPNestedImpl(V1ClientIPConfig item) {
            this.builder = new V1ClientIPConfigBuilder(this, item);
        }

        ClientIPNestedImpl() {
            this.builder = new V1ClientIPConfigBuilder(this);
        }

        public N and() {
             return (N) V1SessionAffinityConfigFluentImpl.this.withClientIP(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy