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

com.dell.cpsd.GeoLocation Maven / Gradle / Ivy


package com.dell.cpsd;

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({
    "country",
    "city"
})
public class GeoLocation implements Serializable
{

    @JsonProperty("country")
    private String country;
    @JsonProperty("city")
    private String city;
    @JsonIgnore
    private Map additionalProperties = new HashMap();
    private final static long serialVersionUID = -3727802823793574587L;

    /**
     * No args constructor for use in serialization
     * 
     */
    public GeoLocation() {
    }

    /**
     * 
     * @param country
     * @param city
     */
    public GeoLocation(String country, String city) {
        super();
        this.country = country;
        this.city = city;
    }

    @JsonProperty("country")
    public String getCountry() {
        return country;
    }

    @JsonProperty("country")
    public void setCountry(String country) {
        this.country = country;
    }

    @JsonProperty("city")
    public String getCity() {
        return city;
    }

    @JsonProperty("city")
    public void setCity(String city) {
        this.city = city;
    }

    @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(country).append(city).append(additionalProperties).toHashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if ((other instanceof GeoLocation) == false) {
            return false;
        }
        GeoLocation rhs = ((GeoLocation) other);
        return new EqualsBuilder().append(country, rhs.country).append(city, rhs.city).append(additionalProperties, rhs.additionalProperties).isEquals();
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy