Class SourceConfig
- java.lang.Object
-
- org.opensearch.client.opensearch.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSourceConfig.Builderstatic classSourceConfig.Kind
-
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SourceConfig>_DESERIALIZER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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.Booleanfetch()Get thefetchvariant value.SourceFilterfilter()Get thefiltervariant value.booleanisFetch()Is this variant instance of kindfetch?booleanisFilter()Is this variant instance of kindfilter?static SourceConfigof(java.util.function.Function<SourceConfig.Builder,ObjectBuilder<SourceConfig>> fn)voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
-
-
-
Field Detail
-
_DESERIALIZER
public static final JsonpDeserializer<SourceConfig> _DESERIALIZER
-
-
Method Detail
-
_kind
public final SourceConfig.Kind _kind()
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<SourceConfig.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()
- Specified by:
_getin 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
public SourceFilter filter()
Get thefiltervariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefilterkind.
-
isFetch
public boolean isFetch()
Is this variant instance of kindfetch?
-
fetch
public java.lang.Boolean fetch()
Get thefetchvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefetchkind.
-
serialize
public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)- Specified by:
serializein interfaceJsonpSerializable
-
-