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

io.fabric8.knative.serving.v1beta1.DomainMappingSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.serving.v1beta1;

import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReference;
import java.lang.Deprecated;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceFluentImpl;

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class DomainMappingSpecFluentImpl> extends BaseFluent implements DomainMappingSpecFluent{
  public DomainMappingSpecFluentImpl() {
  }
  public DomainMappingSpecFluentImpl(DomainMappingSpec instance) {
    this.withRef(instance.getRef()); 
    this.withTls(instance.getTls()); 
  }
  private KReferenceBuilder ref;
  private SecretTLSBuilder tls;
  
  /**
   * This method has been deprecated, please use method buildRef instead.
   * @return The buildable object.
   */
  @Deprecated
  public KReference getRef() {
    return this.ref!=null ?this.ref.build():null;
  }
  public KReference buildRef() {
    return this.ref!=null ?this.ref.build():null;
  }
  public A withRef(KReference ref) {
    _visitables.get("ref").remove(this.ref);
    if (ref!=null){ this.ref= new KReferenceBuilder(ref); _visitables.get("ref").add(this.ref);} else { this.ref = null; _visitables.get("ref").remove(this.ref); } return (A) this;
  }
  public Boolean hasRef() {
    return this.ref != null;
  }
  public A withNewRef(String apiVersion,String group,String kind,String name,String namespace) {
    return (A)withRef(new KReference(apiVersion, group, kind, name, namespace));
  }
  public DomainMappingSpecFluent.RefNested withNewRef() {
    return new DomainMappingSpecFluentImpl.RefNestedImpl();
  }
  public DomainMappingSpecFluent.RefNested withNewRefLike(KReference item) {
    return new DomainMappingSpecFluentImpl.RefNestedImpl(item);
  }
  public DomainMappingSpecFluent.RefNested editRef() {
    return withNewRefLike(getRef());
  }
  public DomainMappingSpecFluent.RefNested editOrNewRef() {
    return withNewRefLike(getRef() != null ? getRef(): new KReferenceBuilder().build());
  }
  public DomainMappingSpecFluent.RefNested editOrNewRefLike(KReference item) {
    return withNewRefLike(getRef() != null ? getRef(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildTls instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretTLS getTls() {
    return this.tls!=null ?this.tls.build():null;
  }
  public SecretTLS buildTls() {
    return this.tls!=null ?this.tls.build():null;
  }
  public A withTls(SecretTLS tls) {
    _visitables.get("tls").remove(this.tls);
    if (tls!=null){ this.tls= new SecretTLSBuilder(tls); _visitables.get("tls").add(this.tls);} else { this.tls = null; _visitables.get("tls").remove(this.tls); } return (A) this;
  }
  public Boolean hasTls() {
    return this.tls != null;
  }
  public A withNewTls(String secretName) {
    return (A)withTls(new SecretTLS(secretName));
  }
  public DomainMappingSpecFluent.TlsNested withNewTls() {
    return new DomainMappingSpecFluentImpl.TlsNestedImpl();
  }
  public DomainMappingSpecFluent.TlsNested withNewTlsLike(SecretTLS item) {
    return new DomainMappingSpecFluentImpl.TlsNestedImpl(item);
  }
  public DomainMappingSpecFluent.TlsNested editTls() {
    return withNewTlsLike(getTls());
  }
  public DomainMappingSpecFluent.TlsNested editOrNewTls() {
    return withNewTlsLike(getTls() != null ? getTls(): new SecretTLSBuilder().build());
  }
  public DomainMappingSpecFluent.TlsNested editOrNewTlsLike(SecretTLS item) {
    return withNewTlsLike(getTls() != null ? getTls(): item);
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    DomainMappingSpecFluentImpl that = (DomainMappingSpecFluentImpl) o;
    if (ref != null ? !ref.equals(that.ref) :that.ref != null) return false;
    if (tls != null ? !tls.equals(that.tls) :that.tls != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(ref,  tls,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (ref != null) { sb.append("ref:"); sb.append(ref + ","); }
    if (tls != null) { sb.append("tls:"); sb.append(tls); }
    sb.append("}");
    return sb.toString();
  }
  class RefNestedImpl extends KReferenceFluentImpl> implements DomainMappingSpecFluent.RefNested,Nested{
    RefNestedImpl(KReference item) {
      this.builder = new KReferenceBuilder(this, item);
    }
    RefNestedImpl() {
      this.builder = new KReferenceBuilder(this);
    }
    KReferenceBuilder builder;
    public N and() {
      return (N) DomainMappingSpecFluentImpl.this.withRef(builder.build());
    }
    public N endRef() {
      return and();
    }
    
  }
  class TlsNestedImpl extends SecretTLSFluentImpl> implements DomainMappingSpecFluent.TlsNested,Nested{
    TlsNestedImpl(SecretTLS item) {
      this.builder = new SecretTLSBuilder(this, item);
    }
    TlsNestedImpl() {
      this.builder = new SecretTLSBuilder(this);
    }
    SecretTLSBuilder builder;
    public N and() {
      return (N) DomainMappingSpecFluentImpl.this.withTls(builder.build());
    }
    public N endTls() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy