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

annotations.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 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
  */
public class CouchDbSourceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.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 io.fabric8.kubernetes.api.model.ObjectReferenceBuilder credentials;
  private java.lang.String database;
  private java.lang.String feed;
  private java.lang.String serviceAccountName;
  private io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder sink;
  
  /**
   * This method has been deprecated, please use method buildCredentials instead.
   * @return The buildable object.
   */
  @java.lang.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 io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(credentials); _visitables.get("credentials").add(this.credentials);} return (A) this;
  }
  public java.lang.Boolean hasCredentials() {
    return this.credentials != null;
  }
  public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested withNewCredentials() {
    return new io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluentImpl.CredentialsNestedImpl();
  }
  public io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested withNewCredentialsLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
    return new io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.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;
  }
  
  /**
   * Method is deprecated. use withDatabase instead.
   */
  @java.lang.Deprecated
  public A withNewDatabase(java.lang.String arg0) {
    return (A)withDatabase(new String(arg0));
  }
  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;
  }
  
  /**
   * Method is deprecated. use withFeed instead.
   */
  @java.lang.Deprecated
  public A withNewFeed(java.lang.String arg0) {
    return (A)withFeed(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;
  }
  
  /**
   * Method is deprecated. use withServiceAccountName instead.
   */
  @java.lang.Deprecated
  public A withNewServiceAccountName(java.lang.String arg0) {
    return (A)withServiceAccountName(new String(arg0));
  }
  
  /**
   * 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 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.couchdb.v1alpha1.CouchDbSourceSpecFluent.SinkNested withNewSink() {
    return new io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.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(java.lang.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 class CredentialsNestedImpl extends io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl> implements io.fabric8.knative.eventing.contrib.couchdb.v1alpha1.CouchDbSourceSpecFluent.CredentialsNested,io.fabric8.kubernetes.api.builder.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();
    }
    
  }
  public class SinkNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.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