fi.metatavu.soteapi.server.rest.model.LocalizedValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of soteapi-spec Show documentation
Show all versions of soteapi-spec Show documentation
Specifications for Sote API
package fi.metatavu.soteapi.server.rest.model;
import java.util.UUID;
import java.util.List;
import java.time.OffsetDateTime;
import java.time.LocalDate;
import java.util.ArrayList;
import fi.metatavu.soteapi.server.rest.model.*;
import javax.validation.constraints.*;
import javax.validation.Valid;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.media.*;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonCreator;
public class LocalizedValue {
private @Valid String language = null;
private @Valid String value = null;
/**
**/
public LocalizedValue language(String language) {
this.language = language;
return this;
}
//@ApiModelProperty(value = "")
@JsonProperty("language")
public String getLanguage() {
return language;
}
public void setLanguage(String language) {
this.language = language;
}
/**
**/
public LocalizedValue value(String value) {
this.value = value;
return this;
}
//@ApiModelProperty(value = "")
@JsonProperty("value")
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LocalizedValue localizedValue = (LocalizedValue) o;
return Objects.equals(language, localizedValue.language) &&
Objects.equals(value, localizedValue.value);
}
@Override
public int hashCode() {
return Objects.hash(language, value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class LocalizedValue {\n");
sb.append(" language: ").append(toIndentedString(language)).append("\n");
sb.append(" value: ").append(toIndentedString(value)).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 ");
}
}