Class KnowledgeBaseActivityRecord
java.lang.Object
com.azure.search.documents.knowledgebases.models.KnowledgeBaseActivityRecord
- All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>
- Direct Known Subclasses:
KnowledgeBaseAgenticReasoningActivityRecord, KnowledgeBaseModelAnswerSynthesisActivityRecord, KnowledgeBaseModelQueryPlanningActivityRecord, KnowledgeBaseRetrievalActivityRecord
public class KnowledgeBaseActivityRecord
extends Object
implements com.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>
Base type for activity records.
-
Constructor Summary
ConstructorsConstructorDescriptionKnowledgeBaseActivityRecord(int id) Creates an instance of KnowledgeBaseActivityRecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic KnowledgeBaseActivityRecordfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of KnowledgeBaseActivityRecord from the JsonReader.Get the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.getError()Get the error property: The error detail explaining why the operation failed.intgetId()Get the id property: The ID of the activity record.getType()Get the type property: The type of the activity record.setElapsedMs(Integer elapsedMs) Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.setError(KnowledgeBaseErrorDetail error) Set the error property: The error detail explaining why the operation failed.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
KnowledgeBaseActivityRecord
public KnowledgeBaseActivityRecord(int id) Creates an instance of KnowledgeBaseActivityRecord class.- Parameters:
id- the id value to set.
-
-
Method Details
-
getType
Get the type property: The type of the activity record.- Returns:
- the type value.
-
getId
public int getId()Get the id property: The ID of the activity record.- Returns:
- the id value.
-
getElapsedMs
Get the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.- Returns:
- the elapsedMs value.
-
setElapsedMs
Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.- Parameters:
elapsedMs- the elapsedMs value to set.- Returns:
- the KnowledgeBaseActivityRecord object itself.
-
getError
Get the error property: The error detail explaining why the operation failed. This property is only included when the activity does not succeed.- Returns:
- the error value.
-
setError
Set the error property: The error detail explaining why the operation failed. This property is only included when the activity does not succeed.- Parameters:
error- the error value to set.- Returns:
- the KnowledgeBaseActivityRecord object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>- Throws:
IOException
-
fromJson
public static KnowledgeBaseActivityRecord fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of KnowledgeBaseActivityRecord from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of KnowledgeBaseActivityRecord if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the KnowledgeBaseActivityRecord.
-