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

com.clinia.model.common.V1JsonSchema Maven / Gradle / Ivy

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost
// - read more on https://github.com/clinia/api-clients-generation. DO NOT EDIT.

package com.clinia.model.common;

import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.databind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;

/** V1JsonSchema */
public class V1JsonSchema {

  @JsonProperty("type")
  private V1JsonSchemaType type;

  @JsonProperty("$ref")
  private String $ref;

  @JsonProperty("pattern")
  private String pattern;

  @JsonProperty("properties")
  private Map properties;

  @JsonProperty("$defs")
  private Map $defs;

  @JsonProperty("items")
  private V1JsonSchema items;

  @JsonProperty("additionalProperties")
  private Boolean additionalProperties;

  @JsonProperty("anyOf")
  private List anyOf;

  @JsonProperty("allOf")
  private List allOf;

  @JsonProperty("required")
  private List required;

  @JsonProperty("minLength")
  private Integer minLength;

  @JsonProperty("maxLength")
  private Integer maxLength;

  @JsonProperty("maximum")
  private Integer maximum;

  @JsonProperty("minimum")
  private Integer minimum;

  @JsonProperty("minItems")
  private Integer minItems;

  @JsonProperty("maxItems")
  private Integer maxItems;

  @JsonProperty("if")
  private V1JsonSchema _if;

  @JsonProperty("then")
  private V1JsonSchema then;

  @JsonProperty("not")
  private V1JsonSchema not;

  @JsonProperty("const")
  private V1JsonSchemaConst _const;

  public V1JsonSchema setType(V1JsonSchemaType type) {
    this.type = type;
    return this;
  }

  /** Get type */
  @javax.annotation.Nullable
  public V1JsonSchemaType getType() {
    return type;
  }

  public V1JsonSchema set$Ref(String $ref) {
    this.$ref = $ref;
    return this;
  }

  /** Get $ref */
  @javax.annotation.Nullable
  public String get$Ref() {
    return $ref;
  }

  public V1JsonSchema setPattern(String pattern) {
    this.pattern = pattern;
    return this;
  }

  /** Get pattern */
  @javax.annotation.Nullable
  public String getPattern() {
    return pattern;
  }

  public V1JsonSchema setProperties(Map properties) {
    this.properties = properties;
    return this;
  }

  public V1JsonSchema putProperties(String key, V1JsonSchema propertiesItem) {
    if (this.properties == null) {
      this.properties = new HashMap<>();
    }
    this.properties.put(key, propertiesItem);
    return this;
  }

  /** Get properties */
  @javax.annotation.Nullable
  public Map getProperties() {
    return properties;
  }

  public V1JsonSchema set$Defs(Map $defs) {
    this.$defs = $defs;
    return this;
  }

  public V1JsonSchema put$Defs(String key, V1JsonSchema $defsItem) {
    if (this.$defs == null) {
      this.$defs = new HashMap<>();
    }
    this.$defs.put(key, $defsItem);
    return this;
  }

  /** Get $defs */
  @javax.annotation.Nullable
  public Map get$Defs() {
    return $defs;
  }

  public V1JsonSchema setItems(V1JsonSchema items) {
    this.items = items;
    return this;
  }

  /** Get items */
  @javax.annotation.Nullable
  public V1JsonSchema getItems() {
    return items;
  }

  public V1JsonSchema setAdditionalProperties(Boolean additionalProperties) {
    this.additionalProperties = additionalProperties;
    return this;
  }

  /** Get additionalProperties */
  @javax.annotation.Nullable
  public Boolean getAdditionalProperties() {
    return additionalProperties;
  }

  public V1JsonSchema setAnyOf(List anyOf) {
    this.anyOf = anyOf;
    return this;
  }

  public V1JsonSchema addAnyOf(V1JsonSchema anyOfItem) {
    if (this.anyOf == null) {
      this.anyOf = new ArrayList<>();
    }
    this.anyOf.add(anyOfItem);
    return this;
  }

  /** Get anyOf */
  @javax.annotation.Nullable
  public List getAnyOf() {
    return anyOf;
  }

  public V1JsonSchema setAllOf(List allOf) {
    this.allOf = allOf;
    return this;
  }

  public V1JsonSchema addAllOf(V1JsonSchema allOfItem) {
    if (this.allOf == null) {
      this.allOf = new ArrayList<>();
    }
    this.allOf.add(allOfItem);
    return this;
  }

  /** Get allOf */
  @javax.annotation.Nullable
  public List getAllOf() {
    return allOf;
  }

  public V1JsonSchema setRequired(List required) {
    this.required = required;
    return this;
  }

  public V1JsonSchema addRequired(String requiredItem) {
    if (this.required == null) {
      this.required = new ArrayList<>();
    }
    this.required.add(requiredItem);
    return this;
  }

  /** Get required */
  @javax.annotation.Nullable
  public List getRequired() {
    return required;
  }

  public V1JsonSchema setMinLength(Integer minLength) {
    this.minLength = minLength;
    return this;
  }

  /** Get minLength */
  @javax.annotation.Nullable
  public Integer getMinLength() {
    return minLength;
  }

  public V1JsonSchema setMaxLength(Integer maxLength) {
    this.maxLength = maxLength;
    return this;
  }

  /** Get maxLength */
  @javax.annotation.Nullable
  public Integer getMaxLength() {
    return maxLength;
  }

  public V1JsonSchema setMaximum(Integer maximum) {
    this.maximum = maximum;
    return this;
  }

  /** Get maximum */
  @javax.annotation.Nullable
  public Integer getMaximum() {
    return maximum;
  }

  public V1JsonSchema setMinimum(Integer minimum) {
    this.minimum = minimum;
    return this;
  }

  /** Get minimum */
  @javax.annotation.Nullable
  public Integer getMinimum() {
    return minimum;
  }

  public V1JsonSchema setMinItems(Integer minItems) {
    this.minItems = minItems;
    return this;
  }

  /** Get minItems */
  @javax.annotation.Nullable
  public Integer getMinItems() {
    return minItems;
  }

  public V1JsonSchema setMaxItems(Integer maxItems) {
    this.maxItems = maxItems;
    return this;
  }

  /** Get maxItems */
  @javax.annotation.Nullable
  public Integer getMaxItems() {
    return maxItems;
  }

  public V1JsonSchema setIf(V1JsonSchema _if) {
    this._if = _if;
    return this;
  }

  /** Get _if */
  @javax.annotation.Nullable
  public V1JsonSchema getIf() {
    return _if;
  }

  public V1JsonSchema setThen(V1JsonSchema then) {
    this.then = then;
    return this;
  }

  /** Get then */
  @javax.annotation.Nullable
  public V1JsonSchema getThen() {
    return then;
  }

  public V1JsonSchema setNot(V1JsonSchema not) {
    this.not = not;
    return this;
  }

  /** Get not */
  @javax.annotation.Nullable
  public V1JsonSchema getNot() {
    return not;
  }

  public V1JsonSchema setConst(V1JsonSchemaConst _const) {
    this._const = _const;
    return this;
  }

  /** Get _const */
  @javax.annotation.Nullable
  public V1JsonSchemaConst getConst() {
    return _const;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    V1JsonSchema v1JsonSchema = (V1JsonSchema) o;
    return (
      Objects.equals(this.type, v1JsonSchema.type) &&
      Objects.equals(this.$ref, v1JsonSchema.$ref) &&
      Objects.equals(this.pattern, v1JsonSchema.pattern) &&
      Objects.equals(this.properties, v1JsonSchema.properties) &&
      Objects.equals(this.$defs, v1JsonSchema.$defs) &&
      Objects.equals(this.items, v1JsonSchema.items) &&
      Objects.equals(this.additionalProperties, v1JsonSchema.additionalProperties) &&
      Objects.equals(this.anyOf, v1JsonSchema.anyOf) &&
      Objects.equals(this.allOf, v1JsonSchema.allOf) &&
      Objects.equals(this.required, v1JsonSchema.required) &&
      Objects.equals(this.minLength, v1JsonSchema.minLength) &&
      Objects.equals(this.maxLength, v1JsonSchema.maxLength) &&
      Objects.equals(this.maximum, v1JsonSchema.maximum) &&
      Objects.equals(this.minimum, v1JsonSchema.minimum) &&
      Objects.equals(this.minItems, v1JsonSchema.minItems) &&
      Objects.equals(this.maxItems, v1JsonSchema.maxItems) &&
      Objects.equals(this._if, v1JsonSchema._if) &&
      Objects.equals(this.then, v1JsonSchema.then) &&
      Objects.equals(this.not, v1JsonSchema.not) &&
      Objects.equals(this._const, v1JsonSchema._const)
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      type,
      $ref,
      pattern,
      properties,
      $defs,
      items,
      additionalProperties,
      anyOf,
      allOf,
      required,
      minLength,
      maxLength,
      maximum,
      minimum,
      minItems,
      maxItems,
      _if,
      then,
      not,
      _const
    );
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class V1JsonSchema {\n");
    sb.append("    type: ").append(toIndentedString(type)).append("\n");
    sb.append("    $ref: ").append(toIndentedString($ref)).append("\n");
    sb.append("    pattern: ").append(toIndentedString(pattern)).append("\n");
    sb.append("    properties: ").append(toIndentedString(properties)).append("\n");
    sb.append("    $defs: ").append(toIndentedString($defs)).append("\n");
    sb.append("    items: ").append(toIndentedString(items)).append("\n");
    sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
    sb.append("    anyOf: ").append(toIndentedString(anyOf)).append("\n");
    sb.append("    allOf: ").append(toIndentedString(allOf)).append("\n");
    sb.append("    required: ").append(toIndentedString(required)).append("\n");
    sb.append("    minLength: ").append(toIndentedString(minLength)).append("\n");
    sb.append("    maxLength: ").append(toIndentedString(maxLength)).append("\n");
    sb.append("    maximum: ").append(toIndentedString(maximum)).append("\n");
    sb.append("    minimum: ").append(toIndentedString(minimum)).append("\n");
    sb.append("    minItems: ").append(toIndentedString(minItems)).append("\n");
    sb.append("    maxItems: ").append(toIndentedString(maxItems)).append("\n");
    sb.append("    _if: ").append(toIndentedString(_if)).append("\n");
    sb.append("    then: ").append(toIndentedString(then)).append("\n");
    sb.append("    not: ").append(toIndentedString(not)).append("\n");
    sb.append("    _const: ").append(toIndentedString(_const)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy