Interface Knowledgebases
-
- All Known Implementing Classes:
KnowledgebasesImpl
public interface Knowledgebases
An instance of this class provides access to all the operations defined in Knowledgebases.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Knowledgebases.KnowledgebasesDownloadDefinition
The entirety of download definition.static interface
Knowledgebases.KnowledgebasesDownloadDefinitionStages
Grouping of download definition stages.static interface
Knowledgebases.KnowledgebasesTrainDefinition
The entirety of train definition.static interface
Knowledgebases.KnowledgebasesTrainDefinitionStages
Grouping of train definition stages.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Operation
create(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.rx.Observable<Operation>
createAsync(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.void
delete(String kbId)
Deletes the knowledgebase and all its data.rx.Observable<Void>
deleteAsync(String kbId)
Deletes the knowledgebase and all its data.Knowledgebases.KnowledgebasesDownloadDefinitionStages.WithKbId
download()
Download the knowledgebase.QnADocumentsDTO
download(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.rx.Observable<QnADocumentsDTO>
downloadAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.QnASearchResultList
generateAnswer(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).rx.Observable<QnASearchResultList>
generateAnswerAsync(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).KnowledgebaseDTO
getDetails(String kbId)
Gets details of a specific knowledgebase.rx.Observable<KnowledgebaseDTO>
getDetailsAsync(String kbId)
Gets details of a specific knowledgebase.KnowledgebasesDTO
listAll()
Gets all knowledgebases for a user.rx.Observable<KnowledgebasesDTO>
listAllAsync()
Gets all knowledgebases for a user.void
publish(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.rx.Observable<Void>
publishAsync(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.void
replace(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.rx.Observable<Void>
replaceAsync(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.Knowledgebases.KnowledgebasesTrainDefinitionStages.WithKbId
train()
Train call to add suggestions to knowledgebase (QnAMaker Managed).void
train(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).rx.Observable<Void>
trainAsync(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).Operation
update(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.rx.Observable<Operation>
updateAsync(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.
-
-
-
Method Detail
-
listAll
KnowledgebasesDTO listAll()
Gets all knowledgebases for a user.- Returns:
- the KnowledgebasesDTO object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
listAllAsync
rx.Observable<KnowledgebasesDTO> listAllAsync()
Gets all knowledgebases for a user.- Returns:
- the observable to the KnowledgebasesDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
getDetails
KnowledgebaseDTO getDetails(String kbId)
Gets details of a specific knowledgebase.- Parameters:
kbId
- Knowledgebase id.- Returns:
- the KnowledgebaseDTO object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
getDetailsAsync
rx.Observable<KnowledgebaseDTO> getDetailsAsync(String kbId)
Gets details of a specific knowledgebase.- Parameters:
kbId
- Knowledgebase id.- Returns:
- the observable to the KnowledgebaseDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
delete
void delete(String kbId)
Deletes the knowledgebase and all its data.- Parameters:
kbId
- Knowledgebase id.- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
deleteAsync
rx.Observable<Void> deleteAsync(String kbId)
Deletes the knowledgebase and all its data.- Parameters:
kbId
- Knowledgebase id.- Returns:
- a representation of the deferred computation of this call if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
publish
void publish(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.- Parameters:
kbId
- Knowledgebase id.- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
publishAsync
rx.Observable<Void> publishAsync(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.- Parameters:
kbId
- Knowledgebase id.- Returns:
- a representation of the deferred computation of this call if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
replace
void replace(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.- Parameters:
kbId
- Knowledgebase id.qnAList
- List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
replaceAsync
rx.Observable<Void> replaceAsync(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.- Parameters:
kbId
- Knowledgebase id.qnAList
- List of Q-A (QnADTO) to be added to the knowledgebase. Q-A Ids are assigned by the service and should be omitted.- Returns:
- a representation of the deferred computation of this call if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
update
Operation update(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.- Parameters:
kbId
- Knowledgebase id.updateKb
- Post body of the request.- Returns:
- the Operation object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
updateAsync
rx.Observable<Operation> updateAsync(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.- Parameters:
kbId
- Knowledgebase id.updateKb
- Post body of the request.- Returns:
- the observable to the Operation object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
create
Operation create(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.- Parameters:
createKbPayload
- Post body of the request.- Returns:
- the Operation object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
createAsync
rx.Observable<Operation> createAsync(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.- Parameters:
createKbPayload
- Post body of the request.- Returns:
- the observable to the Operation object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
download
QnADocumentsDTO download(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.- Parameters:
kbId
- Knowledgebase id.environment
- Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'.downloadOptionalParameter
- the object representing the optional parameters to be set before calling this API- Returns:
- the QnADocumentsDTO object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
downloadAsync
rx.Observable<QnADocumentsDTO> downloadAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.- Parameters:
kbId
- Knowledgebase id.environment
- Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'.downloadOptionalParameter
- the object representing the optional parameters to be set before calling this API- Returns:
- the observable to the QnADocumentsDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
download
Knowledgebases.KnowledgebasesDownloadDefinitionStages.WithKbId download()
Download the knowledgebase.- Returns:
- the first stage of the download call
-
generateAnswer
QnASearchResultList generateAnswer(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).- Parameters:
kbId
- Knowledgebase id.generateAnswerPayload
- Post body of the request.- Returns:
- the QnASearchResultList object if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
generateAnswerAsync
rx.Observable<QnASearchResultList> generateAnswerAsync(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).- Parameters:
kbId
- Knowledgebase id.generateAnswerPayload
- Post body of the request.- Returns:
- the observable to the QnASearchResultList object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
train
void train(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Parameters:
kbId
- Knowledgebase id.trainOptionalParameter
- the object representing the optional parameters to be set before calling this API- Throws:
IllegalArgumentException
- thrown if parameters fail the validationErrorResponseException
- thrown if the request is rejected by serverRuntimeException
- all other wrapped checked exceptions if the request fails to be sent
-
trainAsync
rx.Observable<Void> trainAsync(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Parameters:
kbId
- Knowledgebase id.trainOptionalParameter
- the object representing the optional parameters to be set before calling this API- Returns:
- a representation of the deferred computation of this call if successful.
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
train
Knowledgebases.KnowledgebasesTrainDefinitionStages.WithKbId train()
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Returns:
- the first stage of the train call
-
-