
com.liferay.headless.delivery.dto.v1_0.Experience 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.headless.admin.user.dto.v1_0.Segment;
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 = "Represents a customized experience for a given page.",
value = "Experience"
)
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "Experience")
public class Experience implements Serializable {
public static Experience toDTO(String json) {
return ObjectMapperUtil.readValue(Experience.class, json);
}
public static Experience unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(Experience.class, json);
}
@io.swagger.v3.oas.annotations.media.Schema(
description = "the experience's key."
)
public String getKey() {
if (_keySupplier != null) {
key = _keySupplier.get();
_keySupplier = null;
}
return key;
}
public void setKey(String key) {
this.key = key;
_keySupplier = null;
}
@JsonIgnore
public void setKey(UnsafeSupplier keyUnsafeSupplier) {
_keySupplier = () -> {
try {
return keyUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField(description = "the experience's key.")
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected String key;
@JsonIgnore
private Supplier _keySupplier;
@io.swagger.v3.oas.annotations.media.Schema(
description = "the experience'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 experience'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 experience'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