/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.cognitiveservices.knowledge.qnamaker;

import com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models.AlterationsDTO;
import com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseException;
import com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models.WordAlterationsDTO;
import java.io.IOException;
import java.util.List;
import rx.Observable;

/**
 * An instance of this class provides access to all the operations defined
 * in Alterations.
 */
public interface Alterations {

    /**
     * Download alterations from runtime.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the WordAlterationsDTO object if successful.
     */
    WordAlterationsDTO get();

    /**
     * Download alterations from runtime.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WordAlterationsDTO object
     */
    Observable<WordAlterationsDTO> getAsync();



    /**
     * Replace alterations data.
     *
     * @param wordAlterations Collection of word alterations.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void replace(List<AlterationsDTO> wordAlterations);

    /**
     * Replace alterations data.
     *
     * @param wordAlterations Collection of word alterations.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> replaceAsync(List<AlterationsDTO> wordAlterations);



    /**
     * Download alterations per Knowledgebase (QnAMaker Managed).
     *
     * @param kbId Knowledgebase id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the WordAlterationsDTO object if successful.
     */
    WordAlterationsDTO getAlterationsForKb(String kbId);

    /**
     * Download alterations per Knowledgebase (QnAMaker Managed).
     *
     * @param kbId Knowledgebase id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the WordAlterationsDTO object
     */
    Observable<WordAlterationsDTO> getAlterationsForKbAsync(String kbId);



    /**
     * Replace alterations data per Knowledgebase (QnAMaker Managed).
     *
     * @param kbId Knowledgebase id.
     * @param wordAlterations Collection of word alterations.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void replaceAlterationsForKb(String kbId, List<AlterationsDTO> wordAlterations);

    /**
     * Replace alterations data per Knowledgebase (QnAMaker Managed).
     *
     * @param kbId Knowledgebase id.
     * @param wordAlterations Collection of word alterations.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> replaceAlterationsForKbAsync(String kbId, List<AlterationsDTO> wordAlterations);


}
