Interface Knowledgebases

  • All Known Implementing Classes:
    KnowledgebasesImpl

    public interface Knowledgebases
    An instance of this class provides access to all the operations defined in Knowledgebases.
    • Method Detail

      • 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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
      • 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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
      • 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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 validation
        ErrorResponseException - thrown if the request is rejected by server
        RuntimeException - 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