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

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

    private NetworkingV1beta1IngressBackendBuilder backend;
    private String path;
    private String pathType;

    public NetworkingV1beta1HTTPIngressPathFluentImpl() { 
    }


    public NetworkingV1beta1HTTPIngressPathFluentImpl(NetworkingV1beta1HTTPIngressPath instance) { 
        this.withBackend(instance.getBackend());

        this.withPath(instance.getPath());

        this.withPathType(instance.getPathType());

    }


    
/**
 * This method has been deprecated, please use method buildBackend instead.
 * @return The buildable object.
 */
@Deprecated public NetworkingV1beta1IngressBackend getBackend() {
        return this.backend!=null?this.backend.build():null;
    }

    public NetworkingV1beta1IngressBackend buildBackend() {
        return this.backend!=null?this.backend.build():null;
    }

    public A withBackend(NetworkingV1beta1IngressBackend backend) {
        _visitables.get("backend").remove(this.backend);
        if (backend!=null){ this.backend= new NetworkingV1beta1IngressBackendBuilder(backend); _visitables.get("backend").add(this.backend);} return (A) this;
    }

    public Boolean hasBackend() {
        return this.backend != null;
    }

    public NetworkingV1beta1HTTPIngressPathFluent.BackendNested withNewBackend() {
        return new BackendNestedImpl();
    }

    public NetworkingV1beta1HTTPIngressPathFluent.BackendNested withNewBackendLike(NetworkingV1beta1IngressBackend item) {
        return new BackendNestedImpl(item);
    }

    public NetworkingV1beta1HTTPIngressPathFluent.BackendNested editBackend() {
        return withNewBackendLike(getBackend());
    }

    public NetworkingV1beta1HTTPIngressPathFluent.BackendNested editOrNewBackend() {
        return withNewBackendLike(getBackend() != null ? getBackend(): new NetworkingV1beta1IngressBackendBuilder().build());
    }

    public NetworkingV1beta1HTTPIngressPathFluent.BackendNested editOrNewBackendLike(NetworkingV1beta1IngressBackend item) {
        return withNewBackendLike(getBackend() != null ? getBackend(): item);
    }

    public String getPath() {
        return this.path;
    }

    public A withPath(String path) {
        this.path=path; return (A) this;
    }

    public Boolean hasPath() {
        return this.path != null;
    }

    public A withNewPath(String arg1) {
        return (A)withPath(new String(arg1));
    }

    public A withNewPath(StringBuilder arg1) {
        return (A)withPath(new String(arg1));
    }

    public A withNewPath(StringBuffer arg1) {
        return (A)withPath(new String(arg1));
    }

    public String getPathType() {
        return this.pathType;
    }

    public A withPathType(String pathType) {
        this.pathType=pathType; return (A) this;
    }

    public Boolean hasPathType() {
        return this.pathType != null;
    }

    public A withNewPathType(String arg1) {
        return (A)withPathType(new String(arg1));
    }

    public A withNewPathType(StringBuilder arg1) {
        return (A)withPathType(new String(arg1));
    }

    public A withNewPathType(StringBuffer arg1) {
        return (A)withPathType(new String(arg1));
    }

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

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

    public class BackendNestedImpl extends NetworkingV1beta1IngressBackendFluentImpl> implements NetworkingV1beta1HTTPIngressPathFluent.BackendNested,io.kubernetes.client.fluent.Nested {
        private final NetworkingV1beta1IngressBackendBuilder builder;

        BackendNestedImpl(NetworkingV1beta1IngressBackend item) {
            this.builder = new NetworkingV1beta1IngressBackendBuilder(this, item);
        }

        BackendNestedImpl() {
            this.builder = new NetworkingV1beta1IngressBackendBuilder(this);
        }

        public N and() {
             return (N) NetworkingV1beta1HTTPIngressPathFluentImpl.this.withBackend(builder.build());
        }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy