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

io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluentImpl Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model.apiextensions.v1beta1;

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 WebhookClientConfigFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent{
  public WebhookClientConfigFluentImpl() {
  }
  public WebhookClientConfigFluentImpl(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfig instance) {
    this.withCaBundle(instance.getCaBundle()); 
    this.withService(instance.getService()); 
    this.withUrl(instance.getUrl()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.String caBundle;
  private io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceBuilder service;
  private java.lang.String url;
  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));
  }
  
  /**
   * This method has been deprecated, please use method buildService instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference getService() {
    return this.service!=null?this.service.build():null;
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference buildService() {
    return this.service!=null?this.service.build():null;
  }
  public A withService(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference service) {
    _visitables.get("service").remove(this.service);
    if (service!=null){ this.service= new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.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.String path,java.lang.Integer port) {
    return (A)withService(new ServiceReference(name, namespace, path, port));
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested withNewService() {
    return new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluentImpl.ServiceNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested withNewServiceLike(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference item) {
    return new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluentImpl.ServiceNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested editService() {
    return withNewServiceLike(getService());
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested editOrNewService() {
    return withNewServiceLike(getService() != null ? getService(): new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested editOrNewServiceLike(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference item) {
    return withNewServiceLike(getService() != null ? getService(): item);
  }
  public java.lang.String getUrl() {
    return this.url;
  }
  public A withUrl(java.lang.String url) {
    this.url=url; return (A) this;
  }
  public java.lang.Boolean hasUrl() {
    return this.url != null;
  }
  
  /**
   * Method is deprecated. use withUrl instead.
   */
  @java.lang.Deprecated
  public A withNewUrl(java.lang.String arg0) {
    return (A)withUrl(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;
    WebhookClientConfigFluentImpl that = (WebhookClientConfigFluentImpl) o;
    if (caBundle != null ? !caBundle.equals(that.caBundle) :that.caBundle != null) return false;
    if (service != null ? !service.equals(that.service) :that.service != null) return false;
    if (url != null ? !url.equals(that.url) :that.url != 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,  service,  url,  additionalProperties,  super.hashCode());
  }
  public class ServiceNestedImpl extends io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceFluentImpl> implements io.fabric8.kubernetes.api.model.apiextensions.v1beta1.WebhookClientConfigFluent.ServiceNested,io.fabric8.kubernetes.api.builder.Nested{
    ServiceNestedImpl(io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReference item) {
      this.builder = new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceBuilder(this, item);
    }
    ServiceNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceBuilder(this);
    }
    io.fabric8.kubernetes.api.model.apiextensions.v1beta1.ServiceReferenceBuilder builder;
    public N and() {
      return (N) WebhookClientConfigFluentImpl.this.withService(builder.build());
    }
    public N endService() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy