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

io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluentImpl Maven / Gradle / Ivy

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

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
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 JSONSchemaPropsOrBoolFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent{
  public JSONSchemaPropsOrBoolFluentImpl() {
  }
  public JSONSchemaPropsOrBoolFluentImpl(io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBool instance) {
    this.withAllows(instance.getAllows()); 
    this.withSchema(instance.getSchema()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private java.lang.Boolean allows;
  private io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder schema;
  private java.util.Map additionalProperties;
  public java.lang.Boolean getAllows() {
    return this.allows;
  }
  public A withAllows(java.lang.Boolean allows) {
    this.allows=allows; return (A) this;
  }
  public java.lang.Boolean hasAllows() {
    return this.allows != null;
  }
  
  /**
   * This method has been deprecated, please use method buildSchema instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps getSchema() {
    return this.schema!=null?this.schema.build():null;
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps buildSchema() {
    return this.schema!=null?this.schema.build():null;
  }
  public A withSchema(io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps schema) {
    _visitables.get("schema").remove(this.schema);
    if (schema!=null){ this.schema= new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder(schema); _visitables.get("schema").add(this.schema);} return (A) this;
  }
  public java.lang.Boolean hasSchema() {
    return this.schema != null;
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested withNewSchema() {
    return new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluentImpl.SchemaNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested withNewSchemaLike(io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps item) {
    return new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluentImpl.SchemaNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested editSchema() {
    return withNewSchemaLike(getSchema());
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested editOrNewSchema() {
    return withNewSchemaLike(getSchema() != null ? getSchema(): new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested editOrNewSchemaLike(io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps item) {
    return withNewSchemaLike(getSchema() != null ? getSchema(): item);
  }
  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;
    JSONSchemaPropsOrBoolFluentImpl that = (JSONSchemaPropsOrBoolFluentImpl) o;
    if (allows != null ? !allows.equals(that.allows) :that.allows != null) return false;
    if (schema != null ? !schema.equals(that.schema) :that.schema != 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(allows,  schema,  additionalProperties,  super.hashCode());
  }
  public class SchemaNestedImpl extends io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsFluentImpl> implements io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsOrBoolFluent.SchemaNested,io.fabric8.kubernetes.api.builder.Nested{
    SchemaNestedImpl(io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaProps item) {
      this.builder = new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder(this, item);
    }
    SchemaNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder(this);
    }
    io.fabric8.kubernetes.api.model.apiextensions.v1.JSONSchemaPropsBuilder builder;
    public N and() {
      return (N) JSONSchemaPropsOrBoolFluentImpl.this.withSchema(builder.build());
    }
    public N endSchema() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy