Share via


KnowledgeSource Class

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

Implements

public class KnowledgeSource
implements JsonSerializable<KnowledgeSource>

Represents a knowledge source definition.

Constructor Summary

Constructor Description
KnowledgeSource(String name)

Creates an instance of KnowledgeSource class.

Method Summary

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

Reads an instance of KnowledgeSource from the JsonReader.

String getDescription()

Get the description property: Optional user-defined description.

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.

KnowledgeSourceKind getKind()

Get the kind property: The type of the knowledge source.

String getName()

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

KnowledgeSource setDescription(String description)

Set the description property: Optional user-defined description.

KnowledgeSource setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

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

KnowledgeSource setETag(String eTag)

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

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

KnowledgeSource

public KnowledgeSource(String name)

Creates an instance of KnowledgeSource class.

Parameters:

name - the name value to set.

Method Details

fromJson

public static KnowledgeSource fromJson(JsonReader jsonReader)

Reads an instance of KnowledgeSource from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of KnowledgeSource 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: Optional user-defined description.

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. This key is used to provide an additional level of encryption-at-rest for your knowledge base definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your knowledge base definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your knowledge base definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

Returns:

the encryptionKey value.

getETag

public String getETag()

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

Returns:

the eTag value.

getKind

public KnowledgeSourceKind getKind()

Get the kind property: The type of the knowledge source.

Returns:

the kind value.

getName

public String getName()

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

Returns:

the name value.

setDescription

public KnowledgeSource setDescription(String description)

Set the description property: Optional user-defined description.

Parameters:

description - the description value to set.

Returns:

the KnowledgeSource object itself.

setEncryptionKey

public KnowledgeSource setEncryptionKey(SearchResourceEncryptionKey encryptionKey)

Set the encryptionKey property: A description of an encryption key that you create in Azure Key Vault. This key is used to provide an additional level of encryption-at-rest for your knowledge base definition when you want full assurance that no one, not even Microsoft, can decrypt them. Once you have encrypted your knowledge base definition, it will always remain encrypted. The search service will ignore attempts to set this property to null. You can change this property as needed if you want to rotate your encryption key; Your knowledge base definition will be unaffected. Encryption with customer-managed keys is not available for free search services, and is only available for paid services created on or after January 1, 2019.

Parameters:

encryptionKey - the encryptionKey value to set.

Returns:

the KnowledgeSource object itself.

setETag

public KnowledgeSource setETag(String eTag)

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

Parameters:

eTag - the eTag value to set.

Returns:

the KnowledgeSource object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to