Class SourceConfig
java.lang.Object
co.elastic.clients.elasticsearch.core.search.SourceConfig
- All Implemented Interfaces:
JsonpSerializable
,TaggedUnion<SourceConfig.Kind,java.lang.Object>
@JsonpDeserializable public class SourceConfig extends java.lang.Object implements TaggedUnion<SourceConfig.Kind,java.lang.Object>, JsonpSerializable
Defines how to fetch a source. Fetching can be disabled entirely, or the
source can be filtered.
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SourceConfig.Builder
static class
SourceConfig.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SourceConfig>
_DESERIALIZER
-
Method Summary
Modifier and Type Method Description java.lang.Object
_get()
SourceConfig.Kind
_kind()
Get the of the kind of variant held by this object.java.lang.Boolean
fetch()
Get thefetch
variant value.SourceFilter
filter()
Get thefilter
variant value.boolean
isFetch()
Is this variant instance of kindfetch
?boolean
isFilter()
Is this variant instance of kindfilter
?static SourceConfig
of(java.util.function.Function<SourceConfig.Builder,ObjectBuilder<SourceConfig>> fn)
void
serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
_DESERIALIZER
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnion
Get the of the kind of variant held by this object.- Specified by:
_kind
in interfaceTaggedUnion<SourceConfig.Kind,java.lang.Object>
- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_get
in interfaceTaggedUnion<SourceConfig.Kind,java.lang.Object>
-
of
public static SourceConfig of(java.util.function.Function<SourceConfig.Builder,ObjectBuilder<SourceConfig>> fn) -
isFilter
public boolean isFilter()Is this variant instance of kindfilter
? -
filter
Get thefilter
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefilter
kind.
-
isFetch
public boolean isFetch()Is this variant instance of kindfetch
? -
fetch
public java.lang.Boolean fetch()Get thefetch
variant value.- Throws:
java.lang.IllegalStateException
- if the current variant is not of thefetch
kind.
-
serialize
- Specified by:
serialize
in interfaceJsonpSerializable
-