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

io.fabric8.knative.flows.v1alpha1.ParallelBranchFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.flows.v1alpha1;

import io.fabric8.knative.duck.v1.Destination;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.knative.duck.v1.DestinationBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.knative.duck.v1.DestinationFluentImpl;
import java.lang.Boolean;

public class ParallelBranchFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements ParallelBranchFluent{

    private DestinationBuilder filter;
    private DestinationBuilder reply;
    private DestinationBuilder subscriber;

    public ParallelBranchFluentImpl(){
    }
    public ParallelBranchFluentImpl(ParallelBranch instance){
            this.withFilter(instance.getFilter()); 
            this.withReply(instance.getReply()); 
            this.withSubscriber(instance.getSubscriber()); 
    }

    
/**
 * This method has been deprecated, please use method buildFilter instead.
 * @return The buildable object.
 */
@java.lang.Deprecated public Destination getFilter(){
            return this.filter!=null?this.filter.build():null;
    }

    public Destination buildFilter(){
            return this.filter!=null?this.filter.build():null;
    }

    public A withFilter(Destination filter){
            _visitables.get("filter").remove(this.filter);
            if (filter!=null){ this.filter= new DestinationBuilder(filter); _visitables.get("filter").add(this.filter);} return (A) this;
    }

    public Boolean hasFilter(){
            return this.filter != null;
    }

    public ParallelBranchFluent.FilterNested withNewFilter(){
            return new FilterNestedImpl();
    }

    public ParallelBranchFluent.FilterNested withNewFilterLike(Destination item){
            return new FilterNestedImpl(item);
    }

    public ParallelBranchFluent.FilterNested editFilter(){
            return withNewFilterLike(getFilter());
    }

    public ParallelBranchFluent.FilterNested editOrNewFilter(){
            return withNewFilterLike(getFilter() != null ? getFilter(): new DestinationBuilder().build());
    }

    public ParallelBranchFluent.FilterNested editOrNewFilterLike(Destination item){
            return withNewFilterLike(getFilter() != null ? getFilter(): item);
    }

    
/**
 * This method has been deprecated, please use method buildReply instead.
 * @return The buildable object.
 */
@java.lang.Deprecated public Destination getReply(){
            return this.reply!=null?this.reply.build():null;
    }

    public Destination buildReply(){
            return this.reply!=null?this.reply.build():null;
    }

    public A withReply(Destination reply){
            _visitables.get("reply").remove(this.reply);
            if (reply!=null){ this.reply= new DestinationBuilder(reply); _visitables.get("reply").add(this.reply);} return (A) this;
    }

    public Boolean hasReply(){
            return this.reply != null;
    }

    public ParallelBranchFluent.ReplyNested withNewReply(){
            return new ReplyNestedImpl();
    }

    public ParallelBranchFluent.ReplyNested withNewReplyLike(Destination item){
            return new ReplyNestedImpl(item);
    }

    public ParallelBranchFluent.ReplyNested editReply(){
            return withNewReplyLike(getReply());
    }

    public ParallelBranchFluent.ReplyNested editOrNewReply(){
            return withNewReplyLike(getReply() != null ? getReply(): new DestinationBuilder().build());
    }

    public ParallelBranchFluent.ReplyNested editOrNewReplyLike(Destination item){
            return withNewReplyLike(getReply() != null ? getReply(): item);
    }

    
/**
 * This method has been deprecated, please use method buildSubscriber instead.
 * @return The buildable object.
 */
@java.lang.Deprecated public Destination getSubscriber(){
            return this.subscriber!=null?this.subscriber.build():null;
    }

    public Destination buildSubscriber(){
            return this.subscriber!=null?this.subscriber.build():null;
    }

    public A withSubscriber(Destination subscriber){
            _visitables.get("subscriber").remove(this.subscriber);
            if (subscriber!=null){ this.subscriber= new DestinationBuilder(subscriber); _visitables.get("subscriber").add(this.subscriber);} return (A) this;
    }

    public Boolean hasSubscriber(){
            return this.subscriber != null;
    }

    public ParallelBranchFluent.SubscriberNested withNewSubscriber(){
            return new SubscriberNestedImpl();
    }

    public ParallelBranchFluent.SubscriberNested withNewSubscriberLike(Destination item){
            return new SubscriberNestedImpl(item);
    }

    public ParallelBranchFluent.SubscriberNested editSubscriber(){
            return withNewSubscriberLike(getSubscriber());
    }

    public ParallelBranchFluent.SubscriberNested editOrNewSubscriber(){
            return withNewSubscriberLike(getSubscriber() != null ? getSubscriber(): new DestinationBuilder().build());
    }

    public ParallelBranchFluent.SubscriberNested editOrNewSubscriberLike(Destination item){
            return withNewSubscriberLike(getSubscriber() != null ? getSubscriber(): item);
    }

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


    public class FilterNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.FilterNested,io.fabric8.kubernetes.api.builder.Nested{

            private final DestinationBuilder builder;
    
            FilterNestedImpl(Destination item){
                    this.builder = new DestinationBuilder(this, item);
            }
            FilterNestedImpl(){
                    this.builder = new DestinationBuilder(this);
            }
    
    public N and(){
            return (N) ParallelBranchFluentImpl.this.withFilter(builder.build());
    }
    public N endFilter(){
            return and();
    }

}
    public class ReplyNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.ReplyNested,io.fabric8.kubernetes.api.builder.Nested{

            private final DestinationBuilder builder;
    
            ReplyNestedImpl(Destination item){
                    this.builder = new DestinationBuilder(this, item);
            }
            ReplyNestedImpl(){
                    this.builder = new DestinationBuilder(this);
            }
    
    public N and(){
            return (N) ParallelBranchFluentImpl.this.withReply(builder.build());
    }
    public N endReply(){
            return and();
    }

}
    public class SubscriberNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.SubscriberNested,io.fabric8.kubernetes.api.builder.Nested{

            private final DestinationBuilder builder;
    
            SubscriberNestedImpl(Destination item){
                    this.builder = new DestinationBuilder(this, item);
            }
            SubscriberNestedImpl(){
                    this.builder = new DestinationBuilder(this);
            }
    
    public N and(){
            return (N) ParallelBranchFluentImpl.this.withSubscriber(builder.build());
    }
    public N endSubscriber(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy