
com.liferay.headless.delivery.dto.v1_0.NavigationMenuItem 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.validation.constraints.NotNull;
import jakarta.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
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 = "Represents a navigation menu item.",
value = "NavigationMenuItem"
)
@io.swagger.v3.oas.annotations.media.Schema(
description = "Represents a navigation menu item.",
requiredProperties = {"typeSettings"}
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "NavigationMenuItem")
public class NavigationMenuItem implements Serializable {
public static NavigationMenuItem toDTO(String json) {
return ObjectMapperUtil.readValue(NavigationMenuItem.class, json);
}
public static NavigationMenuItem unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(NavigationMenuItem.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "The list of languages the navigation menu item has a translation for."
)
public String[] getAvailableLanguages() {
if (_availableLanguagesSupplier != null) {
availableLanguages = _availableLanguagesSupplier.get();
_availableLanguagesSupplier = null;
}
return availableLanguages;
}
public void setAvailableLanguages(String[] availableLanguages) {
this.availableLanguages = availableLanguages;
_availableLanguagesSupplier = null;
}
@JsonIgnore
public void setAvailableLanguages(
UnsafeSupplier availableLanguagesUnsafeSupplier) {
_availableLanguagesSupplier = () -> {
try {
return availableLanguagesUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The list of languages the navigation menu item has a translation for."
)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected String[] availableLanguages;
@JsonIgnore
private Supplier _availableLanguagesSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The navigation menu item's creator."
)
@Valid
public Creator getCreator() {
if (_creatorSupplier != null) {
creator = _creatorSupplier.get();
_creatorSupplier = null;
}
return creator;
}
public void setCreator(Creator creator) {
this.creator = creator;
_creatorSupplier = null;
}
@JsonIgnore
public void setCreator(
UnsafeSupplier creatorUnsafeSupplier) {
_creatorSupplier = () -> {
try {
return creatorUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The navigation menu item's creator.")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected Creator creator;
@JsonIgnore
private Supplier _creatorSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "A list of the custom fields associated with the navigation menu item."
)
@Valid
public com.liferay.portal.vulcan.custom.field.CustomField[]
getCustomFields() {
if (_customFieldsSupplier != null) {
customFields = _customFieldsSupplier.get();
_customFieldsSupplier = null;
}
return customFields;
}
public void setCustomFields(
com.liferay.portal.vulcan.custom.field.CustomField[] customFields) {
this.customFields = customFields;
_customFieldsSupplier = null;
}
@JsonIgnore
public void setCustomFields(
UnsafeSupplier
customFieldsUnsafeSupplier) {
_customFieldsSupplier = () -> {
try {
return customFieldsUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "A list of the custom fields associated with the navigation menu item."
)
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected com.liferay.portal.vulcan.custom.field.CustomField[] customFields;
@JsonIgnore
private Supplier
_customFieldsSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The navigation menu item's creation date."
)
public Date getDateCreated() {
if (_dateCreatedSupplier != null) {
dateCreated = _dateCreatedSupplier.get();
_dateCreatedSupplier = null;
}
return dateCreated;
}
public void setDateCreated(Date dateCreated) {
this.dateCreated = dateCreated;
_dateCreatedSupplier = null;
}
@JsonIgnore
public void setDateCreated(
UnsafeSupplier dateCreatedUnsafeSupplier) {
_dateCreatedSupplier = () -> {
try {
return dateCreatedUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The navigation menu item's creation date.")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected Date dateCreated;
@JsonIgnore
private Supplier _dateCreatedSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The last time the navigation menu item changed."
)
public Date getDateModified() {
if (_dateModifiedSupplier != null) {
dateModified = _dateModifiedSupplier.get();
_dateModifiedSupplier = null;
}
return dateModified;
}
public void setDateModified(Date dateModified) {
this.dateModified = dateModified;
_dateModifiedSupplier = null;
}
@JsonIgnore
public void setDateModified(
UnsafeSupplier dateModifiedUnsafeSupplier) {
_dateModifiedSupplier = () -> {
try {
return dateModifiedUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The last time the navigation menu item changed."
)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected Date dateModified;
@JsonIgnore
private Supplier _dateModifiedSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The navigation menu item's external reference code."
)
public String getExternalReferenceCode() {
if (_externalReferenceCodeSupplier != null) {
externalReferenceCode = _externalReferenceCodeSupplier.get();
_externalReferenceCodeSupplier = null;
}
return externalReferenceCode;
}
public void setExternalReferenceCode(String externalReferenceCode) {
this.externalReferenceCode = externalReferenceCode;
_externalReferenceCodeSupplier = null;
}
@JsonIgnore
public void setExternalReferenceCode(
UnsafeSupplier externalReferenceCodeUnsafeSupplier) {
_externalReferenceCodeSupplier = () -> {
try {
return externalReferenceCodeUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The navigation menu item's external reference code."
)
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String externalReferenceCode;
@JsonIgnore
private Supplier _externalReferenceCodeSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The navigation menu item's ID."
)
public Long getId() {
if (_idSupplier != null) {
id = _idSupplier.get();
_idSupplier = null;
}
return id;
}
public void setId(Long id) {
this.id = id;
_idSupplier = null;
}
@JsonIgnore
public void setId(UnsafeSupplier idUnsafeSupplier) {
_idSupplier = () -> {
try {
return idUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The navigation menu item's ID.")
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected Long id;
@JsonIgnore
private Supplier _idSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The navigation menu item's name."
)
public String getName() {
if (_nameSupplier != null) {
name = _nameSupplier.get();
_nameSupplier = null;
}
return name;
}
public void setName(String name) {
this.name = name;
_nameSupplier = null;
}
@JsonIgnore
public void setName(UnsafeSupplier nameUnsafeSupplier) {
_nameSupplier = () -> {
try {
return nameUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The navigation menu item's name.")
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String name;
@JsonIgnore
private Supplier _nameSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The localized navigation menu item's names."
)
@Valid
public Map getName_i18n() {
if (_name_i18nSupplier != null) {
name_i18n = _name_i18nSupplier.get();
_name_i18nSupplier = null;
}
return name_i18n;
}
public void setName_i18n(Map name_i18n) {
this.name_i18n = name_i18n;
_name_i18nSupplier = null;
}
@JsonIgnore
public void setName_i18n(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy