com.wirefreethought.geodb.client.model.CitySummary Maven / Gradle / Ivy
/*
* GeoDB API
* The GeoDB API focuses on getting global city and region data. Easily obtain country, region, and city data for use in your apps! - Filter cities by name prefix, country, location, time-zone, and even minimum population.
- Sort cities by name, country code, elevation, and population - or any combination of these.
- Get all country regions.
- Get all cities in a given region.
- Display results in multiple languages (currently, English, French, German, Russian, and Spanish).
- RESTful API adheres to industry best-practices, including HATEOAS-style links to facilitate paging results.
- Backed by cloud-based load-balanced infrastructure for resiliency and performance!
- Data is periodically refreshed from GeoNames and WikiData.
Notes:
- All endpoints implicitly support JSONP-style invocation via an optional callback param.
- Since the database is periodically updated, this may very rarely result in certain cities being marked deleted (e.g., duplicates removed). By default, endpoints returning city data will exclude cities marked deleted. However, in the unlikely event that this occurs while your app is paging through a set of affected results - and you care about the paged results suddenly changing underneath - specify includeDeleted=SINCE_YESTERDAY (or SINCE_LAST_WEEK if you're really paranoid!).
Useful Resources
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.wirefreethought.geodb.client.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* CitySummary
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-05-16T19:24:37.995-07:00")
public class CitySummary {
@SerializedName("city")
private String city = null;
@SerializedName("country")
private String country = null;
@SerializedName("countryCode")
private String countryCode = null;
@SerializedName("distance")
private Double distance = null;
@SerializedName("id")
private Integer id = null;
@SerializedName("latitude")
private Double latitude = null;
@SerializedName("longitude")
private Double longitude = null;
@SerializedName("region")
private String region = null;
@SerializedName("regionCode")
private String regionCode = null;
@SerializedName("wikiDataId")
private String wikiDataId = null;
public CitySummary city(String city) {
this.city = city;
return this;
}
/**
* The city name (varies by languageCode)
* @return city
**/
@ApiModelProperty(value = "The city name (varies by languageCode)")
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public CitySummary country(String country) {
this.country = country;
return this;
}
/**
* The country name (varies by languageCode)
* @return country
**/
@ApiModelProperty(value = "The country name (varies by languageCode)")
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
public CitySummary countryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
/**
* The ISO-3166 country code
* @return countryCode
**/
@ApiModelProperty(value = "The ISO-3166 country code")
public String getCountryCode() {
return countryCode;
}
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
public CitySummary distance(Double distance) {
this.distance = distance;
return this;
}
/**
* Included if this is the result of a distance query
* @return distance
**/
@ApiModelProperty(value = "Included if this is the result of a distance query")
public Double getDistance() {
return distance;
}
public void setDistance(Double distance) {
this.distance = distance;
}
public CitySummary id(Integer id) {
this.id = id;
return this;
}
/**
* The city GeoDB native id
* @return id
**/
@ApiModelProperty(value = "The city GeoDB native id")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public CitySummary latitude(Double latitude) {
this.latitude = latitude;
return this;
}
/**
* The city latittude (-90.0 to 90.0)
* @return latitude
**/
@ApiModelProperty(value = "The city latittude (-90.0 to 90.0)")
public Double getLatitude() {
return latitude;
}
public void setLatitude(Double latitude) {
this.latitude = latitude;
}
public CitySummary longitude(Double longitude) {
this.longitude = longitude;
return this;
}
/**
* The city longitude (-180.0 to 180.0)
* @return longitude
**/
@ApiModelProperty(value = "The city longitude (-180.0 to 180.0)")
public Double getLongitude() {
return longitude;
}
public void setLongitude(Double longitude) {
this.longitude = longitude;
}
public CitySummary region(String region) {
this.region = region;
return this;
}
/**
* The region name (varies by languageCode)
* @return region
**/
@ApiModelProperty(value = "The region name (varies by languageCode)")
public String getRegion() {
return region;
}
public void setRegion(String region) {
this.region = region;
}
public CitySummary regionCode(String regionCode) {
this.regionCode = regionCode;
return this;
}
/**
* The ISO or FIPS region code
* @return regionCode
**/
@ApiModelProperty(value = "The ISO or FIPS region code")
public String getRegionCode() {
return regionCode;
}
public void setRegionCode(String regionCode) {
this.regionCode = regionCode;
}
public CitySummary wikiDataId(String wikiDataId) {
this.wikiDataId = wikiDataId;
return this;
}
/**
* The city WikiData id
* @return wikiDataId
**/
@ApiModelProperty(value = "The city WikiData id")
public String getWikiDataId() {
return wikiDataId;
}
public void setWikiDataId(String wikiDataId) {
this.wikiDataId = wikiDataId;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CitySummary citySummary = (CitySummary) o;
return Objects.equals(this.city, citySummary.city) &&
Objects.equals(this.country, citySummary.country) &&
Objects.equals(this.countryCode, citySummary.countryCode) &&
Objects.equals(this.distance, citySummary.distance) &&
Objects.equals(this.id, citySummary.id) &&
Objects.equals(this.latitude, citySummary.latitude) &&
Objects.equals(this.longitude, citySummary.longitude) &&
Objects.equals(this.region, citySummary.region) &&
Objects.equals(this.regionCode, citySummary.regionCode) &&
Objects.equals(this.wikiDataId, citySummary.wikiDataId);
}
@Override
public int hashCode() {
return Objects.hash(city, country, countryCode, distance, id, latitude, longitude, region, regionCode, wikiDataId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CitySummary {\n");
sb.append(" city: ").append(toIndentedString(city)).append("\n");
sb.append(" country: ").append(toIndentedString(country)).append("\n");
sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
sb.append(" distance: ").append(toIndentedString(distance)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" latitude: ").append(toIndentedString(latitude)).append("\n");
sb.append(" longitude: ").append(toIndentedString(longitude)).append("\n");
sb.append(" region: ").append(toIndentedString(region)).append("\n");
sb.append(" regionCode: ").append(toIndentedString(regionCode)).append("\n");
sb.append(" wikiDataId: ").append(toIndentedString(wikiDataId)).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 ");
}
}