/**
 * 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.vision.customvision.training;

import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CreateImageRegionsOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CreateImageTagsOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CreateImagesFromDataOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CreateProjectOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CreateTagOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Domain;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Export;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ExportIterationOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetImagePerformanceCountOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetImagePerformancesOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetImagesByIdsOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetIterationPerformanceOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetTagOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetTaggedImageCountOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetTaggedImagesOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetTagsOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetUntaggedImageCountOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.GetUntaggedImagesOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Image;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageFileCreateBatch;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageIdCreateBatch;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImagePerformance;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImagePrediction;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateEntry;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateSummary;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageRegionProposal;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateSummary;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.ImageUrlCreateBatch;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Iteration;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.IterationPerformance;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.PredictionQueryResult;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.PredictionQueryToken;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Project;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.QuickTestImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.QuickTestImageUrlOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.Tag;
import com.microsoft.azure.cognitiveservices.vision.customvision.training.models.TrainProjectOptionalParameter;
import rx.Observable;

import java.util.List;
import java.util.UUID;

/**
 * An instance of this class provides access to all the operations defined
 * in Trainings.
 */
public interface Trainings {
    /**
     * Create a tag for the project.
     *
     * @param projectId The project id.
     * @param name The tag name.
     * @param createTagOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Tag object if successful.
     */
    Tag createTag(UUID projectId, String name, CreateTagOptionalParameter createTagOptionalParameter);

    /**
     * Create a tag for the project.
     *
     * @param projectId The project id.
     * @param name The tag name.
     * @param createTagOptionalParameter 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 Tag object
     */
    Observable<Tag> createTagAsync(UUID projectId, String name, CreateTagOptionalParameter createTagOptionalParameter);

    /**
     * Create a tag for the project.
     *
     * @return the first stage of the createTag call
     */
    TrainingsCreateTagDefinitionStages.WithProjectId createTag();

    /**
     * Grouping of createTag definition stages.
     */
    interface TrainingsCreateTagDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify name.
         */
        interface WithName {
            /**
             * The tag name.
             *
             * @return next definition stage
             */
            TrainingsCreateTagDefinitionStages.WithExecute withName(String name);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional description for the tag.
             *
             * @return next definition stage
             */
            TrainingsCreateTagDefinitionStages.WithExecute withDescription(String description);

            /**
             * Optional type for the tag. Possible values include: 'Regular', 'Negative'.
             *
             * @return next definition stage
             */
            TrainingsCreateTagDefinitionStages.WithExecute withType(String type);

        }

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

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

    /**
     * The entirety of createTag definition.
     */
    interface TrainingsCreateTagDefinition extends
        TrainingsCreateTagDefinitionStages.WithProjectId,
        TrainingsCreateTagDefinitionStages.WithName,
        TrainingsCreateTagDefinitionStages.WithExecute {
    }

    /**
     * Get the tags for a given project and iteration.
     *
     * @param projectId The project id.
     * @param getTagsOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Tag&gt; object if successful.
     */
    List<Tag> getTags(UUID projectId, GetTagsOptionalParameter getTagsOptionalParameter);

    /**
     * Get the tags for a given project and iteration.
     *
     * @param projectId The project id.
     * @param getTagsOptionalParameter 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;Tag&gt; object
     */
    Observable<List<Tag>> getTagsAsync(UUID projectId, GetTagsOptionalParameter getTagsOptionalParameter);

    /**
     * Get the tags for a given project and iteration.
     *
     * @return the first stage of the getTags call
     */
    TrainingsGetTagsDefinitionStages.WithProjectId getTags();

    /**
     * Grouping of getTags definition stages.
     */
    interface TrainingsGetTagsDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetTagsDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetTagsDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of getTags definition.
     */
    interface TrainingsGetTagsDefinition extends
        TrainingsGetTagsDefinitionStages.WithProjectId,
        TrainingsGetTagsDefinitionStages.WithExecute {
    }


    /**
     * Update a tag.
     *
     * @param projectId The project id.
     * @param tagId The id of the target tag.
     * @param updatedTag The updated tag model.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Tag object if successful.
     */
    Tag updateTag(UUID projectId, UUID tagId, Tag updatedTag);

    /**
     * Update a tag.
     *
     * @param projectId The project id.
     * @param tagId The id of the target tag.
     * @param updatedTag The updated tag model.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Tag object
     */
    Observable<Tag> updateTagAsync(UUID projectId, UUID tagId, Tag updatedTag);



    /**
     * Delete a tag from the project.
     *
     * @param projectId The project id.
     * @param tagId Id of the tag to be deleted.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteTag(UUID projectId, UUID tagId);

    /**
     * Delete a tag from the project.
     *
     * @param projectId The project id.
     * @param tagId Id of the tag to be deleted.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteTagAsync(UUID projectId, UUID tagId);


    /**
     * Get information about a specific tag.
     *
     * @param projectId The project this tag belongs to.
     * @param tagId The tag id.
     * @param getTagOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Tag object if successful.
     */
    Tag getTag(UUID projectId, UUID tagId, GetTagOptionalParameter getTagOptionalParameter);

    /**
     * Get information about a specific tag.
     *
     * @param projectId The project this tag belongs to.
     * @param tagId The tag id.
     * @param getTagOptionalParameter 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 Tag object
     */
    Observable<Tag> getTagAsync(UUID projectId, UUID tagId, GetTagOptionalParameter getTagOptionalParameter);

    /**
     * Get information about a specific tag.
     *
     * @return the first stage of the getTag call
     */
    TrainingsGetTagDefinitionStages.WithProjectId getTag();

    /**
     * Grouping of getTag definition stages.
     */
    interface TrainingsGetTagDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project this tag belongs to.
             *
             * @return next definition stage
             */
            WithTagId withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify tagId.
         */
        interface WithTagId {
            /**
             * The tag id.
             *
             * @return next definition stage
             */
            TrainingsGetTagDefinitionStages.WithExecute withTagId(UUID tagId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration to retrieve this tag from. Optional, defaults to current training set.
             *
             * @return next definition stage
             */
            TrainingsGetTagDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of getTag definition.
     */
    interface TrainingsGetTagDefinition extends
        TrainingsGetTagDefinitionStages.WithProjectId,
        TrainingsGetTagDefinitionStages.WithTagId,
        TrainingsGetTagDefinitionStages.WithExecute {
    }

    /**
     * Export a trained iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK'.
     * @param exportIterationOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Export object if successful.
     */
    Export exportIteration(UUID projectId, UUID iterationId, String platform, ExportIterationOptionalParameter exportIterationOptionalParameter);

    /**
     * Export a trained iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @param platform The target platform. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK'.
     * @param exportIterationOptionalParameter 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 Export object
     */
    Observable<Export> exportIterationAsync(UUID projectId, UUID iterationId, String platform, ExportIterationOptionalParameter exportIterationOptionalParameter);

    /**
     * Export a trained iteration.
     *
     * @return the first stage of the exportIteration call
     */
    TrainingsExportIterationDefinitionStages.WithProjectId exportIteration();

    /**
     * Grouping of exportIteration definition stages.
     */
    interface TrainingsExportIterationDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithIterationId withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify iterationId.
         */
        interface WithIterationId {
            /**
             * The iteration id.
             *
             * @return next definition stage
             */
            WithPlatform withIterationId(UUID iterationId);
        }
        /**
         * The stage of the definition to be specify platform.
         */
        interface WithPlatform {
            /**
             * The target platform. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', 'VAIDK'.
             *
             * @return next definition stage
             */
            TrainingsExportIterationDefinitionStages.WithExecute withPlatform(String platform);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The flavor of the target platform. Possible values include: 'Linux', 'Windows', 'ONNX10', 'ONNX12', 'ARM'.
             *
             * @return next definition stage
             */
            TrainingsExportIterationDefinitionStages.WithExecute withFlavor(String flavor);

        }

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

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

    /**
     * The entirety of exportIteration definition.
     */
    interface TrainingsExportIterationDefinition extends
        TrainingsExportIterationDefinitionStages.WithProjectId,
        TrainingsExportIterationDefinitionStages.WithIterationId,
        TrainingsExportIterationDefinitionStages.WithPlatform,
        TrainingsExportIterationDefinitionStages.WithExecute {
    }


    /**
     * Get the list of exports for a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Export&gt; object if successful.
     */
    List<Export> getExports(UUID projectId, UUID iterationId);

    /**
     * Get the list of exports for a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;Export&gt; object
     */
    Observable<List<Export>> getExportsAsync(UUID projectId, UUID iterationId);



    /**
     * Unpublish a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void unpublishIteration(UUID projectId, UUID iterationId);

    /**
     * Unpublish a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> unpublishIterationAsync(UUID projectId, UUID iterationId);



    /**
     * Publish a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @param publishName The name to give the published iteration.
     * @param predictionId The id of the prediction resource to publish to.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the boolean object if successful.
     */
    boolean publishIteration(UUID projectId, UUID iterationId, String publishName, String predictionId);

    /**
     * Publish a specific iteration.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @param publishName The name to give the published iteration.
     * @param predictionId The id of the prediction resource to publish to.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the boolean object
     */
    Observable<Boolean> publishIterationAsync(UUID projectId, UUID iterationId, String publishName, String predictionId);



    /**
     * Update a specific iteration.
     *
     * @param projectId Project id.
     * @param iterationId Iteration id.
     * @param name Gets or sets the name of the iteration.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Iteration object if successful.
     */
    Iteration updateIteration(UUID projectId, UUID iterationId, String name);

    /**
     * Update a specific iteration.
     *
     * @param projectId Project id.
     * @param iterationId Iteration id.
     * @param name Gets or sets the name of the iteration.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Iteration object
     */
    Observable<Iteration> updateIterationAsync(UUID projectId, UUID iterationId, String name);



    /**
     * Delete a specific iteration of a project.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteIteration(UUID projectId, UUID iterationId);

    /**
     * Delete a specific iteration of a project.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteIterationAsync(UUID projectId, UUID iterationId);



    /**
     * Get a specific iteration.
     *
     * @param projectId The id of the project the iteration belongs to.
     * @param iterationId The id of the iteration to get.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Iteration object if successful.
     */
    Iteration getIteration(UUID projectId, UUID iterationId);

    /**
     * Get a specific iteration.
     *
     * @param projectId The id of the project the iteration belongs to.
     * @param iterationId The id of the iteration to get.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Iteration object
     */
    Observable<Iteration> getIterationAsync(UUID projectId, UUID iterationId);



    /**
     * Get iterations for the project.
     *
     * @param projectId The project id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Iteration&gt; object if successful.
     */
    List<Iteration> getIterations(UUID projectId);

    /**
     * Get iterations for the project.
     *
     * @param projectId The project id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;Iteration&gt; object
     */
    Observable<List<Iteration>> getIterationsAsync(UUID projectId);


    /**
     * Queues project for training.
     *
     * @param projectId The project id.
     * @param trainProjectOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Iteration object if successful.
     */
    Iteration trainProject(UUID projectId, TrainProjectOptionalParameter trainProjectOptionalParameter);

    /**
     * Queues project for training.
     *
     * @param projectId The project id.
     * @param trainProjectOptionalParameter 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 Iteration object
     */
    Observable<Iteration> trainProjectAsync(UUID projectId, TrainProjectOptionalParameter trainProjectOptionalParameter);

    /**
     * Queues project for training.
     *
     * @return the first stage of the trainProject call
     */
    TrainingsTrainProjectDefinitionStages.WithProjectId trainProject();

    /**
     * Grouping of trainProject definition stages.
     */
    interface TrainingsTrainProjectDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsTrainProjectDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The type of training to use to train the project (default: Regular). Possible values include: 'Regular',
             *   'Advanced'.
             *
             * @return next definition stage
             */
            TrainingsTrainProjectDefinitionStages.WithExecute withTrainingType(String trainingType);

            /**
             * The number of hours reserved as budget for training (if applicable).
             *
             * @return next definition stage
             */
            TrainingsTrainProjectDefinitionStages.WithExecute withReservedBudgetInHours(Integer reservedBudgetInHours);

            /**
             * Whether to force train even if dataset and configuration does not change (default: false).
             *
             * @return next definition stage
             */
            TrainingsTrainProjectDefinitionStages.WithExecute withForceTrain(Boolean forceTrain);

            /**
             * The email address to send notification to when training finishes (default: null).
             *
             * @return next definition stage
             */
            TrainingsTrainProjectDefinitionStages.WithExecute withNotificationEmailAddress(String notificationEmailAddress);

        }

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

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

    /**
     * The entirety of trainProject definition.
     */
    interface TrainingsTrainProjectDefinition extends
        TrainingsTrainProjectDefinitionStages.WithProjectId,
        TrainingsTrainProjectDefinitionStages.WithExecute {
    }


    /**
     * Update a specific project.
     *
     * @param projectId The id of the project to update.
     * @param updatedProject The updated project model.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Project object if successful.
     */
    Project updateProject(UUID projectId, Project updatedProject);

    /**
     * Update a specific project.
     *
     * @param projectId The id of the project to update.
     * @param updatedProject The updated project model.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Project object
     */
    Observable<Project> updateProjectAsync(UUID projectId, Project updatedProject);



    /**
     * Delete a specific project.
     *
     * @param projectId The project id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteProject(UUID projectId);

    /**
     * Delete a specific project.
     *
     * @param projectId The project id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteProjectAsync(UUID projectId);



    /**
     * Get a specific project.
     *
     * @param projectId The id of the project to get.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Project object if successful.
     */
    Project getProject(UUID projectId);

    /**
     * Get a specific project.
     *
     * @param projectId The id of the project to get.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Project object
     */
    Observable<Project> getProjectAsync(UUID projectId);


    /**
     * Create a project.
     *
     * @param name Name of the project.
     * @param createProjectOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Project object if successful.
     */
    Project createProject(String name, CreateProjectOptionalParameter createProjectOptionalParameter);

    /**
     * Create a project.
     *
     * @param name Name of the project.
     * @param createProjectOptionalParameter 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 Project object
     */
    Observable<Project> createProjectAsync(String name, CreateProjectOptionalParameter createProjectOptionalParameter);

    /**
     * Create a project.
     *
     * @return the first stage of the createProject call
     */
    TrainingsCreateProjectDefinitionStages.WithName createProject();

    /**
     * Grouping of createProject definition stages.
     */
    interface TrainingsCreateProjectDefinitionStages {
        /**
         * The stage of the definition to be specify name.
         */
        interface WithName {
            /**
             * Name of the project.
             *
             * @return next definition stage
             */
            TrainingsCreateProjectDefinitionStages.WithExecute withName(String name);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The description of the project.
             *
             * @return next definition stage
             */
            TrainingsCreateProjectDefinitionStages.WithExecute withDescription(String description);

            /**
             * The id of the domain to use for this project. Defaults to General.
             *
             * @return next definition stage
             */
            TrainingsCreateProjectDefinitionStages.WithExecute withDomainId(UUID domainId);

            /**
             * The type of classifier to create for this project. Possible values include: 'Multiclass', 'Multilabel'.
             *
             * @return next definition stage
             */
            TrainingsCreateProjectDefinitionStages.WithExecute withClassificationType(String classificationType);

            /**
             * List of platforms the trained model is intending exporting to.
             *
             * @return next definition stage
             */
            TrainingsCreateProjectDefinitionStages.WithExecute withTargetExportPlatforms(List<String> targetExportPlatforms);

        }

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

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

    /**
     * The entirety of createProject definition.
     */
    interface TrainingsCreateProjectDefinition extends
        TrainingsCreateProjectDefinitionStages.WithName,
        TrainingsCreateProjectDefinitionStages.WithExecute {
    }


    /**
     * Get your projects.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Project&gt; object if successful.
     */
    List<Project> getProjects();

    /**
     * Get your projects.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;Project&gt; object
     */
    Observable<List<Project>> getProjectsAsync();


    /**
     * Gets the number of images tagged with the provided {tagIds} that have prediction results from
     *   training for the provided iteration {iterationId}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id. Defaults to workspace.
     * @param getImagePerformanceCountOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the int object if successful.
     */
    int getImagePerformanceCount(UUID projectId, UUID iterationId, GetImagePerformanceCountOptionalParameter getImagePerformanceCountOptionalParameter);

    /**
     * Gets the number of images tagged with the provided {tagIds} that have prediction results from
     *   training for the provided iteration {iterationId}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id. Defaults to workspace.
     * @param getImagePerformanceCountOptionalParameter 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 int object
     */
    Observable<Integer> getImagePerformanceCountAsync(UUID projectId, UUID iterationId, GetImagePerformanceCountOptionalParameter getImagePerformanceCountOptionalParameter);

    /**
     * Gets the number of images tagged with the provided {tagIds} that have prediction results from
     *   training for the provided iteration {iterationId}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @return the first stage of the getImagePerformanceCount call
     */
    TrainingsGetImagePerformanceCountDefinitionStages.WithProjectId getImagePerformanceCount();

    /**
     * Grouping of getImagePerformanceCount definition stages.
     */
    interface TrainingsGetImagePerformanceCountDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithIterationId withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify iterationId.
         */
        interface WithIterationId {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformanceCountDefinitionStages.WithExecute withIterationId(UUID iterationId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * A list of tags ids to filter the images to count. Defaults to all tags when null.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformanceCountDefinitionStages.WithExecute withTagIds(List<UUID> tagIds);

        }

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

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

    /**
     * The entirety of getImagePerformanceCount definition.
     */
    interface TrainingsGetImagePerformanceCountDefinition extends
        TrainingsGetImagePerformanceCountDefinitionStages.WithProjectId,
        TrainingsGetImagePerformanceCountDefinitionStages.WithIterationId,
        TrainingsGetImagePerformanceCountDefinitionStages.WithExecute {
    }

    /**
     * Get image with its prediction for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id. Defaults to workspace.
     * @param getImagePerformancesOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;ImagePerformance&gt; object if successful.
     */
    List<ImagePerformance> getImagePerformances(UUID projectId, UUID iterationId, GetImagePerformancesOptionalParameter getImagePerformancesOptionalParameter);

    /**
     * Get image with its prediction for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param iterationId The iteration id. Defaults to workspace.
     * @param getImagePerformancesOptionalParameter 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;ImagePerformance&gt; object
     */
    Observable<List<ImagePerformance>> getImagePerformancesAsync(UUID projectId, UUID iterationId, GetImagePerformancesOptionalParameter getImagePerformancesOptionalParameter);

    /**
     * Get image with its prediction for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @return the first stage of the getImagePerformances call
     */
    TrainingsGetImagePerformancesDefinitionStages.WithProjectId getImagePerformances();

    /**
     * Grouping of getImagePerformances definition stages.
     */
    interface TrainingsGetImagePerformancesDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithIterationId withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify iterationId.
         */
        interface WithIterationId {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformancesDefinitionStages.WithExecute withIterationId(UUID iterationId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformancesDefinitionStages.WithExecute withTagIds(List<UUID> tagIds);

            /**
             * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest'.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformancesDefinitionStages.WithExecute withOrderBy(String orderBy);

            /**
             * Maximum number of images to return. Defaults to 50, limited to 256.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformancesDefinitionStages.WithExecute withTake(Integer take);

            /**
             * Number of images to skip before beginning the image batch. Defaults to 0.
             *
             * @return next definition stage
             */
            TrainingsGetImagePerformancesDefinitionStages.WithExecute withSkip(Integer skip);

        }

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

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

    /**
     * The entirety of getImagePerformances definition.
     */
    interface TrainingsGetImagePerformancesDefinition extends
        TrainingsGetImagePerformancesDefinitionStages.WithProjectId,
        TrainingsGetImagePerformancesDefinitionStages.WithIterationId,
        TrainingsGetImagePerformancesDefinitionStages.WithExecute {
    }

    /**
     * Get detailed performance information about an iteration.
     *
     * @param projectId The id of the project the iteration belongs to.
     * @param iterationId The id of the iteration to get.
     * @param getIterationPerformanceOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the IterationPerformance object if successful.
     */
    IterationPerformance getIterationPerformance(UUID projectId, UUID iterationId, GetIterationPerformanceOptionalParameter getIterationPerformanceOptionalParameter);

    /**
     * Get detailed performance information about an iteration.
     *
     * @param projectId The id of the project the iteration belongs to.
     * @param iterationId The id of the iteration to get.
     * @param getIterationPerformanceOptionalParameter 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 IterationPerformance object
     */
    Observable<IterationPerformance> getIterationPerformanceAsync(UUID projectId, UUID iterationId, GetIterationPerformanceOptionalParameter getIterationPerformanceOptionalParameter);

    /**
     * Get detailed performance information about an iteration.
     *
     * @return the first stage of the getIterationPerformance call
     */
    TrainingsGetIterationPerformanceDefinitionStages.WithProjectId getIterationPerformance();

    /**
     * Grouping of getIterationPerformance definition stages.
     */
    interface TrainingsGetIterationPerformanceDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The id of the project the iteration belongs to.
             *
             * @return next definition stage
             */
            WithIterationId withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify iterationId.
         */
        interface WithIterationId {
            /**
             * The id of the iteration to get.
             *
             * @return next definition stage
             */
            TrainingsGetIterationPerformanceDefinitionStages.WithExecute withIterationId(UUID iterationId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The threshold used to determine true predictions.
             *
             * @return next definition stage
             */
            TrainingsGetIterationPerformanceDefinitionStages.WithExecute withThreshold(Double threshold);

            /**
             * If applicable, the bounding box overlap threshold used to determine true predictions.
             *
             * @return next definition stage
             */
            TrainingsGetIterationPerformanceDefinitionStages.WithExecute withOverlapThreshold(Double overlapThreshold);

        }

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

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

    /**
     * The entirety of getIterationPerformance definition.
     */
    interface TrainingsGetIterationPerformanceDefinition extends
        TrainingsGetIterationPerformanceDefinitionStages.WithProjectId,
        TrainingsGetIterationPerformanceDefinitionStages.WithIterationId,
        TrainingsGetIterationPerformanceDefinitionStages.WithExecute {
    }


    /**
     * Get images that were sent to your prediction endpoint.
     *
     * @param projectId The project id.
     * @param query Parameters used to query the predictions. Limited to combining 2 tags.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the PredictionQueryResult object if successful.
     */
    PredictionQueryResult queryPredictions(UUID projectId, PredictionQueryToken query);

    /**
     * Get images that were sent to your prediction endpoint.
     *
     * @param projectId The project id.
     * @param query Parameters used to query the predictions. Limited to combining 2 tags.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the PredictionQueryResult object
     */
    Observable<PredictionQueryResult> queryPredictionsAsync(UUID projectId, PredictionQueryToken query);


    /**
     * Quick test an image.
     *
     * @param projectId The project id.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
     * @param quickTestImageOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImagePrediction object if successful.
     */
    ImagePrediction quickTestImage(UUID projectId, byte[] imageData, QuickTestImageOptionalParameter quickTestImageOptionalParameter);

    /**
     * Quick test an image.
     *
     * @param projectId The project id.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
     * @param quickTestImageOptionalParameter 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 ImagePrediction object
     */
    Observable<ImagePrediction> quickTestImageAsync(UUID projectId, byte[] imageData, QuickTestImageOptionalParameter quickTestImageOptionalParameter);

    /**
     * Quick test an image.
     *
     * @return the first stage of the quickTestImage call
     */
    TrainingsQuickTestImageDefinitionStages.WithProjectId quickTestImage();

    /**
     * Grouping of quickTestImage definition stages.
     */
    interface TrainingsQuickTestImageDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithImageData withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify imageData.
         */
        interface WithImageData {
            /**
             * Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
             *
             * @return next definition stage
             */
            TrainingsQuickTestImageDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the id of a particular iteration to evaluate against.
             *   The default iteration for the project will be used when not specified.
             *
             * @return next definition stage
             */
            TrainingsQuickTestImageDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of quickTestImage definition.
     */
    interface TrainingsQuickTestImageDefinition extends
        TrainingsQuickTestImageDefinitionStages.WithProjectId,
        TrainingsQuickTestImageDefinitionStages.WithImageData,
        TrainingsQuickTestImageDefinitionStages.WithExecute {
    }

    /**
     * Quick test an image url.
     *
     * @param projectId The project to evaluate against.
     * @param url Url of the image.
     * @param quickTestImageUrlOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImagePrediction object if successful.
     */
    ImagePrediction quickTestImageUrl(UUID projectId, String url, QuickTestImageUrlOptionalParameter quickTestImageUrlOptionalParameter);

    /**
     * Quick test an image url.
     *
     * @param projectId The project to evaluate against.
     * @param url Url of the image.
     * @param quickTestImageUrlOptionalParameter 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 ImagePrediction object
     */
    Observable<ImagePrediction> quickTestImageUrlAsync(UUID projectId, String url, QuickTestImageUrlOptionalParameter quickTestImageUrlOptionalParameter);

    /**
     * Quick test an image url.
     *
     * @return the first stage of the quickTestImageUrl call
     */
    TrainingsQuickTestImageUrlDefinitionStages.WithProjectId quickTestImageUrl();

    /**
     * Grouping of quickTestImageUrl definition stages.
     */
    interface TrainingsQuickTestImageUrlDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project to evaluate against.
             *
             * @return next definition stage
             */
            WithUrl withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Url of the image.
             *
             * @return next definition stage
             */
            TrainingsQuickTestImageUrlDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the id of a particular iteration to evaluate against.
             *   The default iteration for the project will be used when not specified.
             *
             * @return next definition stage
             */
            TrainingsQuickTestImageUrlDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of quickTestImageUrl definition.
     */
    interface TrainingsQuickTestImageUrlDefinition extends
        TrainingsQuickTestImageUrlDefinitionStages.WithProjectId,
        TrainingsQuickTestImageUrlDefinitionStages.WithUrl,
        TrainingsQuickTestImageUrlDefinitionStages.WithExecute {
    }


    /**
     * Delete a set of predicted images and their associated prediction results.
     *
     * @param projectId The project id.
     * @param ids The prediction ids. Limited to 64.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deletePrediction(UUID projectId, List<UUID> ids);

    /**
     * Delete a set of predicted images and their associated prediction results.
     *
     * @param projectId The project id.
     * @param ids The prediction ids. Limited to 64.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deletePredictionAsync(UUID projectId, List<UUID> ids);



    /**
     * Get region proposals for an image. Returns empty array if no proposals are found.
     * This API will get region proposals for an image along with confidences for the region. It returns
      *  an empty array if no proposals are found.
     *
     * @param projectId The project id.
     * @param imageId The image id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageRegionProposal object if successful.
     */
    ImageRegionProposal getImageRegionProposals(UUID projectId, UUID imageId);

    /**
     * Get region proposals for an image. Returns empty array if no proposals are found.
     * This API will get region proposals for an image along with confidences for the region. It returns
      *  an empty array if no proposals are found.
     *
     * @param projectId The project id.
     * @param imageId The image id.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ImageRegionProposal object
     */
    Observable<ImageRegionProposal> getImageRegionProposalsAsync(UUID projectId, UUID imageId);



    /**
     * Add the specified predicted images to the set of training images.
     * This API creates a batch of images from predicted images specified. There is a limit of 64 images
      *  and 20 tags.
     *
     * @param projectId The project id.
     * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageCreateSummary object if successful.
     */
    ImageCreateSummary createImagesFromPredictions(UUID projectId, ImageIdCreateBatch batch);

    /**
     * Add the specified predicted images to the set of training images.
     * This API creates a batch of images from predicted images specified. There is a limit of 64 images
      *  and 20 tags.
     *
     * @param projectId The project id.
     * @param batch Image and tag ids. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ImageCreateSummary object
     */
    Observable<ImageCreateSummary> createImagesFromPredictionsAsync(UUID projectId, ImageIdCreateBatch batch);



    /**
     * Add the provided images urls to the set of training images.
     * This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64
      *  images and 20 tags.
     *
     * @param projectId The project id.
     * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageCreateSummary object if successful.
     */
    ImageCreateSummary createImagesFromUrls(UUID projectId, ImageUrlCreateBatch batch);

    /**
     * Add the provided images urls to the set of training images.
     * This API accepts a batch of urls, and optionally tags, to create images. There is a limit of 64
      *  images and 20 tags.
     *
     * @param projectId The project id.
     * @param batch Image urls and tag ids. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ImageCreateSummary object
     */
    Observable<ImageCreateSummary> createImagesFromUrlsAsync(UUID projectId, ImageUrlCreateBatch batch);



    /**
     * Add the provided batch of images to the set of training images.
     * This API accepts a batch of files, and optionally tags, to create images. There is a limit of 64
      *  images and 20 tags.
     *
     * @param projectId The project id.
     * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageCreateSummary object if successful.
     */
    ImageCreateSummary createImagesFromFiles(UUID projectId, ImageFileCreateBatch batch);

    /**
     * Add the provided batch of images to the set of training images.
     * This API accepts a batch of files, and optionally tags, to create images. There is a limit of 64
      *  images and 20 tags.
     *
     * @param projectId The project id.
     * @param batch The batch of image files to add. Limited to 64 images and 20 tags per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ImageCreateSummary object
     */
    Observable<ImageCreateSummary> createImagesFromFilesAsync(UUID projectId, ImageFileCreateBatch batch);



    /**
     * Delete images from the set of training images.
     *
     * @param projectId The project id.
     * @param imageIds Ids of the images to be deleted. Limited to 256 images per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteImages(UUID projectId, List<UUID> imageIds);

    /**
     * Delete images from the set of training images.
     *
     * @param projectId The project id.
     * @param imageIds Ids of the images to be deleted. Limited to 256 images per batch.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteImagesAsync(UUID projectId, List<UUID> imageIds);


    /**
     * Add the provided images to the set of training images.
     * This API accepts body content as multipart/form-data and application/octet-stream. When using multipart
     *   multiple image files can be sent at once, with a maximum of 64 files.
     *
     * @param projectId The project id.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
     * @param createImagesFromDataOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageCreateSummary object if successful.
     */
    ImageCreateSummary createImagesFromData(UUID projectId, byte[] imageData, CreateImagesFromDataOptionalParameter createImagesFromDataOptionalParameter);

    /**
     * Add the provided images to the set of training images.
     * This API accepts body content as multipart/form-data and application/octet-stream. When using multipart
     *   multiple image files can be sent at once, with a maximum of 64 files.
     *
     * @param projectId The project id.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
     * @param createImagesFromDataOptionalParameter 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 ImageCreateSummary object
     */
    Observable<ImageCreateSummary> createImagesFromDataAsync(UUID projectId, byte[] imageData, CreateImagesFromDataOptionalParameter createImagesFromDataOptionalParameter);

    /**
     * Add the provided images to the set of training images.
     * This API accepts body content as multipart/form-data and application/octet-stream. When using multipart
     *   multiple image files can be sent at once, with a maximum of 64 files.
     *
     * @return the first stage of the createImagesFromData call
     */
    TrainingsCreateImagesFromDataDefinitionStages.WithProjectId createImagesFromData();

    /**
     * Grouping of createImagesFromData definition stages.
     */
    interface TrainingsCreateImagesFromDataDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithImageData withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify imageData.
         */
        interface WithImageData {
            /**
             * Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.
             *
             * @return next definition stage
             */
            TrainingsCreateImagesFromDataDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The tags ids with which to tag each image. Limited to 20.
             *
             * @return next definition stage
             */
            TrainingsCreateImagesFromDataDefinitionStages.WithExecute withTagIds(List<UUID> tagIds);

        }

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

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

    /**
     * The entirety of createImagesFromData definition.
     */
    interface TrainingsCreateImagesFromDataDefinition extends
        TrainingsCreateImagesFromDataDefinitionStages.WithProjectId,
        TrainingsCreateImagesFromDataDefinitionStages.WithImageData,
        TrainingsCreateImagesFromDataDefinitionStages.WithExecute {
    }

    /**
     * Get images by id for a given project iteration.
     * This API will return a set of Images for the specified tags and optionally iteration. If no iteration is
     *   specified the
     *   current workspace is used.
     *
     * @param projectId The project id.
     * @param getImagesByIdsOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Image&gt; object if successful.
     */
    List<Image> getImagesByIds(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter);

    /**
     * Get images by id for a given project iteration.
     * This API will return a set of Images for the specified tags and optionally iteration. If no iteration is
     *   specified the
     *   current workspace is used.
     *
     * @param projectId The project id.
     * @param getImagesByIdsOptionalParameter 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;Image&gt; object
     */
    Observable<List<Image>> getImagesByIdsAsync(UUID projectId, GetImagesByIdsOptionalParameter getImagesByIdsOptionalParameter);

    /**
     * Get images by id for a given project iteration.
     * This API will return a set of Images for the specified tags and optionally iteration. If no iteration is
     *   specified the
     *   current workspace is used.
     *
     * @return the first stage of the getImagesByIds call
     */
    TrainingsGetImagesByIdsDefinitionStages.WithProjectId getImagesByIds();

    /**
     * Grouping of getImagesByIds definition stages.
     */
    interface TrainingsGetImagesByIdsDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetImagesByIdsDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The list of image ids to retrieve. Limited to 256.
             *
             * @return next definition stage
             */
            TrainingsGetImagesByIdsDefinitionStages.WithExecute withImageIds(List<UUID> imageIds);

            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetImagesByIdsDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of getImagesByIds definition.
     */
    interface TrainingsGetImagesByIdsDefinition extends
        TrainingsGetImagesByIdsDefinitionStages.WithProjectId,
        TrainingsGetImagesByIdsDefinitionStages.WithExecute {
    }

    /**
     * Get untagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *
     * @param projectId The project id.
     * @param getUntaggedImagesOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Image&gt; object if successful.
     */
    List<Image> getUntaggedImages(UUID projectId, GetUntaggedImagesOptionalParameter getUntaggedImagesOptionalParameter);

    /**
     * Get untagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *
     * @param projectId The project id.
     * @param getUntaggedImagesOptionalParameter 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;Image&gt; object
     */
    Observable<List<Image>> getUntaggedImagesAsync(UUID projectId, GetUntaggedImagesOptionalParameter getUntaggedImagesOptionalParameter);

    /**
     * Get untagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *
     * @return the first stage of the getUntaggedImages call
     */
    TrainingsGetUntaggedImagesDefinitionStages.WithProjectId getUntaggedImages();

    /**
     * Grouping of getUntaggedImages definition stages.
     */
    interface TrainingsGetUntaggedImagesDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImagesDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImagesDefinitionStages.WithExecute withIterationId(UUID iterationId);

            /**
             * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest'.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImagesDefinitionStages.WithExecute withOrderBy(String orderBy);

            /**
             * Maximum number of images to return. Defaults to 50, limited to 256.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImagesDefinitionStages.WithExecute withTake(Integer take);

            /**
             * Number of images to skip before beginning the image batch. Defaults to 0.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImagesDefinitionStages.WithExecute withSkip(Integer skip);

        }

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

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

    /**
     * The entirety of getUntaggedImages definition.
     */
    interface TrainingsGetUntaggedImagesDefinition extends
        TrainingsGetUntaggedImagesDefinitionStages.WithProjectId,
        TrainingsGetUntaggedImagesDefinitionStages.WithExecute {
    }

    /**
     * Get tagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param getTaggedImagesOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Image&gt; object if successful.
     */
    List<Image> getTaggedImages(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter);

    /**
     * Get tagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param getTaggedImagesOptionalParameter 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;Image&gt; object
     */
    Observable<List<Image>> getTaggedImagesAsync(UUID projectId, GetTaggedImagesOptionalParameter getTaggedImagesOptionalParameter);

    /**
     * Get tagged images for a given project iteration.
     * This API supports batching and range selection. By default it will only return first 50 images matching
     *   images.
     *   Use the {take} and {skip} parameters to control how many images to return in a given batch.
     *   The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @return the first stage of the getTaggedImages call
     */
    TrainingsGetTaggedImagesDefinitionStages.WithProjectId getTaggedImages();

    /**
     * Grouping of getTaggedImages definition stages.
     */
    interface TrainingsGetTaggedImagesDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withIterationId(UUID iterationId);

            /**
             * A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to 20.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withTagIds(List<UUID> tagIds);

            /**
             * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest'.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withOrderBy(String orderBy);

            /**
             * Maximum number of images to return. Defaults to 50, limited to 256.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withTake(Integer take);

            /**
             * Number of images to skip before beginning the image batch. Defaults to 0.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImagesDefinitionStages.WithExecute withSkip(Integer skip);

        }

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

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

    /**
     * The entirety of getTaggedImages definition.
     */
    interface TrainingsGetTaggedImagesDefinition extends
        TrainingsGetTaggedImagesDefinitionStages.WithProjectId,
        TrainingsGetTaggedImagesDefinitionStages.WithExecute {
    }


    /**
     * Delete a set of image regions.
     *
     * @param projectId The project id.
     * @param regionIds Regions to delete. Limited to 64.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteImageRegions(UUID projectId, List<UUID> regionIds);

    /**
     * Delete a set of image regions.
     *
     * @param projectId The project id.
     * @param regionIds Regions to delete. Limited to 64.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteImageRegionsAsync(UUID projectId, List<UUID> regionIds);


    /**
     * Create a set of image regions.
     * This API accepts a batch of image regions, and optionally tags, to update existing images with region
     *   information.
     *   There is a limit of 64 entries in the batch.
     *
     * @param projectId The project id.
     * @param createImageRegionsOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageRegionCreateSummary object if successful.
     */
    ImageRegionCreateSummary createImageRegions(UUID projectId, CreateImageRegionsOptionalParameter createImageRegionsOptionalParameter);

    /**
     * Create a set of image regions.
     * This API accepts a batch of image regions, and optionally tags, to update existing images with region
     *   information.
     *   There is a limit of 64 entries in the batch.
     *
     * @param projectId The project id.
     * @param createImageRegionsOptionalParameter 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 ImageRegionCreateSummary object
     */
    Observable<ImageRegionCreateSummary> createImageRegionsAsync(UUID projectId, CreateImageRegionsOptionalParameter createImageRegionsOptionalParameter);

    /**
     * Create a set of image regions.
     * This API accepts a batch of image regions, and optionally tags, to update existing images with region
     *   information.
     *   There is a limit of 64 entries in the batch.
     *
     * @return the first stage of the createImageRegions call
     */
    TrainingsCreateImageRegionsDefinitionStages.WithProjectId createImageRegions();

    /**
     * Grouping of createImageRegions definition stages.
     */
    interface TrainingsCreateImageRegionsDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsCreateImageRegionsDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             *
             *
             * @return next definition stage
             */
            TrainingsCreateImageRegionsDefinitionStages.WithExecute withRegions(List<ImageRegionCreateEntry> regions);

        }

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

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

    /**
     * The entirety of createImageRegions definition.
     */
    interface TrainingsCreateImageRegionsDefinition extends
        TrainingsCreateImageRegionsDefinitionStages.WithProjectId,
        TrainingsCreateImageRegionsDefinitionStages.WithExecute {
    }


    /**
     * Remove a set of tags from a set of images.
     *
     * @param projectId The project id.
     * @param imageIds Image ids. Limited to 64 images.
     * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void deleteImageTags(UUID projectId, List<UUID> imageIds, List<UUID> tagIds);

    /**
     * Remove a set of tags from a set of images.
     *
     * @param projectId The project id.
     * @param imageIds Image ids. Limited to 64 images.
     * @param tagIds Tags to be deleted from the specified images. Limited to 20 tags.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> deleteImageTagsAsync(UUID projectId, List<UUID> imageIds, List<UUID> tagIds);


    /**
     * Associate a set of images with a set of tags.
     *
     * @param projectId The project id.
     * @param createImageTagsOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageTagCreateSummary object if successful.
     */
    ImageTagCreateSummary createImageTags(UUID projectId, CreateImageTagsOptionalParameter createImageTagsOptionalParameter);

    /**
     * Associate a set of images with a set of tags.
     *
     * @param projectId The project id.
     * @param createImageTagsOptionalParameter 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 ImageTagCreateSummary object
     */
    Observable<ImageTagCreateSummary> createImageTagsAsync(UUID projectId, CreateImageTagsOptionalParameter createImageTagsOptionalParameter);

    /**
     * Associate a set of images with a set of tags.
     *
     * @return the first stage of the createImageTags call
     */
    TrainingsCreateImageTagsDefinitionStages.WithProjectId createImageTags();

    /**
     * Grouping of createImageTags definition stages.
     */
    interface TrainingsCreateImageTagsDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsCreateImageTagsDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Image Tag entries to include in this batch.
             *
             * @return next definition stage
             */
            TrainingsCreateImageTagsDefinitionStages.WithExecute withTags(List<ImageTagCreateEntry> tags);

        }

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

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

    /**
     * The entirety of createImageTags definition.
     */
    interface TrainingsCreateImageTagsDefinition extends
        TrainingsCreateImageTagsDefinitionStages.WithProjectId,
        TrainingsCreateImageTagsDefinitionStages.WithExecute {
    }

    /**
     * Gets the number of untagged images.
     * This API returns the images which have no tags for a given project and optionally an iteration. If no
     *   iteration is specified the
     *   current workspace is used.
     *
     * @param projectId The project id.
     * @param getUntaggedImageCountOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the int object if successful.
     */
    int getUntaggedImageCount(UUID projectId, GetUntaggedImageCountOptionalParameter getUntaggedImageCountOptionalParameter);

    /**
     * Gets the number of untagged images.
     * This API returns the images which have no tags for a given project and optionally an iteration. If no
     *   iteration is specified the
     *   current workspace is used.
     *
     * @param projectId The project id.
     * @param getUntaggedImageCountOptionalParameter 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 int object
     */
    Observable<Integer> getUntaggedImageCountAsync(UUID projectId, GetUntaggedImageCountOptionalParameter getUntaggedImageCountOptionalParameter);

    /**
     * Gets the number of untagged images.
     * This API returns the images which have no tags for a given project and optionally an iteration. If no
     *   iteration is specified the
     *   current workspace is used.
     *
     * @return the first stage of the getUntaggedImageCount call
     */
    TrainingsGetUntaggedImageCountDefinitionStages.WithProjectId getUntaggedImageCount();

    /**
     * Grouping of getUntaggedImageCount definition stages.
     */
    interface TrainingsGetUntaggedImageCountDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImageCountDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetUntaggedImageCountDefinitionStages.WithExecute withIterationId(UUID iterationId);

        }

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

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

    /**
     * The entirety of getUntaggedImageCount definition.
     */
    interface TrainingsGetUntaggedImageCountDefinition extends
        TrainingsGetUntaggedImageCountDefinitionStages.WithProjectId,
        TrainingsGetUntaggedImageCountDefinitionStages.WithExecute {
    }

    /**
     * Gets the number of images tagged with the provided {tagIds}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param getTaggedImageCountOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the int object if successful.
     */
    int getTaggedImageCount(UUID projectId, GetTaggedImageCountOptionalParameter getTaggedImageCountOptionalParameter);

    /**
     * Gets the number of images tagged with the provided {tagIds}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @param projectId The project id.
     * @param getTaggedImageCountOptionalParameter 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 int object
     */
    Observable<Integer> getTaggedImageCountAsync(UUID projectId, GetTaggedImageCountOptionalParameter getTaggedImageCountOptionalParameter);

    /**
     * Gets the number of images tagged with the provided {tagIds}.
     * The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and
     *   "Cat" tags, then only images tagged with Dog and/or Cat will be returned.
     *
     * @return the first stage of the getTaggedImageCount call
     */
    TrainingsGetTaggedImageCountDefinitionStages.WithProjectId getTaggedImageCount();

    /**
     * Grouping of getTaggedImageCount definition stages.
     */
    interface TrainingsGetTaggedImageCountDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImageCountDefinitionStages.WithExecute withProjectId(UUID projectId);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The iteration id. Defaults to workspace.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImageCountDefinitionStages.WithExecute withIterationId(UUID iterationId);

            /**
             * A list of tags ids to filter the images to count. Defaults to all tags when null.
             *
             * @return next definition stage
             */
            TrainingsGetTaggedImageCountDefinitionStages.WithExecute withTagIds(List<UUID> tagIds);

        }

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

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

    /**
     * The entirety of getTaggedImageCount definition.
     */
    interface TrainingsGetTaggedImageCountDefinition extends
        TrainingsGetTaggedImageCountDefinitionStages.WithProjectId,
        TrainingsGetTaggedImageCountDefinitionStages.WithExecute {
    }


    /**
     * Get information about a specific domain.
     *
     * @param domainId The id of the domain to get information about.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the Domain object if successful.
     */
    Domain getDomain(UUID domainId);

    /**
     * Get information about a specific domain.
     *
     * @param domainId The id of the domain to get information about.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the Domain object
     */
    Observable<Domain> getDomainAsync(UUID domainId);



    /**
     * Get a list of the available domains.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CustomVisionErrorException 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;Domain&gt; object if successful.
     */
    List<Domain> getDomains();

    /**
     * Get a list of the available domains.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the List&lt;Domain&gt; object
     */
    Observable<List<Domain>> getDomainsAsync();


}
