Class ReasoningDetail
java.lang.Object
co.elastic.clients.elasticsearch.inference.ReasoningDetail
- All Implemented Interfaces:
JsonpSerializable,TaggedUnion<ReasoningDetail.Kind,ReasoningDetailVariant>
@JsonpDeserializable
public class ReasoningDetail
extends Object
implements TaggedUnion<ReasoningDetail.Kind,ReasoningDetailVariant>, JsonpSerializable
Type representing the different types of reasoning details that can be
included in the response from the model. Currently supported only for
elastic provider.- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal ReasoningDetailVariant_get()final ReasoningDetail.Kind_kind()Get the of the kind of variant held by this object.booleanIs this variant instance of kindreasoning.encrypted?booleanIs this variant instance of kindreasoning.summary?booleanIs this variant instance of kindreasoning.text?static ReasoningDetailGet thereasoning.encryptedvariant value.Get thereasoning.summaryvariant value.Get thereasoning.textvariant value.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidtoString()
-
Field Details
-
_DESERIALIZER
-
-
Constructor Details
-
ReasoningDetail
-
-
Method Details
-
_kind
Description copied from interface:TaggedUnionGet the of the kind of variant held by this object.- Specified by:
_kindin interfaceTaggedUnion<ReasoningDetail.Kind,ReasoningDetailVariant> - Returns:
- the variant kind
-
_get
- Specified by:
_getin interfaceTaggedUnion<ReasoningDetail.Kind,ReasoningDetailVariant>
-
of
public static ReasoningDetail of(Function<ReasoningDetail.Builder, ObjectBuilder<ReasoningDetail>> fn) -
isReasoningEncrypted
public boolean isReasoningEncrypted()Is this variant instance of kindreasoning.encrypted? -
reasoningEncrypted
Get thereasoning.encryptedvariant value.- Throws:
IllegalStateException- if the current variant is not of thereasoning.encryptedkind.
-
isReasoningSummary
public boolean isReasoningSummary()Is this variant instance of kindreasoning.summary? -
reasoningSummary
Get thereasoning.summaryvariant value.- Throws:
IllegalStateException- if the current variant is not of thereasoning.summarykind.
-
isReasoningText
public boolean isReasoningText()Is this variant instance of kindreasoning.text? -
reasoningText
Get thereasoning.textvariant value.- Throws:
IllegalStateException- if the current variant is not of thereasoning.textkind.
-
serialize
- Specified by:
serializein interfaceJsonpSerializable
-
toString
-
setupReasoningDetailDeserializer
protected static void setupReasoningDetailDeserializer(ObjectDeserializer<ReasoningDetail.Builder> op)
-