io.gravitee.rest.api.service.swagger.converter.extension.Property Maven / Gradle / Ivy
package io.gravitee.rest.api.service.swagger.converter.extension;
import java.util.HashMap;
import java.util.Map;
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;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"key",
"value"
})
public class Property {
/**
* The key of the property.
*
*/
@JsonProperty("key")
@JsonPropertyDescription("The key of the property.")
private String key;
/**
* The value of the property.
*
*/
@JsonProperty("value")
@JsonPropertyDescription("The value of the property.")
private String value;
@JsonIgnore
private Map additionalProperties = new HashMap();
/**
* The key of the property.
*
*/
@JsonProperty("key")
public String getKey() {
return key;
}
/**
* The key of the property.
*
*/
@JsonProperty("key")
public void setKey(String key) {
this.key = key;
}
/**
* The value of the property.
*
*/
@JsonProperty("value")
public String getValue() {
return value;
}
/**
* The value of the property.
*
*/
@JsonProperty("value")
public void setValue(String value) {
this.value = value;
}
@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(Property.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("key");
sb.append('=');
sb.append(((this.key == null)?"":this.key));
sb.append(',');
sb.append("value");
sb.append('=');
sb.append(((this.value == null)?"":this.value));
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.additionalProperties == null)? 0 :this.additionalProperties.hashCode()));
result = ((result* 31)+((this.value == null)? 0 :this.value.hashCode()));
result = ((result* 31)+((this.key == null)? 0 :this.key.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Property) == false) {
return false;
}
Property rhs = ((Property) other);
return ((((this.additionalProperties == rhs.additionalProperties)||((this.additionalProperties!= null)&&this.additionalProperties.equals(rhs.additionalProperties)))&&((this.value == rhs.value)||((this.value!= null)&&this.value.equals(rhs.value))))&&((this.key == rhs.key)||((this.key!= null)&&this.key.equals(rhs.key))));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy