Class KnowledgeBaseReference

java.lang.Object
com.azure.search.documents.knowledgebases.models.KnowledgeBaseReference
All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeBaseReference>
Direct Known Subclasses:
KnowledgeBaseAzureBlobReference, KnowledgeBaseIndexedOneLakeReference, KnowledgeBaseIndexedSharePointReference, KnowledgeBaseRemoteSharePointReference, KnowledgeBaseSearchIndexReference, KnowledgeBaseWebReference

public class KnowledgeBaseReference extends Object implements com.azure.json.JsonSerializable<KnowledgeBaseReference>
Base type for references.
  • Constructor Details

    • KnowledgeBaseReference

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

    • getType

      public String getType()
      Get the type property: The type of the reference.
      Returns:
      the type value.
    • getId

      public String getId()
      Get the id property: The ID of the reference.
      Returns:
      the id value.
    • getActivitySource

      public int getActivitySource()
      Get the activitySource property: The source activity ID for the reference.
      Returns:
      the activitySource value.
    • getSourceData

      public Map<String,Object> getSourceData()
      Get the sourceData property: Dictionary of <any>.
      Returns:
      the sourceData value.
    • setSourceData

      public KnowledgeBaseReference setSourceData(Map<String,Object> sourceData)
      Set the sourceData property: Dictionary of <any>.
      Parameters:
      sourceData - the sourceData value to set.
      Returns:
      the KnowledgeBaseReference object itself.
    • getRerankerScore

      public Float getRerankerScore()
      Get the rerankerScore property: The reranker score for the document reference.
      Returns:
      the rerankerScore value.
    • setRerankerScore

      public KnowledgeBaseReference setRerankerScore(Float rerankerScore)
      Set the rerankerScore property: The reranker score for the document reference.
      Parameters:
      rerankerScore - the rerankerScore value to set.
      Returns:
      the KnowledgeBaseReference 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<KnowledgeBaseReference>
      Throws:
      IOException
    • fromJson

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