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

io.fabric8.knative.flows.v1.SequenceStepFluent Maven / Gradle / Ivy

package io.fabric8.knative.flows.v1;

import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecFluent;
import java.lang.SuppressWarnings;
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.pkg.apis.duck.v1.KReferenceFluent;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class SequenceStepFluent> extends BaseFluent{
  public SequenceStepFluent() {
  }
  public SequenceStepFluent(SequenceStep instance) {
    instance = (instance != null ? instance : new SequenceStep());

    if (instance != null) {
      this.withCACerts(instance.getCACerts());
      this.withDelivery(instance.getDelivery());
      this.withRef(instance.getRef());
      this.withUri(instance.getUri());
      this.withCACerts(instance.getCACerts());
      this.withDelivery(instance.getDelivery());
      this.withRef(instance.getRef());
      this.withUri(instance.getUri());
    }
  }
  private String cACerts;
  private DeliverySpecBuilder delivery;
  private KReferenceBuilder ref;
  private String uri;
  public String getCACerts() {
    return this.cACerts;
  }
  public A withCACerts(String cACerts) {
    this.cACerts=cACerts; return (A) this;
  }
  public boolean hasCACerts() {
    return this.cACerts != 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 DeliveryNested withNewDelivery() {
    return new DeliveryNested(null);
  }
  public DeliveryNested withNewDeliveryLike(DeliverySpec item) {
    return new DeliveryNested(item);
  }
  public DeliveryNested editDelivery() {
    return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(null));
  }
  public DeliveryNested editOrNewDelivery() {
    return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(new DeliverySpecBuilder().build()));
  }
  public DeliveryNested editOrNewDeliveryLike(DeliverySpec item) {
    return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(item));
  }
  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 RefNested withNewRef() {
    return new RefNested(null);
  }
  public RefNested withNewRefLike(KReference item) {
    return new RefNested(item);
  }
  public RefNested editRef() {
    return withNewRefLike(java.util.Optional.ofNullable(buildRef()).orElse(null));
  }
  public RefNested editOrNewRef() {
    return withNewRefLike(java.util.Optional.ofNullable(buildRef()).orElse(new KReferenceBuilder().build()));
  }
  public RefNested editOrNewRefLike(KReference item) {
    return withNewRefLike(java.util.Optional.ofNullable(buildRef()).orElse(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;
    if (!super.equals(o)) return false;
    SequenceStepFluent that = (SequenceStepFluent) o;
    if (!java.util.Objects.equals(cACerts, that.cACerts)) return false;

    if (!java.util.Objects.equals(delivery, that.delivery)) return false;

    if (!java.util.Objects.equals(ref, that.ref)) return false;

    if (!java.util.Objects.equals(uri, that.uri)) return false;

    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(cACerts,  delivery,  ref,  uri,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (cACerts != null) { sb.append("cACerts:"); sb.append(cACerts + ","); }
    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();
  }
  public class DeliveryNested extends DeliverySpecFluent> implements Nested{
    DeliveryNested(DeliverySpec item) {
      this.builder = new DeliverySpecBuilder(this, item);
    }
    DeliverySpecBuilder builder;
    public N and() {
      return (N) SequenceStepFluent.this.withDelivery(builder.build());
    }
    public N endDelivery() {
      return and();
    }
    
  }
  public class RefNested extends KReferenceFluent> implements Nested{
    RefNested(KReference item) {
      this.builder = new KReferenceBuilder(this, item);
    }
    KReferenceBuilder builder;
    public N and() {
      return (N) SequenceStepFluent.this.withRef(builder.build());
    }
    public N endRef() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy