Class KnowledgeBaseRetrievalActivityRecord

java.lang.Object
com.azure.search.documents.knowledgebases.models.KnowledgeBaseActivityRecord
com.azure.search.documents.knowledgebases.models.KnowledgeBaseRetrievalActivityRecord
All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeBaseActivityRecord>
Direct Known Subclasses:
KnowledgeBaseAzureBlobActivityRecord, KnowledgeBaseIndexedOneLakeActivityRecord, KnowledgeBaseIndexedSharePointActivityRecord, KnowledgeBaseRemoteSharePointActivityRecord, KnowledgeBaseSearchIndexActivityRecord, KnowledgeBaseWebActivityRecord

public class KnowledgeBaseRetrievalActivityRecord extends KnowledgeBaseActivityRecord
Represents a retrieval activity record.
  • Constructor Details

    • KnowledgeBaseRetrievalActivityRecord

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

    • getType

      public String getType()
      Get the type property: The type of the activity record.
      Overrides:
      getType in class KnowledgeBaseActivityRecord
      Returns:
      the type value.
    • getKnowledgeSourceName

      public String getKnowledgeSourceName()
      Get the knowledgeSourceName property: The knowledge source for the retrieval activity.
      Returns:
      the knowledgeSourceName value.
    • setKnowledgeSourceName

      public KnowledgeBaseRetrievalActivityRecord setKnowledgeSourceName(String knowledgeSourceName)
      Set the knowledgeSourceName property: The knowledge source for the retrieval activity.
      Parameters:
      knowledgeSourceName - the knowledgeSourceName value to set.
      Returns:
      the KnowledgeBaseRetrievalActivityRecord object itself.
    • getQueryTime

      public OffsetDateTime getQueryTime()
      Get the queryTime property: The query time for this retrieval activity.
      Returns:
      the queryTime value.
    • setQueryTime

      public KnowledgeBaseRetrievalActivityRecord setQueryTime(OffsetDateTime queryTime)
      Set the queryTime property: The query time for this retrieval activity.
      Parameters:
      queryTime - the queryTime value to set.
      Returns:
      the KnowledgeBaseRetrievalActivityRecord object itself.
    • getCount

      public Integer getCount()
      Get the count property: The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.
      Returns:
      the count value.
    • setCount

      Set the count property: The count of documents retrieved that were sufficiently relevant to pass the reranker threshold.
      Parameters:
      count - the count value to set.
      Returns:
      the KnowledgeBaseRetrievalActivityRecord object itself.
    • setElapsedMs

      public KnowledgeBaseRetrievalActivityRecord setElapsedMs(Integer elapsedMs)
      Set the elapsedMs property: The elapsed time in milliseconds for the retrieval activity.
      Overrides:
      setElapsedMs in class KnowledgeBaseActivityRecord
      Parameters:
      elapsedMs - the elapsedMs value to set.
      Returns:
      the KnowledgeBaseActivityRecord object itself.
    • setError

      Set the error property: The error detail explaining why the operation failed. This property is only included when the activity does not succeed.
      Overrides:
      setError in class KnowledgeBaseActivityRecord
      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>
      Overrides:
      toJson in class KnowledgeBaseActivityRecord
      Throws:
      IOException
    • fromJson

      public static KnowledgeBaseRetrievalActivityRecord fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of KnowledgeBaseRetrievalActivityRecord from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of KnowledgeBaseRetrievalActivityRecord 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 KnowledgeBaseRetrievalActivityRecord.