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

io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.sources.v1;

import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesFluentImpl;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides;
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 io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder;
import java.lang.Boolean;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class PingSourceSpecFluentImpl> extends BaseFluent implements PingSourceSpecFluent{
  public PingSourceSpecFluentImpl() {
  }
  public PingSourceSpecFluentImpl(PingSourceSpec instance) {
    this.withCeOverrides(instance.getCeOverrides()); 
    this.withContentType(instance.getContentType()); 
    this.withData(instance.getData()); 
    this.withDataBase64(instance.getDataBase64()); 
    this.withSchedule(instance.getSchedule()); 
    this.withSink(instance.getSink()); 
    this.withTimezone(instance.getTimezone()); 
  }
  private CloudEventOverridesBuilder ceOverrides;
  private String contentType;
  private String data;
  private String dataBase64;
  private String schedule;
  private DestinationBuilder sink;
  private String timezone;
  
  /**
   * This method has been deprecated, please use method buildCeOverrides instead.
   * @return The buildable object.
   */
  @Deprecated
  public CloudEventOverrides getCeOverrides() {
    return this.ceOverrides!=null ?this.ceOverrides.build():null;
  }
  public CloudEventOverrides buildCeOverrides() {
    return this.ceOverrides!=null ?this.ceOverrides.build():null;
  }
  public A withCeOverrides(CloudEventOverrides ceOverrides) {
    _visitables.get("ceOverrides").remove(this.ceOverrides);
    if (ceOverrides!=null){ this.ceOverrides= new CloudEventOverridesBuilder(ceOverrides); _visitables.get("ceOverrides").add(this.ceOverrides);} else { this.ceOverrides = null; _visitables.get("ceOverrides").remove(this.ceOverrides); } return (A) this;
  }
  public Boolean hasCeOverrides() {
    return this.ceOverrides != null;
  }
  public PingSourceSpecFluent.CeOverridesNested withNewCeOverrides() {
    return new PingSourceSpecFluentImpl.CeOverridesNestedImpl();
  }
  public PingSourceSpecFluent.CeOverridesNested withNewCeOverridesLike(CloudEventOverrides item) {
    return new PingSourceSpecFluentImpl.CeOverridesNestedImpl(item);
  }
  public PingSourceSpecFluent.CeOverridesNested editCeOverrides() {
    return withNewCeOverridesLike(getCeOverrides());
  }
  public PingSourceSpecFluent.CeOverridesNested editOrNewCeOverrides() {
    return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): new CloudEventOverridesBuilder().build());
  }
  public PingSourceSpecFluent.CeOverridesNested editOrNewCeOverridesLike(CloudEventOverrides item) {
    return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): item);
  }
  public String getContentType() {
    return this.contentType;
  }
  public A withContentType(String contentType) {
    this.contentType=contentType; return (A) this;
  }
  public Boolean hasContentType() {
    return this.contentType != null;
  }
  public String getData() {
    return this.data;
  }
  public A withData(String data) {
    this.data=data; return (A) this;
  }
  public Boolean hasData() {
    return this.data != null;
  }
  public String getDataBase64() {
    return this.dataBase64;
  }
  public A withDataBase64(String dataBase64) {
    this.dataBase64=dataBase64; return (A) this;
  }
  public Boolean hasDataBase64() {
    return this.dataBase64 != null;
  }
  public String getSchedule() {
    return this.schedule;
  }
  public A withSchedule(String schedule) {
    this.schedule=schedule; return (A) this;
  }
  public Boolean hasSchedule() {
    return this.schedule != null;
  }
  
  /**
   * This method has been deprecated, please use method buildSink instead.
   * @return The buildable object.
   */
  @Deprecated
  public Destination getSink() {
    return this.sink!=null ?this.sink.build():null;
  }
  public Destination buildSink() {
    return this.sink!=null ?this.sink.build():null;
  }
  public A withSink(Destination sink) {
    _visitables.get("sink").remove(this.sink);
    if (sink!=null){ this.sink= new DestinationBuilder(sink); _visitables.get("sink").add(this.sink);} else { this.sink = null; _visitables.get("sink").remove(this.sink); } return (A) this;
  }
  public Boolean hasSink() {
    return this.sink != null;
  }
  public PingSourceSpecFluent.SinkNested withNewSink() {
    return new PingSourceSpecFluentImpl.SinkNestedImpl();
  }
  public PingSourceSpecFluent.SinkNested withNewSinkLike(Destination item) {
    return new PingSourceSpecFluentImpl.SinkNestedImpl(item);
  }
  public PingSourceSpecFluent.SinkNested editSink() {
    return withNewSinkLike(getSink());
  }
  public PingSourceSpecFluent.SinkNested editOrNewSink() {
    return withNewSinkLike(getSink() != null ? getSink(): new DestinationBuilder().build());
  }
  public PingSourceSpecFluent.SinkNested editOrNewSinkLike(Destination item) {
    return withNewSinkLike(getSink() != null ? getSink(): item);
  }
  public String getTimezone() {
    return this.timezone;
  }
  public A withTimezone(String timezone) {
    this.timezone=timezone; return (A) this;
  }
  public Boolean hasTimezone() {
    return this.timezone != null;
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    PingSourceSpecFluentImpl that = (PingSourceSpecFluentImpl) o;
    if (ceOverrides != null ? !ceOverrides.equals(that.ceOverrides) :that.ceOverrides != null) return false;
    if (contentType != null ? !contentType.equals(that.contentType) :that.contentType != null) return false;
    if (data != null ? !data.equals(that.data) :that.data != null) return false;
    if (dataBase64 != null ? !dataBase64.equals(that.dataBase64) :that.dataBase64 != null) return false;
    if (schedule != null ? !schedule.equals(that.schedule) :that.schedule != null) return false;
    if (sink != null ? !sink.equals(that.sink) :that.sink != null) return false;
    if (timezone != null ? !timezone.equals(that.timezone) :that.timezone != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(ceOverrides,  contentType,  data,  dataBase64,  schedule,  sink,  timezone,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (ceOverrides != null) { sb.append("ceOverrides:"); sb.append(ceOverrides + ","); }
    if (contentType != null) { sb.append("contentType:"); sb.append(contentType + ","); }
    if (data != null) { sb.append("data:"); sb.append(data + ","); }
    if (dataBase64 != null) { sb.append("dataBase64:"); sb.append(dataBase64 + ","); }
    if (schedule != null) { sb.append("schedule:"); sb.append(schedule + ","); }
    if (sink != null) { sb.append("sink:"); sb.append(sink + ","); }
    if (timezone != null) { sb.append("timezone:"); sb.append(timezone); }
    sb.append("}");
    return sb.toString();
  }
  class CeOverridesNestedImpl extends CloudEventOverridesFluentImpl> implements PingSourceSpecFluent.CeOverridesNested,Nested{
    CeOverridesNestedImpl(CloudEventOverrides item) {
      this.builder = new CloudEventOverridesBuilder(this, item);
    }
    CeOverridesNestedImpl() {
      this.builder = new CloudEventOverridesBuilder(this);
    }
    CloudEventOverridesBuilder builder;
    public N and() {
      return (N) PingSourceSpecFluentImpl.this.withCeOverrides(builder.build());
    }
    public N endCeOverrides() {
      return and();
    }
    
  }
  class SinkNestedImpl extends DestinationFluentImpl> implements PingSourceSpecFluent.SinkNested,Nested{
    SinkNestedImpl(Destination item) {
      this.builder = new DestinationBuilder(this, item);
    }
    SinkNestedImpl() {
      this.builder = new DestinationBuilder(this);
    }
    DestinationBuilder builder;
    public N and() {
      return (N) PingSourceSpecFluentImpl.this.withSink(builder.build());
    }
    public N endSink() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy