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

io.github.ninobomba.json.schema.Schema Maven / Gradle / Ivy

The newest version!

package io.github.ninobomba.json.schema;

import java.util.LinkedHashMap;
import java.util.Map;
import javax.annotation.processing.Generated;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;


/**
 * Product
 * 

* A product from Acme's catalog * */ @JsonInclude(JsonInclude.Include.NON_NULL) @JsonPropertyOrder({ "id", "name", "price" }) @Generated("jsonschema2pojo") public class Schema { /** * The unique identifier for a product * (Required) * */ @JsonProperty("id") @JsonPropertyDescription("The unique identifier for a product") private Integer id; /** * Name of the product * (Required) * */ @JsonProperty("name") @JsonPropertyDescription("Name of the product") private String name; /** * * (Required) * */ @JsonProperty("price") private Double price; @JsonIgnore private Map additionalProperties = new LinkedHashMap(); /** * The unique identifier for a product * (Required) * */ @JsonProperty("id") public Integer getId() { return id; } /** * The unique identifier for a product * (Required) * */ @JsonProperty("id") public void setId(Integer id) { this.id = id; } /** * Name of the product * (Required) * */ @JsonProperty("name") public String getName() { return name; } /** * Name of the product * (Required) * */ @JsonProperty("name") public void setName(String name) { this.name = name; } /** * * (Required) * */ @JsonProperty("price") public Double getPrice() { return price; } /** * * (Required) * */ @JsonProperty("price") public void setPrice(Double price) { this.price = price; } @JsonAnyGetter public Map getAdditionalProperties() { return this.additionalProperties; } @JsonAnySetter public void setAdditionalProperty(String name, Object value) { this.additionalProperties.put(name, value); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(Schema.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('['); sb.append("id"); sb.append('='); sb.append(((this.id == null)?"":this.id)); sb.append(','); sb.append("name"); sb.append('='); sb.append(((this.name == null)?"":this.name)); sb.append(','); sb.append("price"); sb.append('='); sb.append(((this.price == null)?"":this.price)); sb.append(','); sb.append("additionalProperties"); sb.append('='); sb.append(((this.additionalProperties == null)?"":this.additionalProperties)); sb.append(','); if (sb.charAt((sb.length()- 1)) == ',') { sb.setCharAt((sb.length()- 1), ']'); } else { sb.append(']'); } return sb.toString(); } @Override public int hashCode() { int result = 1; result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode())); result = ((result* 31)+((this.id == null)? 0 :this.id.hashCode())); result = ((result* 31)+((this.additionalProperties == null)? 0 :this.additionalProperties.hashCode())); result = ((result* 31)+((this.price == null)? 0 :this.price.hashCode())); return result; } @Override public boolean equals(Object other) { if (other == this) { return true; } if ((other instanceof Schema) == false) { return false; } Schema rhs = ((Schema) other); return (((((this.name == rhs.name)||((this.name!= null)&&this.name.equals(rhs.name)))&&((this.id == rhs.id)||((this.id!= null)&&this.id.equals(rhs.id))))&&((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties))))&&((this.price == rhs.price)||((this.price!= null)&&this.price.equals(rhs.price)))); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy