/**
 * 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.EndpointKeysDTO;
import com.microsoft.azure.cognitiveservices.knowledge.qnamaker.models.ErrorResponseException;
import java.io.IOException;
import rx.Observable;

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

    /**
     * Gets endpoint keys for an endpoint.
     *
     * @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 EndpointKeysDTO object if successful.
     */
    EndpointKeysDTO getKeys();

    /**
     * Gets endpoint keys for an endpoint.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the EndpointKeysDTO object
     */
    Observable<EndpointKeysDTO> getKeysAsync();



    /**
     * Re-generates an endpoint key.
     *
     * @param keyType Type of Key.
     * @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 EndpointKeysDTO object if successful.
     */
    EndpointKeysDTO refreshKeys(String keyType);

    /**
     * Re-generates an endpoint key.
     *
     * @param keyType Type of Key.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the EndpointKeysDTO object
     */
    Observable<EndpointKeysDTO> refreshKeysAsync(String keyType);


}
