travel.izi.api.model.entity.Translation Maven / Gradle / Ivy
/*
* Copyright (C) 2014 IZITEQ B.V.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package travel.izi.api.model.entity;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
import com.google.auto.value.AutoValue;
import java.io.Serializable;
/**
* Translation for country or city name.
*/
@SuppressWarnings("unused")
@AutoValue
@JsonDeserialize(builder = AutoValue_Translation.Builder.class)
public abstract class Translation implements Serializable {
public static Builder builder() {
return new AutoValue_Translation.Builder();
}
/**
* Localized name.
*/
public abstract String name();
/**
* The language (ISO 639-1) of localization.
*/
public abstract String language();
@AutoValue.Builder
@JsonPOJOBuilder(withPrefix = "")
public abstract static class Builder {
public abstract Builder name(String name);
public abstract Builder language(String language);
public abstract Translation build();
}
}