com.liferay.search.experiences.rest.dto.v1_0.Configuration Maven / Gradle / Ivy
/**
* 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.search.experiences.rest.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 io.swagger.v3.oas.annotations.media.Schema;
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;
import javax.annotation.Generated;
import javax.validation.Valid;
import javax.xml.bind.annotation.XmlRootElement;
/**
* @author Brian Wing Shun Chan
* @generated
*/
@Generated("")
@GraphQLName("Configuration")
@JsonFilter("Liferay.Vulcan")
@XmlRootElement(name = "Configuration")
public class Configuration implements Serializable {
public static Configuration toDTO(String json) {
return ObjectMapperUtil.readValue(Configuration.class, json);
}
public static Configuration unsafeToDTO(String json) {
return ObjectMapperUtil.unsafeReadValue(Configuration.class, json);
}
@Schema
@Valid
public AdvancedConfiguration getAdvancedConfiguration() {
if (_advancedConfigurationSupplier != null) {
advancedConfiguration = _advancedConfigurationSupplier.get();
_advancedConfigurationSupplier = null;
}
return advancedConfiguration;
}
public void setAdvancedConfiguration(
AdvancedConfiguration advancedConfiguration) {
this.advancedConfiguration = advancedConfiguration;
_advancedConfigurationSupplier = null;
}
@JsonIgnore
public void setAdvancedConfiguration(
UnsafeSupplier
advancedConfigurationUnsafeSupplier) {
_advancedConfigurationSupplier = () -> {
try {
return advancedConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected AdvancedConfiguration advancedConfiguration;
@JsonIgnore
private Supplier _advancedConfigurationSupplier;
@Schema
@Valid
public AggregationConfiguration getAggregationConfiguration() {
if (_aggregationConfigurationSupplier != null) {
aggregationConfiguration = _aggregationConfigurationSupplier.get();
_aggregationConfigurationSupplier = null;
}
return aggregationConfiguration;
}
public void setAggregationConfiguration(
AggregationConfiguration aggregationConfiguration) {
this.aggregationConfiguration = aggregationConfiguration;
_aggregationConfigurationSupplier = null;
}
@JsonIgnore
public void setAggregationConfiguration(
UnsafeSupplier
aggregationConfigurationUnsafeSupplier) {
_aggregationConfigurationSupplier = () -> {
try {
return aggregationConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected AggregationConfiguration aggregationConfiguration;
@JsonIgnore
private Supplier
_aggregationConfigurationSupplier;
@Schema
@Valid
public GeneralConfiguration getGeneralConfiguration() {
if (_generalConfigurationSupplier != null) {
generalConfiguration = _generalConfigurationSupplier.get();
_generalConfigurationSupplier = null;
}
return generalConfiguration;
}
public void setGeneralConfiguration(
GeneralConfiguration generalConfiguration) {
this.generalConfiguration = generalConfiguration;
_generalConfigurationSupplier = null;
}
@JsonIgnore
public void setGeneralConfiguration(
UnsafeSupplier
generalConfigurationUnsafeSupplier) {
_generalConfigurationSupplier = () -> {
try {
return generalConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected GeneralConfiguration generalConfiguration;
@JsonIgnore
private Supplier _generalConfigurationSupplier;
@Schema
@Valid
public HighlightConfiguration getHighlightConfiguration() {
if (_highlightConfigurationSupplier != null) {
highlightConfiguration = _highlightConfigurationSupplier.get();
_highlightConfigurationSupplier = null;
}
return highlightConfiguration;
}
public void setHighlightConfiguration(
HighlightConfiguration highlightConfiguration) {
this.highlightConfiguration = highlightConfiguration;
_highlightConfigurationSupplier = null;
}
@JsonIgnore
public void setHighlightConfiguration(
UnsafeSupplier
highlightConfigurationUnsafeSupplier) {
_highlightConfigurationSupplier = () -> {
try {
return highlightConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected HighlightConfiguration highlightConfiguration;
@JsonIgnore
private Supplier _highlightConfigurationSupplier;
@Schema
@Valid
public IndexConfiguration getIndexConfiguration() {
if (_indexConfigurationSupplier != null) {
indexConfiguration = _indexConfigurationSupplier.get();
_indexConfigurationSupplier = null;
}
return indexConfiguration;
}
public void setIndexConfiguration(IndexConfiguration indexConfiguration) {
this.indexConfiguration = indexConfiguration;
_indexConfigurationSupplier = null;
}
@JsonIgnore
public void setIndexConfiguration(
UnsafeSupplier
indexConfigurationUnsafeSupplier) {
_indexConfigurationSupplier = () -> {
try {
return indexConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected IndexConfiguration indexConfiguration;
@JsonIgnore
private Supplier _indexConfigurationSupplier;
@Schema
@Valid
public ParameterConfiguration getParameterConfiguration() {
if (_parameterConfigurationSupplier != null) {
parameterConfiguration = _parameterConfigurationSupplier.get();
_parameterConfigurationSupplier = null;
}
return parameterConfiguration;
}
public void setParameterConfiguration(
ParameterConfiguration parameterConfiguration) {
this.parameterConfiguration = parameterConfiguration;
_parameterConfigurationSupplier = null;
}
@JsonIgnore
public void setParameterConfiguration(
UnsafeSupplier
parameterConfigurationUnsafeSupplier) {
_parameterConfigurationSupplier = () -> {
try {
return parameterConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected ParameterConfiguration parameterConfiguration;
@JsonIgnore
private Supplier _parameterConfigurationSupplier;
@Schema
@Valid
public QueryConfiguration getQueryConfiguration() {
if (_queryConfigurationSupplier != null) {
queryConfiguration = _queryConfigurationSupplier.get();
_queryConfigurationSupplier = null;
}
return queryConfiguration;
}
public void setQueryConfiguration(QueryConfiguration queryConfiguration) {
this.queryConfiguration = queryConfiguration;
_queryConfigurationSupplier = null;
}
@JsonIgnore
public void setQueryConfiguration(
UnsafeSupplier
queryConfigurationUnsafeSupplier) {
_queryConfigurationSupplier = () -> {
try {
return queryConfigurationUnsafeSupplier.get();
}
catch (RuntimeException runtimeException) {
throw runtimeException;
}
catch (Exception exception) {
throw new RuntimeException(exception);
}
};
}
@GraphQLField
@JsonProperty(access = JsonProperty.Access.READ_WRITE)
protected QueryConfiguration queryConfiguration;
@JsonIgnore
private Supplier _queryConfigurationSupplier;
@Schema
@Valid
public Map getSearchContextAttributes() {
if (_searchContextAttributesSupplier != null) {
searchContextAttributes = _searchContextAttributesSupplier.get();
_searchContextAttributesSupplier = null;
}
return searchContextAttributes;
}
public void setSearchContextAttributes(
Map searchContextAttributes) {
this.searchContextAttributes = searchContextAttributes;
_searchContextAttributesSupplier = null;
}
@JsonIgnore
public void setSearchContextAttributes(
UnsafeSupplier
© 2015 - 2025 Weber Informatics LLC | Privacy Policy