org.graylog2.plugin.lookup.LookupResult Maven / Gradle / Ivy
/**
* This file is part of Graylog.
*
* Graylog is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Graylog is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Graylog. If not, see .
*/
package org.graylog2.plugin.lookup;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.auto.value.AutoValue;
import org.graylog2.lookup.LookupDefaultMultiValue;
import org.graylog2.lookup.LookupDefaultSingleValue;
import javax.annotation.Nullable;
import java.util.Collections;
import java.util.Map;
@AutoValue
public abstract class LookupResult {
private static final LookupResult EMPTY_LOOKUP_RESULT = builder()
.cacheTTL(Long.MAX_VALUE)
.build();
public static final String SINGLE_VALUE_KEY = "value";
@JsonProperty("single_value")
@Nullable
public abstract Object singleValue();
@JsonProperty("multi_value")
@Nullable
public abstract Map