
com.liferay.headless.delivery.dto.v1_0.ContentStructure 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.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 the content structure that backs structured content. This defines which form fields are available and the possible types and values.",
value = "ContentStructure"
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "ContentStructure")
public class ContentStructure implements Serializable {
public static ContentStructure toDTO(String json) {
return ObjectMapperUtil.readValue(ContentStructure.class, json);
}
public static ContentStructure unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(ContentStructure.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "The key of the asset library to which the content structure is scoped."
)
public String getAssetLibraryKey() {
if (_assetLibraryKeySupplier != null) {
assetLibraryKey = _assetLibraryKeySupplier.get();
_assetLibraryKeySupplier = null;
}
return assetLibraryKey;
}
public void setAssetLibraryKey(String assetLibraryKey) {
this.assetLibraryKey = assetLibraryKey;
_assetLibraryKeySupplier = null;
}
@JsonIgnore
public void setAssetLibraryKey(
UnsafeSupplier assetLibraryKeyUnsafeSupplier) {
_assetLibraryKeySupplier = () -> {
try {
return assetLibraryKeyUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(
description = "The key of the asset library to which the content structure is scoped."
)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected String assetLibraryKey;
@JsonIgnore
private Supplier _assetLibraryKeySupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The list of languages the content structure 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 content structure 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 list of the content structure's fields."
)
@Valid
public ContentStructureField[] getContentStructureFields() {
if (_contentStructureFieldsSupplier != null) {
contentStructureFields = _contentStructureFieldsSupplier.get();
_contentStructureFieldsSupplier = null;
}
return contentStructureFields;
}
public void setContentStructureFields(
ContentStructureField[] contentStructureFields) {
this.contentStructureFields = contentStructureFields;
_contentStructureFieldsSupplier = null;
}
@JsonIgnore
public void setContentStructureFields(
UnsafeSupplier
contentStructureFieldsUnsafeSupplier) {
_contentStructureFieldsSupplier = () -> {
try {
return contentStructureFieldsUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The list of the content structure's fields.")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected ContentStructureField[] contentStructureFields;
@JsonIgnore
private Supplier _contentStructureFieldsSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The content structure'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 content structure's creator.")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected Creator creator;
@JsonIgnore
private Supplier _creatorSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The content structure'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 content structure'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 a field of the content structure 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 a field of the content structure changed."
)
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected Date dateModified;
@JsonIgnore
private Supplier _dateModifiedSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The content structure's description."
)
public String getDescription() {
if (_descriptionSupplier != null) {
description = _descriptionSupplier.get();
_descriptionSupplier = null;
}
return description;
}
public void setDescription(String description) {
this.description = description;
_descriptionSupplier = null;
}
@JsonIgnore
public void setDescription(
UnsafeSupplier descriptionUnsafeSupplier) {
_descriptionSupplier = () -> {
try {
return descriptionUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "The content structure's description.")
@JsonProperty(access = JsonProperty.Access.READ_ONLY)
protected String description;
@JsonIgnore
private Supplier _descriptionSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The localized content structure's description."
)
@Valid
public Map getDescription_i18n() {
if (_description_i18nSupplier != null) {
description_i18n = _description_i18nSupplier.get();
_description_i18nSupplier = null;
}
return description_i18n;
}
public void setDescription_i18n(Map description_i18n) {
this.description_i18n = description_i18n;
_description_i18nSupplier = null;
}
@JsonIgnore
public void setDescription_i18n(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy