com.wirefreethought.geodb.client.model.LanguageDescriptor 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;
/**
* LanguageDescriptor
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-05-16T19:24:37.995-07:00")
public class LanguageDescriptor {
/**
* Gets or Sets code
*/
@JsonAdapter(CodeEnum.Adapter.class)
public enum CodeEnum {
UNDEFINED("undefined"),
AA("aa"),
AB("ab"),
AE("ae"),
AF("af"),
AK("ak"),
AM("am"),
AN("an"),
AR("ar"),
AS("as"),
AV("av"),
AY("ay"),
AZ("az"),
BA("ba"),
BE("be"),
BG("bg"),
BH("bh"),
BI("bi"),
BM("bm"),
BN("bn"),
BO("bo"),
BR("br"),
BS("bs"),
CA("ca"),
CE("ce"),
CH("ch"),
CO("co"),
CR("cr"),
CS("cs"),
CU("cu"),
CV("cv"),
CY("cy"),
DA("da"),
DE("de"),
DV("dv"),
DZ("dz"),
EE("ee"),
EL("el"),
EN("en"),
EO("eo"),
ES("es"),
ET("et"),
EU("eu"),
FA("fa"),
FF("ff"),
FI("fi"),
FJ("fj"),
FO("fo"),
FR("fr"),
FY("fy"),
GA("ga"),
GD("gd"),
GL("gl"),
GN("gn"),
GU("gu"),
GV("gv"),
HA("ha"),
HE("he"),
HI("hi"),
HO("ho"),
HR("hr"),
HT("ht"),
HU("hu"),
HY("hy"),
HZ("hz"),
IA("ia"),
ID("id"),
IE("ie"),
IG("ig"),
II("ii"),
IK("ik"),
IO("io"),
IS("is"),
IT("it"),
IU("iu"),
JA("ja"),
JV("jv"),
KA("ka"),
KG("kg"),
KI("ki"),
KJ("kj"),
KK("kk"),
KL("kl"),
KM("km"),
KN("kn"),
KO("ko"),
KR("kr"),
KS("ks"),
KU("ku"),
KV("kv"),
KW("kw"),
KY("ky"),
LA("la"),
LB("lb"),
LG("lg"),
LI("li"),
LN("ln"),
LO("lo"),
LT("lt"),
LU("lu"),
LV("lv"),
MG("mg"),
MH("mh"),
MI("mi"),
MK("mk"),
ML("ml"),
MN("mn"),
MR("mr"),
MS("ms"),
MT("mt"),
MY("my"),
NA("na"),
NB("nb"),
ND("nd"),
NE("ne"),
NG("ng"),
NL("nl"),
NN("nn"),
NO("no"),
NR("nr"),
NV("nv"),
NY("ny"),
OC("oc"),
OJ("oj"),
OM("om"),
OR("or"),
OS("os"),
PA("pa"),
PI("pi"),
PL("pl"),
PS("ps"),
PT("pt"),
QU("qu"),
RM("rm"),
RN("rn"),
RO("ro"),
RU("ru"),
RW("rw"),
SA("sa"),
SC("sc"),
SD("sd"),
SE("se"),
SG("sg"),
SI("si"),
SK("sk"),
SL("sl"),
SM("sm"),
SN("sn"),
SO("so"),
SQ("sq"),
SR("sr"),
SS("ss"),
ST("st"),
SU("su"),
SV("sv"),
SW("sw"),
TA("ta"),
TE("te"),
TG("tg"),
TH("th"),
TI("ti"),
TK("tk"),
TL("tl"),
TN("tn"),
TO("to"),
TR("tr"),
TS("ts"),
TT("tt"),
TW("tw"),
TY("ty"),
UG("ug"),
UK("uk"),
UR("ur"),
UZ("uz"),
VE("ve"),
VI("vi"),
VO("vo"),
WA("wa"),
WO("wo"),
XH("xh"),
YI("yi"),
YO("yo"),
ZA("za"),
ZH("zh"),
ZU("zu");
private String value;
CodeEnum(String value) {
this.value = value;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
public static CodeEnum fromValue(String text) {
for (CodeEnum b : CodeEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
public static class Adapter extends TypeAdapter {
@Override
public void write(final JsonWriter jsonWriter, final CodeEnum enumeration) throws IOException {
jsonWriter.value(enumeration.getValue());
}
@Override
public CodeEnum read(final JsonReader jsonReader) throws IOException {
String value = jsonReader.nextString();
return CodeEnum.fromValue(String.valueOf(value));
}
}
}
@SerializedName("code")
private CodeEnum code = null;
@SerializedName("name")
private String name = null;
public LanguageDescriptor code(CodeEnum code) {
this.code = code;
return this;
}
/**
* Get code
* @return code
**/
@ApiModelProperty(value = "")
public CodeEnum getCode() {
return code;
}
public void setCode(CodeEnum code) {
this.code = code;
}
public LanguageDescriptor name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LanguageDescriptor languageDescriptor = (LanguageDescriptor) o;
return Objects.equals(this.code, languageDescriptor.code) &&
Objects.equals(this.name, languageDescriptor.name);
}
@Override
public int hashCode() {
return Objects.hash(code, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LanguageDescriptor {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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 ");
}
}