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

com.wirefreethought.geodb.client.model.CityDetails 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; /** * CityDetails */ @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-05-16T19:24:37.995-07:00") public class CityDetails { @SerializedName("city") private String city = null; @SerializedName("country") private String country = null; @SerializedName("countryCode") private String countryCode = null; @SerializedName("deleted") private Boolean deleted = null; @SerializedName("elevationMeters") private Integer elevationMeters = null; @SerializedName("id") private Integer id = null; @SerializedName("latitude") private Double latitude = null; @SerializedName("longitude") private Double longitude = null; @SerializedName("population") private Integer population = null; @SerializedName("region") private String region = null; @SerializedName("regionCode") private String regionCode = null; @SerializedName("timezone") private String timezone = null; @SerializedName("wikiDataId") private String wikiDataId = null; public CityDetails 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 CityDetails 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 CityDetails 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 CityDetails deleted(Boolean deleted) { this.deleted = deleted; return this; } /** * If this city has been soft-deleted * @return deleted **/ @ApiModelProperty(value = "If this city has been soft-deleted") public Boolean isDeleted() { return deleted; } public void setDeleted(Boolean deleted) { this.deleted = deleted; } public CityDetails elevationMeters(Integer elevationMeters) { this.elevationMeters = elevationMeters; return this; } /** * The city elevation (meters) above sea level * @return elevationMeters **/ @ApiModelProperty(value = "The city elevation (meters) above sea level") public Integer getElevationMeters() { return elevationMeters; } public void setElevationMeters(Integer elevationMeters) { this.elevationMeters = elevationMeters; } public CityDetails 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 CityDetails 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 CityDetails 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 CityDetails population(Integer population) { this.population = population; return this; } /** * The city population * @return population **/ @ApiModelProperty(value = "The city population") public Integer getPopulation() { return population; } public void setPopulation(Integer population) { this.population = population; } public CityDetails 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 CityDetails 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 CityDetails timezone(String timezone) { this.timezone = timezone; return this; } /** * The city timezone id * @return timezone **/ @ApiModelProperty(value = "The city timezone id") public String getTimezone() { return timezone; } public void setTimezone(String timezone) { this.timezone = timezone; } public CityDetails 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; } CityDetails cityDetails = (CityDetails) o; return Objects.equals(this.city, cityDetails.city) && Objects.equals(this.country, cityDetails.country) && Objects.equals(this.countryCode, cityDetails.countryCode) && Objects.equals(this.deleted, cityDetails.deleted) && Objects.equals(this.elevationMeters, cityDetails.elevationMeters) && Objects.equals(this.id, cityDetails.id) && Objects.equals(this.latitude, cityDetails.latitude) && Objects.equals(this.longitude, cityDetails.longitude) && Objects.equals(this.population, cityDetails.population) && Objects.equals(this.region, cityDetails.region) && Objects.equals(this.regionCode, cityDetails.regionCode) && Objects.equals(this.timezone, cityDetails.timezone) && Objects.equals(this.wikiDataId, cityDetails.wikiDataId); } @Override public int hashCode() { return Objects.hash(city, country, countryCode, deleted, elevationMeters, id, latitude, longitude, population, region, regionCode, timezone, wikiDataId); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class CityDetails {\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(" deleted: ").append(toIndentedString(deleted)).append("\n"); sb.append(" elevationMeters: ").append(toIndentedString(elevationMeters)).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(" population: ").append(toIndentedString(population)).append("\n"); sb.append(" region: ").append(toIndentedString(region)).append("\n"); sb.append(" regionCode: ").append(toIndentedString(regionCode)).append("\n"); sb.append(" timezone: ").append(toIndentedString(timezone)).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 "); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy