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

io.fabric8.kubernetes.api.model.extensions.IngressTLSFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model.extensions;

import java.util.ArrayList;
import java.lang.String;
import java.util.LinkedHashMap;
import java.util.function.Predicate;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.util.Collection;
import java.lang.Object;
import java.util.List;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class IngressTLSFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.extensions.IngressTLSFluent{
  public IngressTLSFluentImpl() {
  }
  public IngressTLSFluentImpl(io.fabric8.kubernetes.api.model.extensions.IngressTLS instance) {
    this.withHosts(instance.getHosts()); 
    this.withSecretName(instance.getSecretName()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.util.List hosts = new java.util.ArrayList();
  private java.lang.String secretName;
  private java.util.Map additionalProperties;
  public A addToHosts(java.lang.Integer index,java.lang.String item) {
    if (this.hosts == null) {this.hosts = new java.util.ArrayList();}
    this.hosts.add(index, item);
    return (A)this;
  }
  public A setToHosts(java.lang.Integer index,java.lang.String item) {
    if (this.hosts == null) {this.hosts = new java.util.ArrayList();}
    this.hosts.set(index, item); return (A)this;
  }
  public A addToHosts(java.lang.String... items) {
    if (this.hosts == null) {this.hosts = new java.util.ArrayList();}
    for (java.lang.String item : items) {this.hosts.add(item);} return (A)this;
  }
  public A addAllToHosts(java.util.Collection items) {
    if (this.hosts == null) {this.hosts = new java.util.ArrayList();}
    for (java.lang.String item : items) {this.hosts.add(item);} return (A)this;
  }
  public A removeFromHosts(java.lang.String... items) {
    for (java.lang.String item : items) {if (this.hosts!= null){ this.hosts.remove(item);}} return (A)this;
  }
  public A removeAllFromHosts(java.util.Collection items) {
    for (java.lang.String item : items) {if (this.hosts!= null){ this.hosts.remove(item);}} return (A)this;
  }
  public java.util.List getHosts() {
    return this.hosts;
  }
  public java.lang.String getHost(java.lang.Integer index) {
    return this.hosts.get(index);
  }
  public java.lang.String getFirstHost() {
    return this.hosts.get(0);
  }
  public java.lang.String getLastHost() {
    return this.hosts.get(hosts.size() - 1);
  }
  public java.lang.String getMatchingHost(java.util.function.Predicate predicate) {
    for (java.lang.String item: hosts) { if(predicate.test(item)){ return item;} } return null;
  }
  public java.lang.Boolean hasMatchingHost(java.util.function.Predicate predicate) {
    for (java.lang.String item: hosts) { if(predicate.test(item)){ return true;} } return false;
  }
  public A withHosts(java.util.List hosts) {
    if (hosts != null) {this.hosts = new java.util.ArrayList(); for (java.lang.String item : hosts){this.addToHosts(item);}} else { this.hosts = null;} return (A) this;
  }
  public A withHosts(java.lang.String... hosts) {
    if (this.hosts != null) {this.hosts.clear();}
    if (hosts != null) {for (java.lang.String item :hosts){ this.addToHosts(item);}} return (A) this;
  }
  public java.lang.Boolean hasHosts() {
    return hosts != null && !hosts.isEmpty();
  }
  public A addNewHost(java.lang.String arg0) {
    return (A)addToHosts(new String(arg0));
  }
  public java.lang.String getSecretName() {
    return this.secretName;
  }
  public A withSecretName(java.lang.String secretName) {
    this.secretName=secretName; return (A) this;
  }
  public java.lang.Boolean hasSecretName() {
    return this.secretName != null;
  }
  
  /**
   * Method is deprecated. use withSecretName instead.
   */
  @java.lang.Deprecated
  public A withNewSecretName(java.lang.String arg0) {
    return (A)withSecretName(new String(arg0));
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    IngressTLSFluentImpl that = (IngressTLSFluentImpl) o;
    if (hosts != null ? !hosts.equals(that.hosts) :that.hosts != null) return false;
    if (secretName != null ? !secretName.equals(that.secretName) :that.secretName != null) return false;
    if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(hosts,  secretName,  additionalProperties,  super.hashCode());
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy