io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.eventing.contrib.prometheus.v1alpha1;
import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
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 java.lang.Boolean;
public class PrometheusSourceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent {
private java.lang.String authTokenFile;
private java.lang.String caCertConfigMap;
private java.lang.String promQL;
private java.lang.String schedule;
private java.lang.String serverURL;
private java.lang.String serviceAccountName;
private io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder sink;
private java.lang.String step;
public PrometheusSourceSpecFluentImpl() {
}
public PrometheusSourceSpecFluentImpl(io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpec instance) {
this.withAuthTokenFile(instance.getAuthTokenFile());
this.withCaCertConfigMap(instance.getCaCertConfigMap());
this.withPromQL(instance.getPromQL());
this.withSchedule(instance.getSchedule());
this.withServerURL(instance.getServerURL());
this.withServiceAccountName(instance.getServiceAccountName());
this.withSink(instance.getSink());
this.withStep(instance.getStep());
}
public java.lang.String getAuthTokenFile() {
return this.authTokenFile;
}
public A withAuthTokenFile(java.lang.String authTokenFile) {
this.authTokenFile=authTokenFile; return (A) this;
}
public java.lang.Boolean hasAuthTokenFile() {
return this.authTokenFile != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withAuthTokenFile instead.
*/
public A withNewAuthTokenFile(java.lang.String arg0) {
return (A)withAuthTokenFile(new String(arg0));
}
public java.lang.String getCaCertConfigMap() {
return this.caCertConfigMap;
}
public A withCaCertConfigMap(java.lang.String caCertConfigMap) {
this.caCertConfigMap=caCertConfigMap; return (A) this;
}
public java.lang.Boolean hasCaCertConfigMap() {
return this.caCertConfigMap != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withCaCertConfigMap instead.
*/
public A withNewCaCertConfigMap(java.lang.String arg0) {
return (A)withCaCertConfigMap(new String(arg0));
}
public java.lang.String getPromQL() {
return this.promQL;
}
public A withPromQL(java.lang.String promQL) {
this.promQL=promQL; return (A) this;
}
public java.lang.Boolean hasPromQL() {
return this.promQL != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withPromQL instead.
*/
public A withNewPromQL(java.lang.String arg0) {
return (A)withPromQL(new String(arg0));
}
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;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withSchedule instead.
*/
public A withNewSchedule(java.lang.String arg0) {
return (A)withSchedule(new String(arg0));
}
public java.lang.String getServerURL() {
return this.serverURL;
}
public A withServerURL(java.lang.String serverURL) {
this.serverURL=serverURL; return (A) this;
}
public java.lang.Boolean hasServerURL() {
return this.serverURL != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withServerURL instead.
*/
public A withNewServerURL(java.lang.String arg0) {
return (A)withServerURL(new String(arg0));
}
public java.lang.String getServiceAccountName() {
return this.serviceAccountName;
}
public A withServiceAccountName(java.lang.String serviceAccountName) {
this.serviceAccountName=serviceAccountName; return (A) this;
}
public java.lang.Boolean hasServiceAccountName() {
return this.serviceAccountName != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withServiceAccountName instead.
*/
public A withNewServiceAccountName(java.lang.String arg0) {
return (A)withServiceAccountName(new String(arg0));
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildSink instead.
* @return The buildable object.
*/
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 io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(sink); _visitables.get("sink").add(this.sink);} return (A) this;
}
public java.lang.Boolean hasSink() {
return this.sink != null;
}
public io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested withNewSink() {
return new io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluentImpl.SinkNestedImpl();
}
public io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested withNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return new io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluentImpl.SinkNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested editSink() {
return withNewSinkLike(getSink());
}
public io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested editOrNewSink() {
return withNewSinkLike(getSink() != null ? getSink(): new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder().build());
}
public io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested editOrNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return withNewSinkLike(getSink() != null ? getSink(): item);
}
public java.lang.String getStep() {
return this.step;
}
public A withStep(java.lang.String step) {
this.step=step; return (A) this;
}
public java.lang.Boolean hasStep() {
return this.step != null;
}
@java.lang.Deprecated
/**
* Method is deprecated. use withStep instead.
*/
public A withNewStep(java.lang.String arg0) {
return (A)withStep(new String(arg0));
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PrometheusSourceSpecFluentImpl that = (PrometheusSourceSpecFluentImpl) o;
if (authTokenFile != null ? !authTokenFile.equals(that.authTokenFile) :that.authTokenFile != null) return false;
if (caCertConfigMap != null ? !caCertConfigMap.equals(that.caCertConfigMap) :that.caCertConfigMap != null) return false;
if (promQL != null ? !promQL.equals(that.promQL) :that.promQL != null) return false;
if (schedule != null ? !schedule.equals(that.schedule) :that.schedule != null) return false;
if (serverURL != null ? !serverURL.equals(that.serverURL) :that.serverURL != null) return false;
if (serviceAccountName != null ? !serviceAccountName.equals(that.serviceAccountName) :that.serviceAccountName != null) return false;
if (sink != null ? !sink.equals(that.sink) :that.sink != null) return false;
if (step != null ? !step.equals(that.step) :that.step != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(authTokenFile, caCertConfigMap, promQL, schedule, serverURL, serviceAccountName, sink, step, super.hashCode());
}
public class SinkNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl> implements io.fabric8.knative.eventing.contrib.prometheus.v1alpha1.PrometheusSourceSpecFluent.SinkNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder builder;
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);
}
public N and() {
return (N) PrometheusSourceSpecFluentImpl.this.withSink(builder.build());
}
public N endSink() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy