com.wirefreethought.geodb.client.model.RegionDetails 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;
/**
* RegionDetails
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-05-16T19:24:37.995-07:00")
public class RegionDetails {
@SerializedName("capital")
private String capital = null;
@SerializedName("countryCode")
private String countryCode = null;
@SerializedName("fipsCode")
private String fipsCode = null;
@SerializedName("isoCode")
private String isoCode = null;
@SerializedName("name")
private String name = null;
@SerializedName("numCities")
private Integer numCities = null;
@SerializedName("wikiDataId")
private String wikiDataId = null;
public RegionDetails capital(String capital) {
this.capital = capital;
return this;
}
/**
* The region's capital city (varies by languageCode)
* @return capital
**/
@ApiModelProperty(value = "The region's capital city (varies by languageCode)")
public String getCapital() {
return capital;
}
public void setCapital(String capital) {
this.capital = capital;
}
public RegionDetails countryCode(String countryCode) {
this.countryCode = countryCode;
return this;
}
/**
* An ISO-3166 country code
* @return countryCode
**/
@ApiModelProperty(value = "An ISO-3166 country code")
public String getCountryCode() {
return countryCode;
}
public void setCountryCode(String countryCode) {
this.countryCode = countryCode;
}
public RegionDetails fipsCode(String fipsCode) {
this.fipsCode = fipsCode;
return this;
}
/**
* The FIPS 10-4 region code
* @return fipsCode
**/
@ApiModelProperty(value = "The FIPS 10-4 region code")
public String getFipsCode() {
return fipsCode;
}
public void setFipsCode(String fipsCode) {
this.fipsCode = fipsCode;
}
public RegionDetails isoCode(String isoCode) {
this.isoCode = isoCode;
return this;
}
/**
* The ISO region code
* @return isoCode
**/
@ApiModelProperty(value = "The ISO region code")
public String getIsoCode() {
return isoCode;
}
public void setIsoCode(String isoCode) {
this.isoCode = isoCode;
}
public RegionDetails name(String name) {
this.name = name;
return this;
}
/**
* The region name (varies by languageCode)
* @return name
**/
@ApiModelProperty(value = "The region name (varies by languageCode)")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public RegionDetails numCities(Integer numCities) {
this.numCities = numCities;
return this;
}
/**
* The number of cities in this region
* @return numCities
**/
@ApiModelProperty(value = "The number of cities in this region")
public Integer getNumCities() {
return numCities;
}
public void setNumCities(Integer numCities) {
this.numCities = numCities;
}
public RegionDetails wikiDataId(String wikiDataId) {
this.wikiDataId = wikiDataId;
return this;
}
/**
* The region WikiData id
* @return wikiDataId
**/
@ApiModelProperty(value = "The region 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;
}
RegionDetails regionDetails = (RegionDetails) o;
return Objects.equals(this.capital, regionDetails.capital) &&
Objects.equals(this.countryCode, regionDetails.countryCode) &&
Objects.equals(this.fipsCode, regionDetails.fipsCode) &&
Objects.equals(this.isoCode, regionDetails.isoCode) &&
Objects.equals(this.name, regionDetails.name) &&
Objects.equals(this.numCities, regionDetails.numCities) &&
Objects.equals(this.wikiDataId, regionDetails.wikiDataId);
}
@Override
public int hashCode() {
return Objects.hash(capital, countryCode, fipsCode, isoCode, name, numCities, wikiDataId);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class RegionDetails {\n");
sb.append(" capital: ").append(toIndentedString(capital)).append("\n");
sb.append(" countryCode: ").append(toIndentedString(countryCode)).append("\n");
sb.append(" fipsCode: ").append(toIndentedString(fipsCode)).append("\n");
sb.append(" isoCode: ").append(toIndentedString(isoCode)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" numCities: ").append(toIndentedString(numCities)).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 ");
}
}