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 Details

    • KnowledgeBaseActivityRecord

      public KnowledgeBaseActivityRecord(int id)
      Creates an instance of KnowledgeBaseActivityRecord class.
      Parameters:
      id - the id value to set.
  • Method Details

    • getType

      public String 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

      public Integer getElapsedMs()
      Get the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.
      Returns:
      the elapsedMs value.
    • setElapsedMs

      public KnowledgeBaseActivityRecord setElapsedMs(Integer elapsedMs)
      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

      public KnowledgeBaseErrorDetail 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.