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

com.wirefreethought.geodb.client.model.RegionsResponse 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 com.wirefreethought.geodb.client.model.Link; import com.wirefreethought.geodb.client.model.Metadata; import com.wirefreethought.geodb.client.model.RegionSummary; import com.wirefreethought.geodb.client.model.WftError; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * RegionsResponse */ @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-05-16T19:14:06.128-07:00") public class RegionsResponse { @SerializedName("data") private List data = null; @SerializedName("errors") private List errors = null; @SerializedName("links") private List links = null; @SerializedName("metadata") private Metadata metadata = null; public RegionsResponse data(List data) { this.data = data; return this; } public RegionsResponse addDataItem(RegionSummary dataItem) { if (this.data == null) { this.data = new ArrayList<>(); } this.data.add(dataItem); return this; } /** * A list of RegionSummaries * @return data **/ @ApiModelProperty(value = "A list of RegionSummaries") public List getData() { return data; } public void setData(List data) { this.data = data; } public RegionsResponse errors(List errors) { this.errors = errors; return this; } public RegionsResponse addErrorsItem(WftError errorsItem) { if (this.errors == null) { this.errors = new ArrayList<>(); } this.errors.add(errorsItem); return this; } /** * A list of WftErrors * @return errors **/ @ApiModelProperty(value = "A list of WftErrors") public List getErrors() { return errors; } public void setErrors(List errors) { this.errors = errors; } public RegionsResponse links(List links) { this.links = links; return this; } public RegionsResponse addLinksItem(Link linksItem) { if (this.links == null) { this.links = new ArrayList<>(); } this.links.add(linksItem); return this; } /** * A list of Links * @return links **/ @ApiModelProperty(value = "A list of Links") public List getLinks() { return links; } public void setLinks(List links) { this.links = links; } public RegionsResponse metadata(Metadata metadata) { this.metadata = metadata; return this; } /** * Get metadata * @return metadata **/ @ApiModelProperty(value = "") public Metadata getMetadata() { return metadata; } public void setMetadata(Metadata metadata) { this.metadata = metadata; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } RegionsResponse regionsResponse = (RegionsResponse) o; return Objects.equals(this.data, regionsResponse.data) && Objects.equals(this.errors, regionsResponse.errors) && Objects.equals(this.links, regionsResponse.links) && Objects.equals(this.metadata, regionsResponse.metadata); } @Override public int hashCode() { return Objects.hash(data, errors, links, metadata); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class RegionsResponse {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); sb.append(" links: ").append(toIndentedString(links)).append("\n"); sb.append(" metadata: ").append(toIndentedString(metadata)).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