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

annotations.io.fabric8.kubernetes.api.model.extensions.HTTPIngressRuleValueFluentImpl Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package io.fabric8.kubernetes.api.model.extensions;

import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import java.util.ArrayList;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;

public class HTTPIngressRuleValueFluentImpl> extends BaseFluent implements HTTPIngressRuleValueFluent{

    private List> paths =  new ArrayList>();

    public HTTPIngressRuleValueFluentImpl(){
    }
    public HTTPIngressRuleValueFluentImpl(HTTPIngressRuleValue instance){
            this.withPaths(instance.getPaths()); 
    }

    public A addToPaths(HTTPIngressPath... items){
            for (HTTPIngressPath item : items) {HTTPIngressPathBuilder builder = new HTTPIngressPathBuilder(item);_visitables.add(builder);this.paths.add(builder);} return (A)this;
    }

    public A removeFromPaths(HTTPIngressPath... items){
            for (HTTPIngressPath item : items) {HTTPIngressPathBuilder builder = new HTTPIngressPathBuilder(item);_visitables.remove(builder);this.paths.remove(builder);} return (A)this;
    }

    public List getPaths(){
            return build(paths);
    }

    public A withPaths(List paths){
            this.paths.clear();
            if (paths != null) {for (HTTPIngressPath item : paths){this.addToPaths(item);}} return (A) this;
    }

    public A withPaths(HTTPIngressPath... paths){
            this.paths.clear(); if (paths != null) {for (HTTPIngressPath item :paths){ this.addToPaths(item);}} return (A) this;
    }

    public HTTPIngressRuleValueFluent.PathsNested addNewPath(){
            return new PathsNestedImpl();
    }

    public HTTPIngressRuleValueFluent.PathsNested addNewPathLike(HTTPIngressPath item){
            return new PathsNestedImpl(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;
            HTTPIngressRuleValueFluentImpl that = (HTTPIngressRuleValueFluentImpl) o;
            if (paths != null ? !paths.equals(that.paths) :that.paths != null) return false;
            return true;
    }


    public class PathsNestedImpl extends HTTPIngressPathFluentImpl> implements HTTPIngressRuleValueFluent.PathsNested,Nested{

            private final HTTPIngressPathBuilder builder;
    
            PathsNestedImpl(){
                    this.builder = new HTTPIngressPathBuilder(this);
            }
            PathsNestedImpl(HTTPIngressPath item){
                    this.builder = new HTTPIngressPathBuilder(this, item);
            }
    
    public N endPath(){
            return and();
    }
    public N and(){
            return (N) HTTPIngressRuleValueFluentImpl.this.addToPaths(builder.build());
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy