/**
 * 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.prediction;

import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageWithNoStoreOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageUrlWithNoStoreOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageUrlOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageWithNoStoreOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageUrlWithNoStoreOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageUrlOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.CustomVisionErrorException;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction;
import java.io.IOException;
import java.util.UUID;
import rx.Observable;

/**
 * An instance of this class provides access to all the operations defined
 * in Predictions.
 */
public interface Predictions {
    /**
     * Detect objects in an image without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB.
     * @param detectImageWithNoStoreOptionalParameter 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 detectImageWithNoStore(UUID projectId, String publishedName, byte[] imageData, DetectImageWithNoStoreOptionalParameter detectImageWithNoStoreOptionalParameter);

    /**
     * Detect objects in an image without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB.
     * @param detectImageWithNoStoreOptionalParameter 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> detectImageWithNoStoreAsync(UUID projectId, String publishedName, byte[] imageData, DetectImageWithNoStoreOptionalParameter detectImageWithNoStoreOptionalParameter);

    /**
     * Detect objects in an image without saving the result.
     *
     * @return the first stage of the detectImageWithNoStore call
     */
    PredictionsDetectImageWithNoStoreDefinitionStages.WithProjectId detectImageWithNoStore();

    /**
     * Grouping of detectImageWithNoStore definition stages.
     */
    interface PredictionsDetectImageWithNoStoreDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithImageData withPublishedName(String publishedName);
        }
        /**
         * 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 0MB.
             *
             * @return next definition stage
             */
            PredictionsDetectImageWithNoStoreDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsDetectImageWithNoStoreDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsDetectImageWithNoStoreDefinitionStages.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 detectImageWithNoStore definition.
     */
    interface PredictionsDetectImageWithNoStoreDefinition extends
        PredictionsDetectImageWithNoStoreDefinitionStages.WithProjectId,
        PredictionsDetectImageWithNoStoreDefinitionStages.WithPublishedName,
        PredictionsDetectImageWithNoStoreDefinitionStages.WithImageData,
        PredictionsDetectImageWithNoStoreDefinitionStages.WithExecute {
    }

    /**
     * Detect objects in an image url without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param detectImageUrlWithNoStoreOptionalParameter 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 detectImageUrlWithNoStore(UUID projectId, String publishedName, String url, DetectImageUrlWithNoStoreOptionalParameter detectImageUrlWithNoStoreOptionalParameter);

    /**
     * Detect objects in an image url without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param detectImageUrlWithNoStoreOptionalParameter 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> detectImageUrlWithNoStoreAsync(UUID projectId, String publishedName, String url, DetectImageUrlWithNoStoreOptionalParameter detectImageUrlWithNoStoreOptionalParameter);

    /**
     * Detect objects in an image url without saving the result.
     *
     * @return the first stage of the detectImageUrlWithNoStore call
     */
    PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithProjectId detectImageUrlWithNoStore();

    /**
     * Grouping of detectImageUrlWithNoStore definition stages.
     */
    interface PredictionsDetectImageUrlWithNoStoreDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithUrl withPublishedName(String publishedName);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Url of the image.
             *
             * @return next definition stage
             */
            PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsDetectImageUrlWithNoStoreDefinitionStages.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 detectImageUrlWithNoStore definition.
     */
    interface PredictionsDetectImageUrlWithNoStoreDefinition extends
        PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithProjectId,
        PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithPublishedName,
        PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithUrl,
        PredictionsDetectImageUrlWithNoStoreDefinitionStages.WithExecute {
    }

    /**
     * Detect objects in an image and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
     * @param detectImageOptionalParameter 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 detectImage(UUID projectId, String publishedName, byte[] imageData, DetectImageOptionalParameter detectImageOptionalParameter);

    /**
     * Detect objects in an image and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
     * @param detectImageOptionalParameter 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> detectImageAsync(UUID projectId, String publishedName, byte[] imageData, DetectImageOptionalParameter detectImageOptionalParameter);

    /**
     * Detect objects in an image and saves the result.
     *
     * @return the first stage of the detectImage call
     */
    PredictionsDetectImageDefinitionStages.WithProjectId detectImage();

    /**
     * Grouping of detectImage definition stages.
     */
    interface PredictionsDetectImageDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithImageData withPublishedName(String publishedName);
        }
        /**
         * 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 4MB.
             *
             * @return next definition stage
             */
            PredictionsDetectImageDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsDetectImageDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsDetectImageDefinitionStages.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 detectImage definition.
     */
    interface PredictionsDetectImageDefinition extends
        PredictionsDetectImageDefinitionStages.WithProjectId,
        PredictionsDetectImageDefinitionStages.WithPublishedName,
        PredictionsDetectImageDefinitionStages.WithImageData,
        PredictionsDetectImageDefinitionStages.WithExecute {
    }

    /**
     * Detect objects in an image url and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param detectImageUrlOptionalParameter 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 detectImageUrl(UUID projectId, String publishedName, String url, DetectImageUrlOptionalParameter detectImageUrlOptionalParameter);

    /**
     * Detect objects in an image url and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param detectImageUrlOptionalParameter 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> detectImageUrlAsync(UUID projectId, String publishedName, String url, DetectImageUrlOptionalParameter detectImageUrlOptionalParameter);

    /**
     * Detect objects in an image url and saves the result.
     *
     * @return the first stage of the detectImageUrl call
     */
    PredictionsDetectImageUrlDefinitionStages.WithProjectId detectImageUrl();

    /**
     * Grouping of detectImageUrl definition stages.
     */
    interface PredictionsDetectImageUrlDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithUrl withPublishedName(String publishedName);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Url of the image.
             *
             * @return next definition stage
             */
            PredictionsDetectImageUrlDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsDetectImageUrlDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsDetectImageUrlDefinitionStages.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 detectImageUrl definition.
     */
    interface PredictionsDetectImageUrlDefinition extends
        PredictionsDetectImageUrlDefinitionStages.WithProjectId,
        PredictionsDetectImageUrlDefinitionStages.WithPublishedName,
        PredictionsDetectImageUrlDefinitionStages.WithUrl,
        PredictionsDetectImageUrlDefinitionStages.WithExecute {
    }

    /**
     * Classify an image without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB.
     * @param classifyImageWithNoStoreOptionalParameter 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 classifyImageWithNoStore(UUID projectId, String publishedName, byte[] imageData, ClassifyImageWithNoStoreOptionalParameter classifyImageWithNoStoreOptionalParameter);

    /**
     * Classify an image without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB.
     * @param classifyImageWithNoStoreOptionalParameter 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> classifyImageWithNoStoreAsync(UUID projectId, String publishedName, byte[] imageData, ClassifyImageWithNoStoreOptionalParameter classifyImageWithNoStoreOptionalParameter);

    /**
     * Classify an image without saving the result.
     *
     * @return the first stage of the classifyImageWithNoStore call
     */
    PredictionsClassifyImageWithNoStoreDefinitionStages.WithProjectId classifyImageWithNoStore();

    /**
     * Grouping of classifyImageWithNoStore definition stages.
     */
    interface PredictionsClassifyImageWithNoStoreDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithImageData withPublishedName(String publishedName);
        }
        /**
         * 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 0MB.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageWithNoStoreDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageWithNoStoreDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsClassifyImageWithNoStoreDefinitionStages.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 classifyImageWithNoStore definition.
     */
    interface PredictionsClassifyImageWithNoStoreDefinition extends
        PredictionsClassifyImageWithNoStoreDefinitionStages.WithProjectId,
        PredictionsClassifyImageWithNoStoreDefinitionStages.WithPublishedName,
        PredictionsClassifyImageWithNoStoreDefinitionStages.WithImageData,
        PredictionsClassifyImageWithNoStoreDefinitionStages.WithExecute {
    }

    /**
     * Classify an image url without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param classifyImageUrlWithNoStoreOptionalParameter 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 classifyImageUrlWithNoStore(UUID projectId, String publishedName, String url, ClassifyImageUrlWithNoStoreOptionalParameter classifyImageUrlWithNoStoreOptionalParameter);

    /**
     * Classify an image url without saving the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param classifyImageUrlWithNoStoreOptionalParameter 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> classifyImageUrlWithNoStoreAsync(UUID projectId, String publishedName, String url, ClassifyImageUrlWithNoStoreOptionalParameter classifyImageUrlWithNoStoreOptionalParameter);

    /**
     * Classify an image url without saving the result.
     *
     * @return the first stage of the classifyImageUrlWithNoStore call
     */
    PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithProjectId classifyImageUrlWithNoStore();

    /**
     * Grouping of classifyImageUrlWithNoStore definition stages.
     */
    interface PredictionsClassifyImageUrlWithNoStoreDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithUrl withPublishedName(String publishedName);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Url of the image.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsClassifyImageUrlWithNoStoreDefinitionStages.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 classifyImageUrlWithNoStore definition.
     */
    interface PredictionsClassifyImageUrlWithNoStoreDefinition extends
        PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithProjectId,
        PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithPublishedName,
        PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithUrl,
        PredictionsClassifyImageUrlWithNoStoreDefinitionStages.WithExecute {
    }

    /**
     * Classify an image and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
     * @param classifyImageOptionalParameter 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 classifyImage(UUID projectId, String publishedName, byte[] imageData, ClassifyImageOptionalParameter classifyImageOptionalParameter);

    /**
     * Classify an image and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB.
     * @param classifyImageOptionalParameter 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> classifyImageAsync(UUID projectId, String publishedName, byte[] imageData, ClassifyImageOptionalParameter classifyImageOptionalParameter);

    /**
     * Classify an image and saves the result.
     *
     * @return the first stage of the classifyImage call
     */
    PredictionsClassifyImageDefinitionStages.WithProjectId classifyImage();

    /**
     * Grouping of classifyImage definition stages.
     */
    interface PredictionsClassifyImageDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithImageData withPublishedName(String publishedName);
        }
        /**
         * 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 4MB.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageDefinitionStages.WithExecute withImageData(byte[] imageData);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsClassifyImageDefinitionStages.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 classifyImage definition.
     */
    interface PredictionsClassifyImageDefinition extends
        PredictionsClassifyImageDefinitionStages.WithProjectId,
        PredictionsClassifyImageDefinitionStages.WithPublishedName,
        PredictionsClassifyImageDefinitionStages.WithImageData,
        PredictionsClassifyImageDefinitionStages.WithExecute {
    }

    /**
     * Classify an image url and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param classifyImageUrlOptionalParameter 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 classifyImageUrl(UUID projectId, String publishedName, String url, ClassifyImageUrlOptionalParameter classifyImageUrlOptionalParameter);

    /**
     * Classify an image url and saves the result.
     *
     * @param projectId The project id.
     * @param publishedName Specifies the name of the model to evaluate against.
     * @param url Url of the image.
     * @param classifyImageUrlOptionalParameter 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> classifyImageUrlAsync(UUID projectId, String publishedName, String url, ClassifyImageUrlOptionalParameter classifyImageUrlOptionalParameter);

    /**
     * Classify an image url and saves the result.
     *
     * @return the first stage of the classifyImageUrl call
     */
    PredictionsClassifyImageUrlDefinitionStages.WithProjectId classifyImageUrl();

    /**
     * Grouping of classifyImageUrl definition stages.
     */
    interface PredictionsClassifyImageUrlDefinitionStages {
        /**
         * The stage of the definition to be specify projectId.
         */
        interface WithProjectId {
            /**
             * The project id.
             *
             * @return next definition stage
             */
            WithPublishedName withProjectId(UUID projectId);
        }
        /**
         * The stage of the definition to be specify publishedName.
         */
        interface WithPublishedName {
            /**
             * Specifies the name of the model to evaluate against.
             *
             * @return next definition stage
             */
            WithUrl withPublishedName(String publishedName);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Url of the image.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageUrlDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional. Specifies the name of application using the endpoint.
             *
             * @return next definition stage
             */
            PredictionsClassifyImageUrlDefinitionStages.WithExecute withApplication(String application);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends PredictionsClassifyImageUrlDefinitionStages.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 classifyImageUrl definition.
     */
    interface PredictionsClassifyImageUrlDefinition extends
        PredictionsClassifyImageUrlDefinitionStages.WithProjectId,
        PredictionsClassifyImageUrlDefinitionStages.WithPublishedName,
        PredictionsClassifyImageUrlDefinitionStages.WithUrl,
        PredictionsClassifyImageUrlDefinitionStages.WithExecute {
    }

}
