Class WebKnowledgeSourceParams

java.lang.Object
com.azure.search.documents.knowledgebases.models.KnowledgeSourceParams
com.azure.search.documents.knowledgebases.models.WebKnowledgeSourceParams
All Implemented Interfaces:
com.azure.json.JsonSerializable<KnowledgeSourceParams>

public final class WebKnowledgeSourceParams extends KnowledgeSourceParams
Specifies runtime parameters for a web knowledge source.
  • Constructor Details

    • WebKnowledgeSourceParams

      public WebKnowledgeSourceParams(String knowledgeSourceName)
      Creates an instance of WebKnowledgeSourceParams class.
      Parameters:
      knowledgeSourceName - the knowledgeSourceName value to set.
  • Method Details

    • getKind

      public KnowledgeSourceKind getKind()
      Get the kind property: The type of the knowledge source.
      Overrides:
      getKind in class KnowledgeSourceParams
      Returns:
      the kind value.
    • getLanguage

      public String getLanguage()
      Get the language property: The language of the web results.
      Returns:
      the language value.
    • setLanguage

      public WebKnowledgeSourceParams setLanguage(String language)
      Set the language property: The language of the web results.
      Parameters:
      language - the language value to set.
      Returns:
      the WebKnowledgeSourceParams object itself.
    • getMarket

      public String getMarket()
      Get the market property: The market of the web results.
      Returns:
      the market value.
    • setMarket

      public WebKnowledgeSourceParams setMarket(String market)
      Set the market property: The market of the web results.
      Parameters:
      market - the market value to set.
      Returns:
      the WebKnowledgeSourceParams object itself.
    • getCount

      public Integer getCount()
      Get the count property: The number of web results to return.
      Returns:
      the count value.
    • setCount

      public WebKnowledgeSourceParams setCount(Integer count)
      Set the count property: The number of web results to return.
      Parameters:
      count - the count value to set.
      Returns:
      the WebKnowledgeSourceParams object itself.
    • getFreshness

      public String getFreshness()
      Get the freshness property: The freshness of web results.
      Returns:
      the freshness value.
    • setFreshness

      public WebKnowledgeSourceParams setFreshness(String freshness)
      Set the freshness property: The freshness of web results.
      Parameters:
      freshness - the freshness value to set.
      Returns:
      the WebKnowledgeSourceParams object itself.
    • setIncludeReferences

      public WebKnowledgeSourceParams setIncludeReferences(Boolean includeReferences)
      Set the includeReferences property: Indicates whether references should be included for data retrieved from this source.
      Overrides:
      setIncludeReferences in class KnowledgeSourceParams
      Parameters:
      includeReferences - the includeReferences value to set.
      Returns:
      the KnowledgeSourceParams object itself.
    • setIncludeReferenceSourceData

      public WebKnowledgeSourceParams setIncludeReferenceSourceData(Boolean includeReferenceSourceData)
      Set the includeReferenceSourceData property: Indicates whether references should include the structured data obtained during retrieval in their payload.
      Overrides:
      setIncludeReferenceSourceData in class KnowledgeSourceParams
      Parameters:
      includeReferenceSourceData - the includeReferenceSourceData value to set.
      Returns:
      the KnowledgeSourceParams object itself.
    • setAlwaysQuerySource

      public WebKnowledgeSourceParams setAlwaysQuerySource(Boolean alwaysQuerySource)
      Set the alwaysQuerySource property: Indicates that this knowledge source should bypass source selection and always be queried at retrieval time.
      Overrides:
      setAlwaysQuerySource in class KnowledgeSourceParams
      Parameters:
      alwaysQuerySource - the alwaysQuerySource value to set.
      Returns:
      the KnowledgeSourceParams object itself.
    • setRerankerThreshold

      public WebKnowledgeSourceParams setRerankerThreshold(Float rerankerThreshold)
      Set the rerankerThreshold property: The reranker threshold all retrieved documents must meet to be included in the response.
      Overrides:
      setRerankerThreshold in class KnowledgeSourceParams
      Parameters:
      rerankerThreshold - the rerankerThreshold value to set.
      Returns:
      the KnowledgeSourceParams 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<KnowledgeSourceParams>
      Overrides:
      toJson in class KnowledgeSourceParams
      Throws:
      IOException
    • fromJson

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