org.genesys.glis.v1.model.Term Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glis-client-resttemplate Show documentation
Show all versions of glis-client-resttemplate Show documentation
API client for the Global Information System for plant genetic resources for food and agriculture (PGRFA) with Spring REST template
/*
* Global Information System API Client
* Genesys API client to the Global Information System (GLIS) for PGRFA [https://glis.planttreaty.org](https://glis.planttreaty.org).
*
* OpenAPI spec version: 1.1-SNAPSHOT
* Contact: [email protected]
*
* 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 org.genesys.glis.v1.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Term
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-09-11T09:49:15.074Z")
public class Term {
@JsonProperty("code")
private String code = null;
/**
* ISO-639-1 two-letter language code
*/
public enum LanguageEnum {
EN("en"),
FR("fr"),
ES("es"),
AR("ar"),
RU("ru"),
ZH("zh");
private String value;
LanguageEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static LanguageEnum fromValue(String text) {
for (LanguageEnum b : LanguageEnum.values()) {
if (String.valueOf(b.value).equals(text)) {
return b;
}
}
return null;
}
}
@JsonProperty("language")
private LanguageEnum language = null;
@JsonProperty("term")
private String term = null;
public Term code(String code) {
this.code = code;
return this;
}
/**
* Unique term code
* @return code
**/
@ApiModelProperty(required = true, value = "Unique term code")
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public Term language(LanguageEnum language) {
this.language = language;
return this;
}
/**
* ISO-639-1 two-letter language code
* @return language
**/
@ApiModelProperty(required = true, value = "ISO-639-1 two-letter language code")
public LanguageEnum getLanguage() {
return language;
}
public void setLanguage(LanguageEnum language) {
this.language = language;
}
public Term term(String term) {
this.term = term;
return this;
}
/**
* Term
* @return term
**/
@ApiModelProperty(required = true, value = "Term")
public String getTerm() {
return term;
}
public void setTerm(String term) {
this.term = term;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Term term = (Term) o;
return Objects.equals(this.code, term.code) &&
Objects.equals(this.language, term.language) &&
Objects.equals(this.term, term.term);
}
@Override
public int hashCode() {
return Objects.hash(code, language, term);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Term {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" language: ").append(toIndentedString(language)).append("\n");
sb.append(" term: ").append(toIndentedString(term)).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 ");
}
}