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(io.fabric8.knative.sources.v1.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 java.lang.String data;
private java.lang.String dataBase64;
private java.lang.String schedule;
private DestinationBuilder sink;
private java.lang.String timezone;
/**
* This method has been deprecated, please use method buildCeOverrides instead.
* @return The buildable object.
*/
@Deprecated
public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides getCeOverrides() {
return this.ceOverrides!=null ?this.ceOverrides.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides buildCeOverrides() {
return this.ceOverrides!=null ?this.ceOverrides.build():null;
}
public A withCeOverrides(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides ceOverrides) {
_visitables.get("ceOverrides").remove(this.ceOverrides);
if (ceOverrides!=null){ this.ceOverrides= new CloudEventOverridesBuilder(ceOverrides); _visitables.get("ceOverrides").add(this.ceOverrides);} return (A) this;
}
public Boolean hasCeOverrides() {
return this.ceOverrides != null;
}
public PingSourceSpecFluent.CeOverridesNested withNewCeOverrides() {
return new PingSourceSpecFluentImpl.CeOverridesNestedImpl();
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested withNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
return new PingSourceSpecFluentImpl.CeOverridesNestedImpl(item);
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editCeOverrides() {
return withNewCeOverridesLike(getCeOverrides());
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editOrNewCeOverrides() {
return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder().build());
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editOrNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): item);
}
public java.lang.String getContentType() {
return this.contentType;
}
public A withContentType(java.lang.String contentType) {
this.contentType=contentType; return (A) this;
}
public java.lang.Boolean hasContentType() {
return this.contentType != null;
}
public java.lang.String getData() {
return this.data;
}
public A withData(java.lang.String data) {
this.data=data; return (A) this;
}
public java.lang.Boolean hasData() {
return this.data != null;
}
public java.lang.String getDataBase64() {
return this.dataBase64;
}
public A withDataBase64(java.lang.String dataBase64) {
this.dataBase64=dataBase64; return (A) this;
}
public java.lang.Boolean hasDataBase64() {
return this.dataBase64 != null;
}
public java.lang.String getSchedule() {
return this.schedule;
}
public A withSchedule(java.lang.String schedule) {
this.schedule=schedule; return (A) this;
}
public java.lang.Boolean hasSchedule() {
return this.schedule != null;
}
/**
* This method has been deprecated, please use method buildSink instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination getSink() {
return this.sink!=null ?this.sink.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination buildSink() {
return this.sink!=null ?this.sink.build():null;
}
public A withSink(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination sink) {
_visitables.get("sink").remove(this.sink);
if (sink!=null){ this.sink= new DestinationBuilder(sink); _visitables.get("sink").add(this.sink);} return (A) this;
}
public java.lang.Boolean hasSink() {
return this.sink != null;
}
public PingSourceSpecFluent.SinkNested withNewSink() {
return new PingSourceSpecFluentImpl.SinkNestedImpl();
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested withNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return new io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl.SinkNestedImpl(item);
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editSink() {
return withNewSinkLike(getSink());
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editOrNewSink() {
return withNewSinkLike(getSink() != null ? getSink(): new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder().build());
}
public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editOrNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return withNewSinkLike(getSink() != null ? getSink(): item);
}
public java.lang.String getTimezone() {
return this.timezone;
}
public A withTimezone(java.lang.String timezone) {
this.timezone=timezone; return (A) this;
}
public java.lang.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 java.lang.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 io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested,Nested{
CeOverridesNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this, item);
}
CeOverridesNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this);
}
io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder builder;
public N and() {
return (N) PingSourceSpecFluentImpl.this.withCeOverrides(builder.build());
}
public N endCeOverrides() {
return and();
}
}
class SinkNestedImpl extends DestinationFluentImpl> implements io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested,io.fabric8.kubernetes.api.builder.Nested{
SinkNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this, item);
}
SinkNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this);
}
io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder builder;
public N and() {
return (N) PingSourceSpecFluentImpl.this.withSink(builder.build());
}
public N endSink() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy