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

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

package io.fabric8.knative.flows.v1;

import io.fabric8.knative.internal.pkg.apis.Condition;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl;
import java.lang.String;
import io.fabric8.knative.internal.pkg.apis.ConditionBuilder;
import io.fabric8.knative.internal.pkg.apis.ConditionFluentImpl;
import io.fabric8.kubernetes.api.model.ObjectReference;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class SequenceChannelStatusFluentImpl> extends BaseFluent implements SequenceChannelStatusFluent{
  public SequenceChannelStatusFluentImpl() {
  }
  public SequenceChannelStatusFluentImpl(SequenceChannelStatus instance) {
    this.withChannel(instance.getChannel()); 
    this.withReady(instance.getReady()); 
  }
  private ObjectReferenceBuilder channel;
  private ConditionBuilder ready;
  
  /**
   * This method has been deprecated, please use method buildChannel instead.
   * @return The buildable object.
   */
  @Deprecated
  public ObjectReference getChannel() {
    return this.channel!=null ?this.channel.build():null;
  }
  public ObjectReference buildChannel() {
    return this.channel!=null ?this.channel.build():null;
  }
  public A withChannel(ObjectReference channel) {
    _visitables.get("channel").remove(this.channel);
    if (channel!=null){ this.channel= new ObjectReferenceBuilder(channel); _visitables.get("channel").add(this.channel);} else { this.channel = null; _visitables.get("channel").remove(this.channel); } return (A) this;
  }
  public Boolean hasChannel() {
    return this.channel != null;
  }
  public SequenceChannelStatusFluent.ChannelNested withNewChannel() {
    return new SequenceChannelStatusFluentImpl.ChannelNestedImpl();
  }
  public SequenceChannelStatusFluent.ChannelNested withNewChannelLike(ObjectReference item) {
    return new SequenceChannelStatusFluentImpl.ChannelNestedImpl(item);
  }
  public SequenceChannelStatusFluent.ChannelNested editChannel() {
    return withNewChannelLike(getChannel());
  }
  public SequenceChannelStatusFluent.ChannelNested editOrNewChannel() {
    return withNewChannelLike(getChannel() != null ? getChannel(): new ObjectReferenceBuilder().build());
  }
  public SequenceChannelStatusFluent.ChannelNested editOrNewChannelLike(ObjectReference item) {
    return withNewChannelLike(getChannel() != null ? getChannel(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildReady instead.
   * @return The buildable object.
   */
  @Deprecated
  public Condition getReady() {
    return this.ready!=null ?this.ready.build():null;
  }
  public Condition buildReady() {
    return this.ready!=null ?this.ready.build():null;
  }
  public A withReady(Condition ready) {
    _visitables.get("ready").remove(this.ready);
    if (ready!=null){ this.ready= new ConditionBuilder(ready); _visitables.get("ready").add(this.ready);} else { this.ready = null; _visitables.get("ready").remove(this.ready); } return (A) this;
  }
  public Boolean hasReady() {
    return this.ready != null;
  }
  public SequenceChannelStatusFluent.ReadyNested withNewReady() {
    return new SequenceChannelStatusFluentImpl.ReadyNestedImpl();
  }
  public SequenceChannelStatusFluent.ReadyNested withNewReadyLike(Condition item) {
    return new SequenceChannelStatusFluentImpl.ReadyNestedImpl(item);
  }
  public SequenceChannelStatusFluent.ReadyNested editReady() {
    return withNewReadyLike(getReady());
  }
  public SequenceChannelStatusFluent.ReadyNested editOrNewReady() {
    return withNewReadyLike(getReady() != null ? getReady(): new ConditionBuilder().build());
  }
  public SequenceChannelStatusFluent.ReadyNested editOrNewReadyLike(Condition item) {
    return withNewReadyLike(getReady() != null ? getReady(): item);
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    SequenceChannelStatusFluentImpl that = (SequenceChannelStatusFluentImpl) o;
    if (channel != null ? !channel.equals(that.channel) :that.channel != null) return false;
    if (ready != null ? !ready.equals(that.ready) :that.ready != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(channel,  ready,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (channel != null) { sb.append("channel:"); sb.append(channel + ","); }
    if (ready != null) { sb.append("ready:"); sb.append(ready); }
    sb.append("}");
    return sb.toString();
  }
  class ChannelNestedImpl extends ObjectReferenceFluentImpl> implements SequenceChannelStatusFluent.ChannelNested,Nested{
    ChannelNestedImpl(ObjectReference item) {
      this.builder = new ObjectReferenceBuilder(this, item);
    }
    ChannelNestedImpl() {
      this.builder = new ObjectReferenceBuilder(this);
    }
    ObjectReferenceBuilder builder;
    public N and() {
      return (N) SequenceChannelStatusFluentImpl.this.withChannel(builder.build());
    }
    public N endChannel() {
      return and();
    }
    
  }
  class ReadyNestedImpl extends ConditionFluentImpl> implements SequenceChannelStatusFluent.ReadyNested,Nested{
    ReadyNestedImpl(Condition item) {
      this.builder = new ConditionBuilder(this, item);
    }
    ReadyNestedImpl() {
      this.builder = new ConditionBuilder(this);
    }
    ConditionBuilder builder;
    public N and() {
      return (N) SequenceChannelStatusFluentImpl.this.withReady(builder.build());
    }
    public N endReady() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy