package io.apiman.gateway.engine.vertx.polling.fetchers.threescale.beans;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
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;
/**
* @author Marc Savy {@literal <marc@rhymewithgravy.com>}
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"rel",
"href"
})
public class Link implements Serializable
{
@JsonProperty("rel")
private String rel;
@JsonProperty("href")
private String href;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<>();
private final static long serialVersionUID = -7282274840433466116L;
@JsonProperty("rel")
public String getRel() {
return rel;
}
@JsonProperty("rel")
public void setRel(String rel) {
this.rel = rel;
}
public Link withRel(String rel) {
this.rel = rel;
return this;
}
@JsonProperty("href")
public String getHref() {
return href;
}
@JsonProperty("href")
public void setHref(String href) {
this.href = href;
}
public Link withHref(String href) {
this.href = href;
return this;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
public Link withAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
return this;
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(rel).append(href).append(additionalProperties).toHashCode();
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if ((other instanceof Link) == false) {
return false;
}
Link rhs = ((Link) other);
return new EqualsBuilder().append(rel, rhs.rel).append(href, rhs.href).append(additionalProperties, rhs.additionalProperties).isEquals();
}
}