
com.liferay.headless.delivery.dto.v1_0.FragmentField 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.json.JSONFactoryUtil;
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 = "Represents a fragment field.", value = "FragmentField"
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "FragmentField")
public class FragmentField implements Serializable {
public static FragmentField toDTO(String json) {
return ObjectMapperUtil.readValue(FragmentField.class, json);
}
public static FragmentField unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(FragmentField.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "The fragment field's ID."
)
public String getId() {
if (_idSupplier != null) {
id = _idSupplier.get();
_idSupplier = null;
}
return id;
}
public void setId(String 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 fragment field's ID.")
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String id;
@JsonIgnore
private Supplier _idSupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "The fragment field's value."
)
@Valid
public Object getValue() {
if (_valueSupplier != null) {
value = _valueSupplier.get();
_valueSupplier = null;
}
return value;
}
public void setValue(Object value) {
this.value = value;
_valueSupplier = null;
}
@JsonIgnore
public void setValue(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy