io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.eventing.contrib.couchdb.v1alpha1;
import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
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.kubernetes.api.model.ObjectReference;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;
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;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class CouchDbSourceSpecFluentImpl> extends BaseFluent implements CouchDbSourceSpecFluent{
public CouchDbSourceSpecFluentImpl() {
}
public CouchDbSourceSpecFluentImpl(io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpec instance) {
this.withCredentials(instance.getCredentials());
this.withDatabase(instance.getDatabase());
this.withFeed(instance.getFeed());
this.withServiceAccountName(instance.getServiceAccountName());
this.withSink(instance.getSink());
}
private ObjectReferenceBuilder credentials;
private String database;
private java.lang.String feed;
private java.lang.String serviceAccountName;
private DestinationBuilder sink;
/**
* This method has been deprecated, please use method buildCredentials instead.
* @return The buildable object.
*/
@Deprecated
public io.fabric8.kubernetes.api.model.ObjectReference getCredentials() {
return this.credentials!=null ?this.credentials.build():null;
}
public io.fabric8.kubernetes.api.model.ObjectReference buildCredentials() {
return this.credentials!=null ?this.credentials.build():null;
}
public A withCredentials(io.fabric8.kubernetes.api.model.ObjectReference credentials) {
_visitables.get("credentials").remove(this.credentials);
if (credentials!=null){ this.credentials= new ObjectReferenceBuilder(credentials); _visitables.get("credentials").add(this.credentials);} return (A) this;
}
public Boolean hasCredentials() {
return this.credentials != null;
}
public CouchDbSourceSpecFluent.CredentialsNested withNewCredentials() {
return new CouchDbSourceSpecFluentImpl.CredentialsNestedImpl();
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested withNewCredentialsLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
return new CouchDbSourceSpecFluentImpl.CredentialsNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested editCredentials() {
return withNewCredentialsLike(getCredentials());
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested editOrNewCredentials() {
return withNewCredentialsLike(getCredentials() != null ? getCredentials(): new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder().build());
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested editOrNewCredentialsLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
return withNewCredentialsLike(getCredentials() != null ? getCredentials(): item);
}
public java.lang.String getDatabase() {
return this.database;
}
public A withDatabase(java.lang.String database) {
this.database=database; return (A) this;
}
public java.lang.Boolean hasDatabase() {
return this.database != null;
}
public java.lang.String getFeed() {
return this.feed;
}
public A withFeed(java.lang.String feed) {
this.feed=feed; return (A) this;
}
public java.lang.Boolean hasFeed() {
return this.feed != null;
}
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;
}
/**
* 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 CouchDbSourceSpecFluent.SinkNested withNewSink() {
return new CouchDbSourceSpecFluentImpl.SinkNestedImpl();
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.SinkNested withNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return new io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluentImpl.SinkNestedImpl(item);
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.SinkNested editSink() {
return withNewSinkLike(getSink());
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.SinkNested editOrNewSink() {
return withNewSinkLike(getSink() != null ? getSink(): new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder().build());
}
public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.SinkNested editOrNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
return withNewSinkLike(getSink() != null ? getSink(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
CouchDbSourceSpecFluentImpl that = (CouchDbSourceSpecFluentImpl) o;
if (credentials != null ? !credentials.equals(that.credentials) :that.credentials != null) return false;
if (database != null ? !database.equals(that.database) :that.database != null) return false;
if (feed != null ? !feed.equals(that.feed) :that.feed != 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;
return true;
}
public int hashCode() {
return java.util.Objects.hash(credentials, database, feed, serviceAccountName, sink, super.hashCode());
}
public java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (credentials != null) { sb.append("credentials:"); sb.append(credentials + ","); }
if (database != null) { sb.append("database:"); sb.append(database + ","); }
if (feed != null) { sb.append("feed:"); sb.append(feed + ","); }
if (serviceAccountName != null) { sb.append("serviceAccountName:"); sb.append(serviceAccountName + ","); }
if (sink != null) { sb.append("sink:"); sb.append(sink); }
sb.append("}");
return sb.toString();
}
class CredentialsNestedImpl extends ObjectReferenceFluentImpl> implements io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested,Nested{
CredentialsNestedImpl(io.fabric8.kubernetes.api.model.ObjectReference item) {
this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this, item);
}
CredentialsNestedImpl() {
this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this);
}
io.fabric8.kubernetes.api.model.ObjectReferenceBuilder builder;
public N and() {
return (N) CouchDbSourceSpecFluentImpl.this.withCredentials(builder.build());
}
public N endCredentials() {
return and();
}
}
class SinkNestedImpl extends DestinationFluentImpl> implements io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.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) CouchDbSourceSpecFluentImpl.this.withSink(builder.build());
}
public N endSink() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy