Class KnowledgebasesImpl
- java.lang.Object
-
- com.microsoft.azure.cognitiveservices.knowledge.qnamaker.implementation.KnowledgebasesImpl
-
- All Implemented Interfaces:
Knowledgebases
public class KnowledgebasesImpl extends Object implements Knowledgebases
An instance of this class provides access to all the operations defined in Knowledgebases.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.microsoft.azure.cognitiveservices.knowledge.qnamaker.Knowledgebases
Knowledgebases.KnowledgebasesDownloadDefinition, Knowledgebases.KnowledgebasesDownloadDefinitionStages, Knowledgebases.KnowledgebasesTrainDefinition, Knowledgebases.KnowledgebasesTrainDefinitionStages
-
-
Constructor Summary
Constructors Constructor Description KnowledgebasesImpl(retrofit2.Retrofit retrofit, QnAMakerClientImpl client)
Initializes an instance of KnowledgebasesImpl.
-
Method Summary
All Methods Instance Methods Concrete 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.com.microsoft.rest.ServiceFuture<Operation>
createAsync(CreateKbDTO createKbPayload, com.microsoft.rest.ServiceCallback<Operation> serviceCallback)
Asynchronous operation to create a new knowledgebase.rx.Observable<com.microsoft.rest.ServiceResponse<Operation>>
createWithServiceResponseAsync(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.com.microsoft.rest.ServiceFuture<Void>
deleteAsync(String kbId, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Deletes the knowledgebase and all its data.rx.Observable<com.microsoft.rest.ServiceResponse<Void>>
deleteWithServiceResponseAsync(String kbId)
Deletes the knowledgebase and all its data.com.microsoft.azure.cognitiveservices.knowledge.qnamaker.implementation.KnowledgebasesImpl.KnowledgebasesDownloadParameters
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.com.microsoft.rest.ServiceFuture<QnADocumentsDTO>
downloadAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter, com.microsoft.rest.ServiceCallback<QnADocumentsDTO> serviceCallback)
Download the knowledgebase.rx.Observable<com.microsoft.rest.ServiceResponse<QnADocumentsDTO>>
downloadWithServiceResponseAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.rx.Observable<com.microsoft.rest.ServiceResponse<QnADocumentsDTO>>
downloadWithServiceResponseAsync(String kbId, EnvironmentType environment, String source, String changedSince)
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).com.microsoft.rest.ServiceFuture<QnASearchResultList>
generateAnswerAsync(String kbId, QueryDTO generateAnswerPayload, com.microsoft.rest.ServiceCallback<QnASearchResultList> serviceCallback)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).rx.Observable<com.microsoft.rest.ServiceResponse<QnASearchResultList>>
generateAnswerWithServiceResponseAsync(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.com.microsoft.rest.ServiceFuture<KnowledgebaseDTO>
getDetailsAsync(String kbId, com.microsoft.rest.ServiceCallback<KnowledgebaseDTO> serviceCallback)
Gets details of a specific knowledgebase.rx.Observable<com.microsoft.rest.ServiceResponse<KnowledgebaseDTO>>
getDetailsWithServiceResponseAsync(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.com.microsoft.rest.ServiceFuture<KnowledgebasesDTO>
listAllAsync(com.microsoft.rest.ServiceCallback<KnowledgebasesDTO> serviceCallback)
Gets all knowledgebases for a user.rx.Observable<com.microsoft.rest.ServiceResponse<KnowledgebasesDTO>>
listAllWithServiceResponseAsync()
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.com.microsoft.rest.ServiceFuture<Void>
publishAsync(String kbId, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Publishes all changes in test index of a knowledgebase to its prod index.rx.Observable<com.microsoft.rest.ServiceResponse<Void>>
publishWithServiceResponseAsync(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.com.microsoft.rest.ServiceFuture<Void>
replaceAsync(String kbId, List<QnADTO> qnAList, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Replace knowledgebase contents.rx.Observable<com.microsoft.rest.ServiceResponse<Void>>
replaceWithServiceResponseAsync(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.com.microsoft.azure.cognitiveservices.knowledge.qnamaker.implementation.KnowledgebasesImpl.KnowledgebasesTrainParameters
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).com.microsoft.rest.ServiceFuture<Void>
trainAsync(String kbId, TrainOptionalParameter trainOptionalParameter, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Train call to add suggestions to knowledgebase (QnAMaker Managed).rx.Observable<com.microsoft.rest.ServiceResponse<Void>>
trainWithServiceResponseAsync(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).rx.Observable<com.microsoft.rest.ServiceResponse<Void>>
trainWithServiceResponseAsync(String kbId, List<FeedbackRecordDTO> feedbackRecords)
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.com.microsoft.rest.ServiceFuture<Operation>
updateAsync(String kbId, UpdateKbOperationDTO updateKb, com.microsoft.rest.ServiceCallback<Operation> serviceCallback)
Asynchronous operation to modify a knowledgebase.rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Operation,KnowledgebaseUpdateHeaders>>
updateWithServiceResponseAsync(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.
-
-
-
Constructor Detail
-
KnowledgebasesImpl
public KnowledgebasesImpl(retrofit2.Retrofit retrofit, QnAMakerClientImpl client)
Initializes an instance of KnowledgebasesImpl.- Parameters:
retrofit
- the Retrofit instance built from a Retrofit Builder.client
- the instance of the service client containing this operation class.
-
-
Method Detail
-
listAll
public KnowledgebasesDTO listAll()
Gets all knowledgebases for a user.- Specified by:
listAll
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<KnowledgebasesDTO> listAllAsync(com.microsoft.rest.ServiceCallback<KnowledgebasesDTO> serviceCallback)
Gets all knowledgebases for a user.- Parameters:
serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
listAllAsync
public rx.Observable<KnowledgebasesDTO> listAllAsync()
Gets all knowledgebases for a user.- Specified by:
listAllAsync
in interfaceKnowledgebases
- Returns:
- the observable to the KnowledgebasesDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
listAllWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<KnowledgebasesDTO>> listAllWithServiceResponseAsync()
Gets all knowledgebases for a user.- Returns:
- the observable to the KnowledgebasesDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
getDetails
public KnowledgebaseDTO getDetails(String kbId)
Gets details of a specific knowledgebase.- Specified by:
getDetails
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<KnowledgebaseDTO> getDetailsAsync(String kbId, com.microsoft.rest.ServiceCallback<KnowledgebaseDTO> serviceCallback)
Gets details of a specific knowledgebase.- Parameters:
kbId
- Knowledgebase id.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
getDetailsAsync
public rx.Observable<KnowledgebaseDTO> getDetailsAsync(String kbId)
Gets details of a specific knowledgebase.- Specified by:
getDetailsAsync
in interfaceKnowledgebases
- Parameters:
kbId
- Knowledgebase id.- Returns:
- the observable to the KnowledgebaseDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
getDetailsWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<KnowledgebaseDTO>> getDetailsWithServiceResponseAsync(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
public void delete(String kbId)
Deletes the knowledgebase and all its data.- Specified by:
delete
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Void> deleteAsync(String kbId, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Deletes the knowledgebase and all its data.- Parameters:
kbId
- Knowledgebase id.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
deleteAsync
public rx.Observable<Void> deleteAsync(String kbId)
Deletes the knowledgebase and all its data.- Specified by:
deleteAsync
in interfaceKnowledgebases
- Parameters:
kbId
- Knowledgebase id.- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
deleteWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Void>> deleteWithServiceResponseAsync(String kbId)
Deletes the knowledgebase and all its data.- Parameters:
kbId
- Knowledgebase id.- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
publish
public void publish(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.- Specified by:
publish
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Void> publishAsync(String kbId, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
Publishes all changes in test index of a knowledgebase to its prod index.- Parameters:
kbId
- Knowledgebase id.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
publishAsync
public rx.Observable<Void> publishAsync(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.- Specified by:
publishAsync
in interfaceKnowledgebases
- Parameters:
kbId
- Knowledgebase id.- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
publishWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Void>> publishWithServiceResponseAsync(String kbId)
Publishes all changes in test index of a knowledgebase to its prod index.- Parameters:
kbId
- Knowledgebase id.- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
replace
public void replace(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.- Specified by:
replace
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Void> replaceAsync(String kbId, List<QnADTO> qnAList, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
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.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
replaceAsync
public rx.Observable<Void> replaceAsync(String kbId, List<QnADTO> qnAList)
Replace knowledgebase contents.- Specified by:
replaceAsync
in interfaceKnowledgebases
- 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:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
replaceWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Void>> replaceWithServiceResponseAsync(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:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
update
public Operation update(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.- Specified by:
update
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Operation> updateAsync(String kbId, UpdateKbOperationDTO updateKb, com.microsoft.rest.ServiceCallback<Operation> serviceCallback)
Asynchronous operation to modify a knowledgebase.- Parameters:
kbId
- Knowledgebase id.updateKb
- Post body of the request.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
updateAsync
public rx.Observable<Operation> updateAsync(String kbId, UpdateKbOperationDTO updateKb)
Asynchronous operation to modify a knowledgebase.- Specified by:
updateAsync
in interfaceKnowledgebases
- 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
-
updateWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponseWithHeaders<Operation,KnowledgebaseUpdateHeaders>> updateWithServiceResponseAsync(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
public Operation create(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.- Specified by:
create
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Operation> createAsync(CreateKbDTO createKbPayload, com.microsoft.rest.ServiceCallback<Operation> serviceCallback)
Asynchronous operation to create a new knowledgebase.- Parameters:
createKbPayload
- Post body of the request.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
createAsync
public rx.Observable<Operation> createAsync(CreateKbDTO createKbPayload)
Asynchronous operation to create a new knowledgebase.- Specified by:
createAsync
in interfaceKnowledgebases
- Parameters:
createKbPayload
- Post body of the request.- Returns:
- the observable to the Operation object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
createWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Operation>> createWithServiceResponseAsync(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
public QnADocumentsDTO download(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.- Specified by:
download
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<QnADocumentsDTO> downloadAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter, com.microsoft.rest.ServiceCallback<QnADocumentsDTO> serviceCallback)
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 APIserviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
downloadAsync
public rx.Observable<QnADocumentsDTO> downloadAsync(String kbId, EnvironmentType environment, DownloadOptionalParameter downloadOptionalParameter)
Download the knowledgebase.- Specified by:
downloadAsync
in interfaceKnowledgebases
- 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
-
downloadWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<QnADocumentsDTO>> downloadWithServiceResponseAsync(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
-
downloadWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<QnADocumentsDTO>> downloadWithServiceResponseAsync(String kbId, EnvironmentType environment, String source, String changedSince)
Download the knowledgebase.- Parameters:
kbId
- Knowledgebase id.environment
- Specifies whether environment is Test or Prod. Possible values include: 'Prod', 'Test'source
- The source property filter to apply.changedSince
- The last changed status property filter to apply.- Returns:
- the observable to the QnADocumentsDTO object
- Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
download
public com.microsoft.azure.cognitiveservices.knowledge.qnamaker.implementation.KnowledgebasesImpl.KnowledgebasesDownloadParameters download()
Description copied from interface:Knowledgebases
Download the knowledgebase.- Specified by:
download
in interfaceKnowledgebases
- Returns:
- the first stage of the download call
-
generateAnswer
public QnASearchResultList generateAnswer(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).- Specified by:
generateAnswer
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<QnASearchResultList> generateAnswerAsync(String kbId, QueryDTO generateAnswerPayload, com.microsoft.rest.ServiceCallback<QnASearchResultList> serviceCallback)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).- Parameters:
kbId
- Knowledgebase id.generateAnswerPayload
- Post body of the request.serviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
generateAnswerAsync
public rx.Observable<QnASearchResultList> generateAnswerAsync(String kbId, QueryDTO generateAnswerPayload)
GenerateAnswer call to query knowledgebase (QnA Maker Managed).- Specified by:
generateAnswerAsync
in interfaceKnowledgebases
- 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
-
generateAnswerWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<QnASearchResultList>> generateAnswerWithServiceResponseAsync(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
public void train(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Specified by:
train
in interfaceKnowledgebases
- 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
public com.microsoft.rest.ServiceFuture<Void> trainAsync(String kbId, TrainOptionalParameter trainOptionalParameter, com.microsoft.rest.ServiceCallback<Void> serviceCallback)
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 APIserviceCallback
- the async ServiceCallback to handle successful and failed responses.- Returns:
- the
ServiceFuture
object - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
trainAsync
public rx.Observable<Void> trainAsync(String kbId, TrainOptionalParameter trainOptionalParameter)
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Specified by:
trainAsync
in interfaceKnowledgebases
- Parameters:
kbId
- Knowledgebase id.trainOptionalParameter
- the object representing the optional parameters to be set before calling this API- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
trainWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Void>> trainWithServiceResponseAsync(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:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
trainWithServiceResponseAsync
public rx.Observable<com.microsoft.rest.ServiceResponse<Void>> trainWithServiceResponseAsync(String kbId, List<FeedbackRecordDTO> feedbackRecords)
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Parameters:
kbId
- Knowledgebase id.feedbackRecords
- List of feedback records.- Returns:
- the
ServiceResponse
object if successful. - Throws:
IllegalArgumentException
- thrown if parameters fail the validation
-
train
public com.microsoft.azure.cognitiveservices.knowledge.qnamaker.implementation.KnowledgebasesImpl.KnowledgebasesTrainParameters train()
Description copied from interface:Knowledgebases
Train call to add suggestions to knowledgebase (QnAMaker Managed).- Specified by:
train
in interfaceKnowledgebases
- Returns:
- the first stage of the train call
-
-