KnowledgeBase Class

  • java.lang.Object
    • com.azure.search.documents.indexes.models.KnowledgeBase

Implements

public final class KnowledgeBase
implements JsonSerializable<KnowledgeBase>

Represents a knowledge base definition.

Constructor Summary

Constructor Description
KnowledgeBase(String name, KnowledgeSourceReference[] knowledgeSources)

Creates an instance of KnowledgeBase class.

KnowledgeBase(String name, List<KnowledgeSourceReference> knowledgeSources)

Creates an instance of KnowledgeBase class.

Method Summary

Modifier and Type Method and Description
static KnowledgeBase fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeBase from the JsonReader.

String getDescription()

Get the description property: The description of the knowledge base.

SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

String getETag()

Get the eTag property: The ETag of the knowledge base.

List<KnowledgeSourceReference> getKnowledgeSources()

Get the knowledgeSources property: Knowledge sources referenced by this knowledge base.

List<KnowledgeBaseModel> getModels()

Get the models property: Contains configuration options on how to connect to AI models.

String getName()

Get the name property: The name of the knowledge base.

KnowledgeBase setDescription(String description)

Set the description property: The description of the knowledge base.

KnowledgeBase setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

KnowledgeBase setETag(String eTag)

Set the eTag property: The ETag of the knowledge base.

KnowledgeBase setModels(KnowledgeBaseModel[] models)

Set the models property: Contains configuration options on how to connect to AI models.

KnowledgeBase setModels(List<KnowledgeBaseModel> models)

Set the models property: Contains configuration options on how to connect to AI models.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KnowledgeBase

public KnowledgeBase(String name, KnowledgeSourceReference[] knowledgeSources)

Creates an instance of KnowledgeBase class.

Parameters:

name - the name value to set.
knowledgeSources - the knowledgeSources value to set.

KnowledgeBase

public KnowledgeBase(String name, List<KnowledgeSourceReference> knowledgeSources)

Creates an instance of KnowledgeBase class.

Parameters:

name - the name value to set.
knowledgeSources - the knowledgeSources value to set.

Method Details

fromJson

public static KnowledgeBase fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeBase from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KnowledgeBase if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getDescription

public String getDescription()

Get the description property: The description of the knowledge base.

Returns:

the description value.

getEncryptionKey

public SearchResourceEncryptionKey getEncryptionKey()

Get the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

Returns:

the encryptionKey value.

getETag

public String getETag()

Get the eTag property: The ETag of the knowledge base.

Returns:

the eTag value.

getKnowledgeSources

public List<KnowledgeSourceReference> getKnowledgeSources()

Get the knowledgeSources property: Knowledge sources referenced by this knowledge base.

Returns:

the knowledgeSources value.

getModels

public List<KnowledgeBaseModel> getModels()

Get the models property: Contains configuration options on how to connect to AI models.

Returns:

the models value.

getName

public String getName()

Get the name property: The name of the knowledge base.

Returns:

the name value.

setDescription

public KnowledgeBase setDescription(String description)

Set the description property: The description of the knowledge base.

Parameters:

description - the description value to set.

Returns:

the KnowledgeBase object itself.

setEncryptionKey

public KnowledgeBase setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault.

Parameters:

encryptionKey - the encryptionKey value to set.

Returns:

the KnowledgeBase object itself.

setETag

public KnowledgeBase setETag(String eTag)

Set the eTag property: The ETag of the knowledge base.

Parameters:

eTag - the eTag value to set.

Returns:

the KnowledgeBase object itself.

setModels

public KnowledgeBase setModels(KnowledgeBaseModel[] models)

Set the models property: Contains configuration options on how to connect to AI models.

Parameters:

models - the models value to set.

Returns:

the KnowledgeBase object itself.

setModels

public KnowledgeBase setModels(List<KnowledgeBaseModel> models)

Set the models property: Contains configuration options on how to connect to AI models.

Parameters:

models - the models value to set.

Returns:

the KnowledgeBase object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to