com.mparticle.model.GeoLocation Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of server-events-sdk Show documentation
Show all versions of server-events-sdk Show documentation
mParticle SDK for server-side Java environments
package com.mparticle.model;
import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Objects;
/**
* GeoLocation
*/
public class GeoLocation {
public static final String SERIALIZED_NAME_LATITUDE = "latitude";
@SerializedName(SERIALIZED_NAME_LATITUDE)
private BigDecimal latitude;
public static final String SERIALIZED_NAME_LONGITUDE = "longitude";
@SerializedName(SERIALIZED_NAME_LONGITUDE)
private BigDecimal longitude;
public static final String SERIALIZED_NAME_ACCURACY = "accuracy";
@SerializedName(SERIALIZED_NAME_ACCURACY)
private BigDecimal accuracy;
public GeoLocation latitude(BigDecimal latitude) {
this.latitude = latitude;
return this;
}
/**
* Get latitude
* @return latitude
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public GeoLocation longitude(BigDecimal longitude) {
this.longitude = longitude;
return this;
}
/**
* Get longitude
* @return longitude
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public GeoLocation accuracy(BigDecimal accuracy) {
this.accuracy = accuracy;
return this;
}
/**
* Get accuracy
* @return accuracy
**/
@javax.annotation.Nullable
@ApiModelProperty(value = "")
public BigDecimal getAccuracy() {
return accuracy;
}
public void setAccuracy(BigDecimal accuracy) {
this.accuracy = accuracy;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
GeoLocation geoLocation = (GeoLocation) o;
return Objects.equals(this.latitude, geoLocation.latitude) &&
Objects.equals(this.longitude, geoLocation.longitude) &&
Objects.equals(this.accuracy, geoLocation.accuracy);
}
@Override
public int hashCode() {
return Objects.hash(latitude, longitude, accuracy);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class GeoLocation {\n");
sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n");
sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n");
sb.append(" accuracy: ").append(toIndentedString(accuracy)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}