annotations.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 com.fasterxml.jackson.annotation.JsonProperty;
import java.lang.StringBuilder;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.StringBuffer;
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 PrometheusSourceSpecFluent {
private String authTokenFile;
private String caCertConfigMap;
private String promQL;
private String schedule;
private String serverURL;
private String serviceAccountName;
private DestinationBuilder sink;
private String step;
public PrometheusSourceSpecFluentImpl() {
}
public PrometheusSourceSpecFluentImpl(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 String getAuthTokenFile() {
return this.authTokenFile;
}
public A withAuthTokenFile(String authTokenFile) {
this.authTokenFile=authTokenFile; return (A) this;
}
public Boolean hasAuthTokenFile() {
return this.authTokenFile != null;
}
public A withNewAuthTokenFile(String arg1) {
return (A)withAuthTokenFile(new String(arg1));
}
public A withNewAuthTokenFile(StringBuilder arg1) {
return (A)withAuthTokenFile(new String(arg1));
}
public A withNewAuthTokenFile(StringBuffer arg1) {
return (A)withAuthTokenFile(new String(arg1));
}
public String getCaCertConfigMap() {
return this.caCertConfigMap;
}
public A withCaCertConfigMap(String caCertConfigMap) {
this.caCertConfigMap=caCertConfigMap; return (A) this;
}
public Boolean hasCaCertConfigMap() {
return this.caCertConfigMap != null;
}
public A withNewCaCertConfigMap(String arg1) {
return (A)withCaCertConfigMap(new String(arg1));
}
public A withNewCaCertConfigMap(StringBuilder arg1) {
return (A)withCaCertConfigMap(new String(arg1));
}
public A withNewCaCertConfigMap(StringBuffer arg1) {
return (A)withCaCertConfigMap(new String(arg1));
}
public String getPromQL() {
return this.promQL;
}
public A withPromQL(String promQL) {
this.promQL=promQL; return (A) this;
}
public Boolean hasPromQL() {
return this.promQL != null;
}
public A withNewPromQL(String arg1) {
return (A)withPromQL(new String(arg1));
}
public A withNewPromQL(StringBuilder arg1) {
return (A)withPromQL(new String(arg1));
}
public A withNewPromQL(StringBuffer arg1) {
return (A)withPromQL(new String(arg1));
}
public String getSchedule() {
return this.schedule;
}
public A withSchedule(String schedule) {
this.schedule=schedule; return (A) this;
}
public Boolean hasSchedule() {
return this.schedule != null;
}
public A withNewSchedule(String arg1) {
return (A)withSchedule(new String(arg1));
}
public A withNewSchedule(StringBuilder arg1) {
return (A)withSchedule(new String(arg1));
}
public A withNewSchedule(StringBuffer arg1) {
return (A)withSchedule(new String(arg1));
}
public String getServerURL() {
return this.serverURL;
}
public A withServerURL(String serverURL) {
this.serverURL=serverURL; return (A) this;
}
public Boolean hasServerURL() {
return this.serverURL != null;
}
public A withNewServerURL(String arg1) {
return (A)withServerURL(new String(arg1));
}
public A withNewServerURL(StringBuilder arg1) {
return (A)withServerURL(new String(arg1));
}
public A withNewServerURL(StringBuffer arg1) {
return (A)withServerURL(new String(arg1));
}
public String getServiceAccountName() {
return this.serviceAccountName;
}
public A withServiceAccountName(String serviceAccountName) {
this.serviceAccountName=serviceAccountName; return (A) this;
}
public Boolean hasServiceAccountName() {
return this.serviceAccountName != null;
}
public A withNewServiceAccountName(String arg1) {
return (A)withServiceAccountName(new String(arg1));
}
public A withNewServiceAccountName(StringBuilder arg1) {
return (A)withServiceAccountName(new String(arg1));
}
public A withNewServiceAccountName(StringBuffer arg1) {
return (A)withServiceAccountName(new String(arg1));
}
/**
* 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);} return (A) this;
}
public Boolean hasSink() {
return this.sink != null;
}
public PrometheusSourceSpecFluent.SinkNested withNewSink() {
return new SinkNestedImpl();
}
public PrometheusSourceSpecFluent.SinkNested withNewSinkLike(Destination item) {
return new SinkNestedImpl(item);
}
public PrometheusSourceSpecFluent.SinkNested editSink() {
return withNewSinkLike(getSink());
}
public PrometheusSourceSpecFluent.SinkNested editOrNewSink() {
return withNewSinkLike(getSink() != null ? getSink(): new DestinationBuilder().build());
}
public PrometheusSourceSpecFluent.SinkNested editOrNewSinkLike(Destination item) {
return withNewSinkLike(getSink() != null ? getSink(): item);
}
public String getStep() {
return this.step;
}
public A withStep(String step) {
this.step=step; return (A) this;
}
public Boolean hasStep() {
return this.step != null;
}
public A withNewStep(String arg1) {
return (A)withStep(new String(arg1));
}
public A withNewStep(StringBuilder arg1) {
return (A)withStep(new String(arg1));
}
public A withNewStep(StringBuffer arg1) {
return (A)withStep(new String(arg1));
}
public boolean equals(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 DestinationFluentImpl> implements PrometheusSourceSpecFluent.SinkNested,io.fabric8.kubernetes.api.builder.Nested {
private final DestinationBuilder builder;
SinkNestedImpl(Destination item) {
this.builder = new DestinationBuilder(this, item);
}
SinkNestedImpl() {
this.builder = new DestinationBuilder(this);
}
public N and() {
return (N) PrometheusSourceSpecFluentImpl.this.withSink(builder.build());
}
public N endSink() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy