Class SortOptions
java.lang.Object
co.elastic.clients.elasticsearch._types.SortOptions
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<SortOptions.Kind,java.lang.Object>
@JsonpDeserializable public class SortOptions extends java.lang.Object implements TaggedUnion<SortOptions.Kind,java.lang.Object>, JsonpSerializable
- See Also:
- Documentation on elastic.co, API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSortOptions.Builderstatic classSortOptions.KindSortOptionsvariant kinds. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<SortOptions>_DESERIALIZER -
Constructor Summary
Constructors Constructor Description SortOptions(SortOptionsVariant value) -
Method Summary
Modifier and Type Method Description java.lang.Object_get()SortOptions.Kind_kind()Get the of the kind of variant held by this object.ScoreSortdoc()Get the_docvariant value.FieldSortfield()Get thefieldvariant value.GeoDistanceSortgeoDistance()Get the_geo_distancevariant value.booleanisDoc()Is this variant instance of kind_doc?booleanisField()Is this variant instance of kindfield?booleanisGeoDistance()Is this variant instance of kind_geo_distance?booleanisScore()Is this variant instance of kind_score?booleanisScript()Is this variant instance of kind_script?static SortOptionsof(java.util.function.Function<SortOptions.Builder,ObjectBuilder<SortOptions>> fn)ScoreSortscore()Get the_scorevariant value.ScriptSortscript()Get the_scriptvariant value.voidserialize(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
-
-
Constructor Details
-
SortOptions
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<SortOptions.Kind,java.lang.Object>- Returns:
- the variant kind
-
_get
public final java.lang.Object _get()- Specified by:
_getin interfaceTaggedUnion<SortOptions.Kind,java.lang.Object>
-
of
public static SortOptions of(java.util.function.Function<SortOptions.Builder,ObjectBuilder<SortOptions>> fn) -
isScore
public boolean isScore()Is this variant instance of kind_score? -
score
Get the_scorevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of the_scorekind.
-
isDoc
public boolean isDoc()Is this variant instance of kind_doc? -
doc
Get the_docvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of the_dockind.
-
isGeoDistance
public boolean isGeoDistance()Is this variant instance of kind_geo_distance? -
geoDistance
Get the_geo_distancevariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of the_geo_distancekind.
-
isScript
public boolean isScript()Is this variant instance of kind_script? -
script
Get the_scriptvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of the_scriptkind.
-
isField
public boolean isField()Is this variant instance of kindfield? -
field
Get thefieldvariant value.- Throws:
java.lang.IllegalStateException- if the current variant is not of thefieldkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-