io.fabric8.knative.flows.v1.ParallelBranchFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.flows.v1;
import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
import java.lang.SuppressWarnings;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecFluentImpl;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder;
import java.lang.Deprecated;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl;
import java.lang.Boolean;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class ParallelBranchFluentImpl> extends BaseFluent implements ParallelBranchFluent{
public ParallelBranchFluentImpl() {
}
public ParallelBranchFluentImpl(ParallelBranch instance) {
this.withDelivery(instance.getDelivery());
this.withFilter(instance.getFilter());
this.withReply(instance.getReply());
this.withSubscriber(instance.getSubscriber());
}
private DeliverySpecBuilder delivery;
private DestinationBuilder filter;
private DestinationBuilder reply;
private DestinationBuilder subscriber;
/**
* This method has been deprecated, please use method buildDelivery instead.
* @return The buildable object.
*/
@Deprecated
public DeliverySpec getDelivery() {
return this.delivery!=null ?this.delivery.build():null;
}
public DeliverySpec buildDelivery() {
return this.delivery!=null ?this.delivery.build():null;
}
public A withDelivery(DeliverySpec delivery) {
_visitables.get("delivery").remove(this.delivery);
if (delivery!=null){ this.delivery= new DeliverySpecBuilder(delivery); _visitables.get("delivery").add(this.delivery);} else { this.delivery = null; _visitables.get("delivery").remove(this.delivery); } return (A) this;
}
public Boolean hasDelivery() {
return this.delivery != null;
}
public ParallelBranchFluent.DeliveryNested withNewDelivery() {
return new ParallelBranchFluentImpl.DeliveryNestedImpl();
}
public ParallelBranchFluent.DeliveryNested withNewDeliveryLike(DeliverySpec item) {
return new ParallelBranchFluentImpl.DeliveryNestedImpl(item);
}
public ParallelBranchFluent.DeliveryNested editDelivery() {
return withNewDeliveryLike(getDelivery());
}
public ParallelBranchFluent.DeliveryNested editOrNewDelivery() {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): new DeliverySpecBuilder().build());
}
public ParallelBranchFluent.DeliveryNested editOrNewDeliveryLike(DeliverySpec item) {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): item);
}
/**
* This method has been deprecated, please use method buildFilter instead.
* @return The buildable object.
*/
@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);} else { this.filter = null; _visitables.get("filter").remove(this.filter); } return (A) this;
}
public Boolean hasFilter() {
return this.filter != null;
}
public ParallelBranchFluent.FilterNested withNewFilter() {
return new ParallelBranchFluentImpl.FilterNestedImpl();
}
public ParallelBranchFluent.FilterNested withNewFilterLike(Destination item) {
return new ParallelBranchFluentImpl.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.
*/
@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);} else { this.reply = null; _visitables.get("reply").remove(this.reply); } return (A) this;
}
public Boolean hasReply() {
return this.reply != null;
}
public ParallelBranchFluent.ReplyNested withNewReply() {
return new ParallelBranchFluentImpl.ReplyNestedImpl();
}
public ParallelBranchFluent.ReplyNested withNewReplyLike(Destination item) {
return new ParallelBranchFluentImpl.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.
*/
@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);} else { this.subscriber = null; _visitables.get("subscriber").remove(this.subscriber); } return (A) this;
}
public Boolean hasSubscriber() {
return this.subscriber != null;
}
public ParallelBranchFluent.SubscriberNested withNewSubscriber() {
return new ParallelBranchFluentImpl.SubscriberNestedImpl();
}
public ParallelBranchFluent.SubscriberNested withNewSubscriberLike(Destination item) {
return new ParallelBranchFluentImpl.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 (delivery != null ? !delivery.equals(that.delivery) :that.delivery != null) return false;
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 int hashCode() {
return java.util.Objects.hash(delivery, filter, reply, subscriber, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (delivery != null) { sb.append("delivery:"); sb.append(delivery + ","); }
if (filter != null) { sb.append("filter:"); sb.append(filter + ","); }
if (reply != null) { sb.append("reply:"); sb.append(reply + ","); }
if (subscriber != null) { sb.append("subscriber:"); sb.append(subscriber); }
sb.append("}");
return sb.toString();
}
class DeliveryNestedImpl extends DeliverySpecFluentImpl> implements ParallelBranchFluent.DeliveryNested,Nested{
DeliveryNestedImpl(DeliverySpec item) {
this.builder = new DeliverySpecBuilder(this, item);
}
DeliveryNestedImpl() {
this.builder = new DeliverySpecBuilder(this);
}
DeliverySpecBuilder builder;
public N and() {
return (N) ParallelBranchFluentImpl.this.withDelivery(builder.build());
}
public N endDelivery() {
return and();
}
}
class FilterNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.FilterNested,Nested{
FilterNestedImpl(Destination item) {
this.builder = new DestinationBuilder(this, item);
}
FilterNestedImpl() {
this.builder = new DestinationBuilder(this);
}
DestinationBuilder builder;
public N and() {
return (N) ParallelBranchFluentImpl.this.withFilter(builder.build());
}
public N endFilter() {
return and();
}
}
class ReplyNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.ReplyNested,Nested{
ReplyNestedImpl(Destination item) {
this.builder = new DestinationBuilder(this, item);
}
ReplyNestedImpl() {
this.builder = new DestinationBuilder(this);
}
DestinationBuilder builder;
public N and() {
return (N) ParallelBranchFluentImpl.this.withReply(builder.build());
}
public N endReply() {
return and();
}
}
class SubscriberNestedImpl extends DestinationFluentImpl> implements ParallelBranchFluent.SubscriberNested,Nested{
SubscriberNestedImpl(Destination item) {
this.builder = new DestinationBuilder(this, item);
}
SubscriberNestedImpl() {
this.builder = new DestinationBuilder(this);
}
DestinationBuilder builder;
public N and() {
return (N) ParallelBranchFluentImpl.this.withSubscriber(builder.build());
}
public N endSubscriber() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy