
com.liferay.headless.delivery.dto.v1_0.Language Maven / Gradle / Ivy
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.headless.delivery.dto.v1_0;
import com.fasterxml.jackson.annotation.JsonFilter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.liferay.petra.function.UnsafeSupplier;
import com.liferay.petra.string.StringBundler;
import com.liferay.portal.kernel.util.StringUtil;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLField;
import com.liferay.portal.vulcan.graphql.annotation.GraphQLName;
import com.liferay.portal.vulcan.util.ObjectMapperUtil;
import jakarta.annotation.Generated;
import jakarta.validation.Valid;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Iterator;
import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.function.Supplier;
/**
* @author Javier Gamarra
* @generated
*/
@Generated("")
@GraphQLName(
description = "Describes a specific language in the platform.",
value = "Language"
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "Language")
public class Language implements Serializable {
public static Language toDTO(String json) {
return ObjectMapperUtil.readValue(Language.class, json);
}
public static Language unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(Language.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "The language's contry name."
)
public String getCountryName() {
if (_countryNameSupplier != null) {
countryName = _countryNameSupplier.get();
_countryNameSupplier = null;
}
return countryName;
}
public void setCountryName(String countryName) {
this.countryName = countryName;
_countryNameSupplier = null;
}
@JsonIgnore
public void setCountryName(
UnsafeSupplier countryNameUnsafeSupplier) {
_countryNameSupplier = () -> {
try {
return countryNameUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The language's contry name.")
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String countryName;
@JsonIgnore
private Supplier _countryNameSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The localized language's country name values."
)
@Valid
public Map getCountryName_i18n() {
if (_countryName_i18nSupplier != null) {
countryName_i18n = _countryName_i18nSupplier.get();
_countryName_i18nSupplier = null;
}
return countryName_i18n;
}
public void setCountryName_i18n(Map countryName_i18n) {
this.countryName_i18n = countryName_i18n;
_countryName_i18nSupplier = null;
}
@JsonIgnore
public void setCountryName_i18n(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy