com.dell.cpsd.includes.Reference Maven / Gradle / Ivy
package com.dell.cpsd.includes;
import java.io.Serializable;
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.JsonPropertyOrder;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"href"
})
public class Reference implements Serializable
{
@JsonProperty("id")
private String id;
@JsonProperty("href")
private String href;
@JsonIgnore
private Map additionalProperties = new HashMap();
private final static long serialVersionUID = 7891957466258838220L;
/**
* No args constructor for use in serialization
*
*/
public Reference() {
}
/**
*
* @param id
* @param href
*/
public Reference(String id, String href) {
super();
this.id = id;
this.href = href;
}
@JsonProperty("id")
public String getId() {
return id;
}
@JsonProperty("id")
public void setId(String id) {
this.id = id;
}
@JsonProperty("href")
public String getHref() {
return href;
}
@JsonProperty("href")
public void setHref(String href) {
this.href = href;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(id).append(href).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Reference) == false) {
return false;
}
Reference rhs = ((Reference) other);
return new EqualsBuilder().append(id, rhs.id).append(href, rhs.href).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy