/**
 * 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.language.luis.authoring;

import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.AddExamplesOptionalParameter;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.BatchOptionalParameter;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ListExamplesOptionalParameter;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.BatchLabelExample;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ExampleLabelObject;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.LabeledUtterance;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.LabelExampleResponse;
import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus;
import java.io.IOException;
import java.util.List;
import java.util.UUID;
import rx.Observable;

/**
 * An instance of this class provides access to all the operations defined
 * in Examples.
 */
public interface Examples {
    /**
     * Adds a labeled example utterance in a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleLabelObject A labeled example utterance with the expected intent and entities.
     * @param addOptionalParameter the object representing the optional parameters to be set before calling this API
     * @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 LabelExampleResponse object if successful.
     */
    LabelExampleResponse add(UUID appId, String versionId, ExampleLabelObject exampleLabelObject, AddExamplesOptionalParameter addOptionalParameter);

    /**
     * Adds a labeled example utterance in a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleLabelObject A labeled example utterance with the expected intent and entities.
     * @param addOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the LabelExampleResponse object
     */
    Observable<LabelExampleResponse> addAsync(UUID appId, String versionId, ExampleLabelObject exampleLabelObject, AddExamplesOptionalParameter addOptionalParameter);

    /**
     * Adds a labeled example utterance in a version of the application.
     *
     * @return the first stage of the add call
     */
    ExamplesAddDefinitionStages.WithAppId add();

    /**
     * Grouping of add definition stages.
     */
    interface ExamplesAddDefinitionStages {
        /**
         * The stage of the definition to be specify appId.
         */
        interface WithAppId {
            /**
             * The application ID.
             *
             * @return next definition stage
             */
            WithVersionId withAppId(UUID appId);
        }
        /**
         * The stage of the definition to be specify versionId.
         */
        interface WithVersionId {
            /**
             * The version ID.
             *
             * @return next definition stage
             */
            WithExampleLabelObject withVersionId(String versionId);
        }
        /**
         * The stage of the definition to be specify exampleLabelObject.
         */
        interface WithExampleLabelObject {
            /**
             * A labeled example utterance with the expected intent and entities.
             *
             * @return next definition stage
             */
            ExamplesAddDefinitionStages.WithExecute withExampleLabelObject(ExampleLabelObject exampleLabelObject);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Toggles nested/flat format.
             *
             * @return next definition stage
             */
            ExamplesAddDefinitionStages.WithExecute withEnableNestedChildren(Boolean enableNestedChildren);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends ExamplesAddDefinitionStages.WithAllOptions {
            /**
             * Execute the request.
             *
             * @return the LabelExampleResponse object if successful.
             */
            LabelExampleResponse execute();

            /**
             * Execute the request asynchronously.
             *
             * @return the observable to the LabelExampleResponse object
             */
            Observable<LabelExampleResponse> executeAsync();
        }
    }

    /**
     * The entirety of add definition.
     */
    interface ExamplesAddDefinition extends
        ExamplesAddDefinitionStages.WithAppId,
        ExamplesAddDefinitionStages.WithVersionId,
        ExamplesAddDefinitionStages.WithExampleLabelObject,
        ExamplesAddDefinitionStages.WithExecute {
    }

    /**
     * Adds a batch of labeled example utterances to a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleLabelObjectArray Array of example utterances.
     * @param batchOptionalParameter the object representing the optional parameters to be set before calling this API
     * @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 List&lt;BatchLabelExample&gt; object if successful.
     */
    List<BatchLabelExample> batch(UUID appId, String versionId, List<ExampleLabelObject> exampleLabelObjectArray, BatchOptionalParameter batchOptionalParameter);

    /**
     * Adds a batch of labeled example utterances to a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleLabelObjectArray Array of example utterances.
     * @param batchOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;BatchLabelExample&gt; object
     */
    Observable<List<BatchLabelExample>> batchAsync(UUID appId, String versionId, List<ExampleLabelObject> exampleLabelObjectArray, BatchOptionalParameter batchOptionalParameter);

    /**
     * Adds a batch of labeled example utterances to a version of the application.
     *
     * @return the first stage of the batch call
     */
    ExamplesBatchDefinitionStages.WithAppId batch();

    /**
     * Grouping of batch definition stages.
     */
    interface ExamplesBatchDefinitionStages {
        /**
         * The stage of the definition to be specify appId.
         */
        interface WithAppId {
            /**
             * The application ID.
             *
             * @return next definition stage
             */
            WithVersionId withAppId(UUID appId);
        }
        /**
         * The stage of the definition to be specify versionId.
         */
        interface WithVersionId {
            /**
             * The version ID.
             *
             * @return next definition stage
             */
            WithExampleLabelObjectArray withVersionId(String versionId);
        }
        /**
         * The stage of the definition to be specify exampleLabelObjectArray.
         */
        interface WithExampleLabelObjectArray {
            /**
             * Array of example utterances.
             *
             * @return next definition stage
             */
            ExamplesBatchDefinitionStages.WithExecute withExampleLabelObjectArray(List<ExampleLabelObject> exampleLabelObjectArray);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Toggles nested/flat format.
             *
             * @return next definition stage
             */
            ExamplesBatchDefinitionStages.WithExecute withEnableNestedChildren(Boolean enableNestedChildren);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends ExamplesBatchDefinitionStages.WithAllOptions {
            /**
             * Execute the request.
             *
             * @return the List&lt;BatchLabelExample&gt; object if successful.
             */
            List<BatchLabelExample> execute();

            /**
             * Execute the request asynchronously.
             *
             * @return the observable to the List&lt;BatchLabelExample&gt; object
             */
            Observable<List<BatchLabelExample>> executeAsync();
        }
    }

    /**
     * The entirety of batch definition.
     */
    interface ExamplesBatchDefinition extends
        ExamplesBatchDefinitionStages.WithAppId,
        ExamplesBatchDefinitionStages.WithVersionId,
        ExamplesBatchDefinitionStages.WithExampleLabelObjectArray,
        ExamplesBatchDefinitionStages.WithExecute {
    }

    /**
     * Returns example utterances to be reviewed from a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param listOptionalParameter the object representing the optional parameters to be set before calling this API
     * @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 List&lt;LabeledUtterance&gt; object if successful.
     */
    List<LabeledUtterance> list(UUID appId, String versionId, ListExamplesOptionalParameter listOptionalParameter);

    /**
     * Returns example utterances to be reviewed from a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param listOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;LabeledUtterance&gt; object
     */
    Observable<List<LabeledUtterance>> listAsync(UUID appId, String versionId, ListExamplesOptionalParameter listOptionalParameter);

    /**
     * Returns example utterances to be reviewed from a version of the application.
     *
     * @return the first stage of the list call
     */
    ExamplesListDefinitionStages.WithAppId list();

    /**
     * Grouping of list definition stages.
     */
    interface ExamplesListDefinitionStages {
        /**
         * The stage of the definition to be specify appId.
         */
        interface WithAppId {
            /**
             * The application ID.
             *
             * @return next definition stage
             */
            WithVersionId withAppId(UUID appId);
        }
        /**
         * The stage of the definition to be specify versionId.
         */
        interface WithVersionId {
            /**
             * The version ID.
             *
             * @return next definition stage
             */
            ExamplesListDefinitionStages.WithExecute withVersionId(String versionId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The number of entries to skip. Default value is 0.
             *
             * @return next definition stage
             */
            ExamplesListDefinitionStages.WithExecute withSkip(Integer skip);

            /**
             * The number of entries to return. Maximum page size is 500. Default is 100.
             *
             * @return next definition stage
             */
            ExamplesListDefinitionStages.WithExecute withTake(Integer take);

            /**
             * Toggles nested/flat format.
             *
             * @return next definition stage
             */
            ExamplesListDefinitionStages.WithExecute withEnableNestedChildren(Boolean enableNestedChildren);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends ExamplesListDefinitionStages.WithAllOptions {
            /**
             * Execute the request.
             *
             * @return the List&lt;LabeledUtterance&gt; object if successful.
             */
            List<LabeledUtterance> execute();

            /**
             * Execute the request asynchronously.
             *
             * @return the observable to the List&lt;LabeledUtterance&gt; object
             */
            Observable<List<LabeledUtterance>> executeAsync();
        }
    }

    /**
     * The entirety of list definition.
     */
    interface ExamplesListDefinition extends
        ExamplesListDefinitionStages.WithAppId,
        ExamplesListDefinitionStages.WithVersionId,
        ExamplesListDefinitionStages.WithExecute {
    }


    /**
     * Deletes the labeled example utterances with the specified ID from a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleId The example 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 OperationStatus object if successful.
     */
    OperationStatus delete(UUID appId, String versionId, int exampleId);

    /**
     * Deletes the labeled example utterances with the specified ID from a version of the application.
     *
     * @param appId The application ID.
     * @param versionId The version ID.
     * @param exampleId The example ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the OperationStatus object
     */
    Observable<OperationStatus> deleteAsync(UUID appId, String versionId, int exampleId);


}
