io.fabric8.knative.flows.v1.SequenceStepFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.flows.v1;
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.pkg.apis.duck.v1.KReference;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder;
import java.lang.Deprecated;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceFluentImpl;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class SequenceStepFluentImpl> extends BaseFluent implements SequenceStepFluent{
public SequenceStepFluentImpl() {
}
public SequenceStepFluentImpl(SequenceStep instance) {
this.withDelivery(instance.getDelivery());
this.withRef(instance.getRef());
this.withUri(instance.getUri());
}
private DeliverySpecBuilder delivery;
private KReferenceBuilder ref;
private String uri;
/**
* 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 SequenceStepFluent.DeliveryNested withNewDelivery() {
return new SequenceStepFluentImpl.DeliveryNestedImpl();
}
public SequenceStepFluent.DeliveryNested withNewDeliveryLike(DeliverySpec item) {
return new SequenceStepFluentImpl.DeliveryNestedImpl(item);
}
public SequenceStepFluent.DeliveryNested editDelivery() {
return withNewDeliveryLike(getDelivery());
}
public SequenceStepFluent.DeliveryNested editOrNewDelivery() {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): new DeliverySpecBuilder().build());
}
public SequenceStepFluent.DeliveryNested editOrNewDeliveryLike(DeliverySpec item) {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): item);
}
/**
* This method has been deprecated, please use method buildRef instead.
* @return The buildable object.
*/
@Deprecated
public KReference getRef() {
return this.ref!=null ?this.ref.build():null;
}
public KReference buildRef() {
return this.ref!=null ?this.ref.build():null;
}
public A withRef(KReference ref) {
_visitables.get("ref").remove(this.ref);
if (ref!=null){ this.ref= new KReferenceBuilder(ref); _visitables.get("ref").add(this.ref);} else { this.ref = null; _visitables.get("ref").remove(this.ref); } return (A) this;
}
public Boolean hasRef() {
return this.ref != null;
}
public A withNewRef(String apiVersion,String group,String kind,String name,String namespace) {
return (A)withRef(new KReference(apiVersion, group, kind, name, namespace));
}
public SequenceStepFluent.RefNested withNewRef() {
return new SequenceStepFluentImpl.RefNestedImpl();
}
public SequenceStepFluent.RefNested withNewRefLike(KReference item) {
return new SequenceStepFluentImpl.RefNestedImpl(item);
}
public SequenceStepFluent.RefNested editRef() {
return withNewRefLike(getRef());
}
public SequenceStepFluent.RefNested editOrNewRef() {
return withNewRefLike(getRef() != null ? getRef(): new KReferenceBuilder().build());
}
public SequenceStepFluent.RefNested editOrNewRefLike(KReference item) {
return withNewRefLike(getRef() != null ? getRef(): item);
}
public String getUri() {
return this.uri;
}
public A withUri(String uri) {
this.uri=uri; return (A) this;
}
public Boolean hasUri() {
return this.uri != null;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
SequenceStepFluentImpl that = (SequenceStepFluentImpl) o;
if (delivery != null ? !delivery.equals(that.delivery) :that.delivery != null) return false;
if (ref != null ? !ref.equals(that.ref) :that.ref != null) return false;
if (uri != null ? !uri.equals(that.uri) :that.uri != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(delivery, ref, uri, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (delivery != null) { sb.append("delivery:"); sb.append(delivery + ","); }
if (ref != null) { sb.append("ref:"); sb.append(ref + ","); }
if (uri != null) { sb.append("uri:"); sb.append(uri); }
sb.append("}");
return sb.toString();
}
class DeliveryNestedImpl extends DeliverySpecFluentImpl> implements SequenceStepFluent.DeliveryNested,Nested{
DeliveryNestedImpl(DeliverySpec item) {
this.builder = new DeliverySpecBuilder(this, item);
}
DeliveryNestedImpl() {
this.builder = new DeliverySpecBuilder(this);
}
DeliverySpecBuilder builder;
public N and() {
return (N) SequenceStepFluentImpl.this.withDelivery(builder.build());
}
public N endDelivery() {
return and();
}
}
class RefNestedImpl extends KReferenceFluentImpl> implements SequenceStepFluent.RefNested,Nested{
RefNestedImpl(KReference item) {
this.builder = new KReferenceBuilder(this, item);
}
RefNestedImpl() {
this.builder = new KReferenceBuilder(this);
}
KReferenceBuilder builder;
public N and() {
return (N) SequenceStepFluentImpl.this.withRef(builder.build());
}
public N endRef() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy