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

io.fabric8.kubernetes.api.model.APIServiceSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Integer;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

 /**
  * Generated
  */
public class APIServiceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.APIServiceSpecFluent{
  public APIServiceSpecFluentImpl() {
  }
  public APIServiceSpecFluentImpl(io.fabric8.kubernetes.api.model.APIServiceSpec instance) {
    this.withCaBundle(instance.getCaBundle()); 
    this.withGroup(instance.getGroup()); 
    this.withGroupPriorityMinimum(instance.getGroupPriorityMinimum()); 
    this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify()); 
    this.withService(instance.getService()); 
    this.withVersion(instance.getVersion()); 
    this.withVersionPriority(instance.getVersionPriority()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.String caBundle;
  private java.lang.String group;
  private java.lang.Integer groupPriorityMinimum;
  private java.lang.Boolean insecureSkipTLSVerify;
  private io.fabric8.kubernetes.api.model.ServiceReferenceBuilder service;
  private java.lang.String version;
  private java.lang.Integer versionPriority;
  private java.util.Map additionalProperties;
  public java.lang.String getCaBundle() {
    return this.caBundle;
  }
  public A withCaBundle(java.lang.String caBundle) {
    this.caBundle=caBundle; return (A) this;
  }
  public java.lang.Boolean hasCaBundle() {
    return this.caBundle != null;
  }
  
  /**
   * Method is deprecated. use withCaBundle instead.
   */
  @java.lang.Deprecated
  public A withNewCaBundle(java.lang.String arg0) {
    return (A)withCaBundle(new String(arg0));
  }
  public java.lang.String getGroup() {
    return this.group;
  }
  public A withGroup(java.lang.String group) {
    this.group=group; return (A) this;
  }
  public java.lang.Boolean hasGroup() {
    return this.group != null;
  }
  
  /**
   * Method is deprecated. use withGroup instead.
   */
  @java.lang.Deprecated
  public A withNewGroup(java.lang.String arg0) {
    return (A)withGroup(new String(arg0));
  }
  public java.lang.Integer getGroupPriorityMinimum() {
    return this.groupPriorityMinimum;
  }
  public A withGroupPriorityMinimum(java.lang.Integer groupPriorityMinimum) {
    this.groupPriorityMinimum=groupPriorityMinimum; return (A) this;
  }
  public java.lang.Boolean hasGroupPriorityMinimum() {
    return this.groupPriorityMinimum != null;
  }
  public java.lang.Boolean getInsecureSkipTLSVerify() {
    return this.insecureSkipTLSVerify;
  }
  public A withInsecureSkipTLSVerify(java.lang.Boolean insecureSkipTLSVerify) {
    this.insecureSkipTLSVerify=insecureSkipTLSVerify; return (A) this;
  }
  public java.lang.Boolean hasInsecureSkipTLSVerify() {
    return this.insecureSkipTLSVerify != null;
  }
  
  /**
   * This method has been deprecated, please use method buildService instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ServiceReference getService() {
    return this.service!=null?this.service.build():null;
  }
  public io.fabric8.kubernetes.api.model.ServiceReference buildService() {
    return this.service!=null?this.service.build():null;
  }
  public A withService(io.fabric8.kubernetes.api.model.ServiceReference service) {
    _visitables.get("service").remove(this.service);
    if (service!=null){ this.service= new io.fabric8.kubernetes.api.model.ServiceReferenceBuilder(service); _visitables.get("service").add(this.service);} return (A) this;
  }
  public java.lang.Boolean hasService() {
    return this.service != null;
  }
  public A withNewService(java.lang.String name,java.lang.String namespace,java.lang.Integer port) {
    return (A)withService(new ServiceReference(name, namespace, port));
  }
  public io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested withNewService() {
    return new io.fabric8.kubernetes.api.model.APIServiceSpecFluentImpl.ServiceNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested withNewServiceLike(io.fabric8.kubernetes.api.model.ServiceReference item) {
    return new io.fabric8.kubernetes.api.model.APIServiceSpecFluentImpl.ServiceNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested editService() {
    return withNewServiceLike(getService());
  }
  public io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested editOrNewService() {
    return withNewServiceLike(getService() != null ? getService(): new io.fabric8.kubernetes.api.model.ServiceReferenceBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested editOrNewServiceLike(io.fabric8.kubernetes.api.model.ServiceReference item) {
    return withNewServiceLike(getService() != null ? getService(): item);
  }
  public java.lang.String getVersion() {
    return this.version;
  }
  public A withVersion(java.lang.String version) {
    this.version=version; return (A) this;
  }
  public java.lang.Boolean hasVersion() {
    return this.version != null;
  }
  
  /**
   * Method is deprecated. use withVersion instead.
   */
  @java.lang.Deprecated
  public A withNewVersion(java.lang.String arg0) {
    return (A)withVersion(new String(arg0));
  }
  public java.lang.Integer getVersionPriority() {
    return this.versionPriority;
  }
  public A withVersionPriority(java.lang.Integer versionPriority) {
    this.versionPriority=versionPriority; return (A) this;
  }
  public java.lang.Boolean hasVersionPriority() {
    return this.versionPriority != null;
  }
  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;
    APIServiceSpecFluentImpl that = (APIServiceSpecFluentImpl) o;
    if (caBundle != null ? !caBundle.equals(that.caBundle) :that.caBundle != null) return false;
    if (group != null ? !group.equals(that.group) :that.group != null) return false;
    if (groupPriorityMinimum != null ? !groupPriorityMinimum.equals(that.groupPriorityMinimum) :that.groupPriorityMinimum != null) return false;
    if (insecureSkipTLSVerify != null ? !insecureSkipTLSVerify.equals(that.insecureSkipTLSVerify) :that.insecureSkipTLSVerify != null) return false;
    if (service != null ? !service.equals(that.service) :that.service != null) return false;
    if (version != null ? !version.equals(that.version) :that.version != null) return false;
    if (versionPriority != null ? !versionPriority.equals(that.versionPriority) :that.versionPriority != 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(caBundle,  group,  groupPriorityMinimum,  insecureSkipTLSVerify,  service,  version,  versionPriority,  additionalProperties,  super.hashCode());
  }
  public class ServiceNestedImpl extends io.fabric8.kubernetes.api.model.ServiceReferenceFluentImpl> implements io.fabric8.kubernetes.api.model.APIServiceSpecFluent.ServiceNested,io.fabric8.kubernetes.api.builder.Nested{
    ServiceNestedImpl(io.fabric8.kubernetes.api.model.ServiceReference item) {
      this.builder = new io.fabric8.kubernetes.api.model.ServiceReferenceBuilder(this, item);
    }
    ServiceNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ServiceReferenceBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ServiceReferenceBuilder builder;
    public N and() {
      return (N) APIServiceSpecFluentImpl.this.withService(builder.build());
    }
    public N endService() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy