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

import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectObjectsInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GetAreaOfInterestInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GetAreaOfInterestOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectObjectsOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageOptionalParameter;
import com.microsoft.azure.CloudException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AreaOfInterestResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionErrorResponseException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionOcrErrorException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescriptionExclude;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.Details;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DomainModelResults;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageAnalysis;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageDescription;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ListModelsResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrDetectionLanguage;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrLanguages;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadHeaders;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadInStreamHeaders;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOperationResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.VisualFeatureTypes;
import java.io.InputStream;
import java.io.IOException;
import java.util.List;
import java.util.UUID;
import rx.Observable;

/**
 * An instance of this class provides access to all the operations defined
 * in ComputerVision.
 */
public interface ComputerVision {
    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @param image An image stream.
     * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionOcrErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void readInStream(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter);

    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @param image An image stream.
     * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter);

    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @return the first stage of the readInStream call
     */
    ComputerVisionReadInStreamDefinitionStages.WithImage readInStream();

    /**
     * Grouping of readInStream definition stages.
     */
    interface ComputerVisionReadInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionReadInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The BCP-47 language code of the text in the document. Read supports auto language identification and
             *   multi-language documents, so only provide a language code if you would like to force the document to be
             *   processed in that specific language. See https://aka.ms/ocr-languages for list of supported languages.
             *   Possible values include: 'af', 'ast', 'bi', 'br', 'ca', 'ceb', 'ch', 'co', 'crh', 'cs', 'csb', 'da', 'de',
             *   'en', 'es', 'et', 'eu', 'fi', 'fil', 'fj', 'fr', 'fur', 'fy', 'ga', 'gd', 'gil', 'gl', 'gv', 'hni', 'hsb',
             *   'ht', 'hu', 'ia', 'id', 'it', 'iu', 'ja', 'jv', 'kaa', 'kac', 'kea', 'kha', 'kl', 'ko', 'ku', 'kw', 'lb',
             *   'ms', 'mww', 'nap', 'nl', 'no', 'oc', 'pl', 'pt', 'quc', 'rm', 'sco', 'sl', 'sq', 'sv', 'sw', 'tet', 'tr',
             *   'tt', 'uz', 'vo', 'wae', 'yua', 'za', 'zh-Hans', 'zh-Hant', 'zu'.
             *
             * @return next definition stage
             */
            ComputerVisionReadInStreamDefinitionStages.WithExecute withLanguage(OcrDetectionLanguage language);

            /**
             * Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR
             *   result. For a range of pages, use a hyphen. Separate each page or range with a comma.
             *
             * @return next definition stage
             */
            ComputerVisionReadInStreamDefinitionStages.WithExecute withPages(List<String> pages);

            /**
             * Optional parameter to specify the version of the OCR model used for text extraction. Accepted values are:
             *   "latest", "latest-preview", "2021-04-12". Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionReadInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

            /**
             * Optional parameter to specify which reading order algorithm should be applied when ordering the extract text
             *   elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not specified.
             *
             * @return next definition stage
             */
            ComputerVisionReadInStreamDefinitionStages.WithExecute withReadingOrder(String readingOrder);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends ComputerVisionReadInStreamDefinitionStages.WithAllOptions {
            /**
             * Execute the request.
             *
             */
            void execute();

            /**
             * Execute the request asynchronously.
             *
             * @return a representation of the deferred computation of this call if successful.
             */
            Observable<Void> executeAsync();
        }
    }

    /**
     * The entirety of readInStream definition.
     */
    interface ComputerVisionReadInStreamDefinition extends
        ComputerVisionReadInStreamDefinitionStages.WithImage,
        ComputerVisionReadInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param tagImageInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the TagResult object if successful.
     */
    TagResult tagImageInStream(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter);

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param tagImageInStreamOptionalParameter 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 TagResult object
     */
    Observable<TagResult> tagImageInStreamAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter);

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the tagImageInStream call
     */
    ComputerVisionTagImageInStreamDefinitionStages.WithImage tagImageInStream();

    /**
     * Grouping of tagImageInStream definition stages.
     */
    interface ComputerVisionTagImageInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionTagImageInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionTagImageInStreamDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionTagImageInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of tagImageInStream definition.
     */
    interface ComputerVisionTagImageInStreamDefinition extends
        ComputerVisionTagImageInStreamDefinitionStages.WithImage,
        ComputerVisionTagImageInStreamDefinitionStages.WithExecute {
    }

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @param detectOrientation Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
     *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
     * @param image An image stream.
     * @param recognizePrintedTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the OcrResult object if successful.
     */
    OcrResult recognizePrintedTextInStream(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter);

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @param detectOrientation Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
     *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
     * @param image An image stream.
     * @param recognizePrintedTextInStreamOptionalParameter 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 OcrResult object
     */
    Observable<OcrResult> recognizePrintedTextInStreamAsync(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter);

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @return the first stage of the recognizePrintedTextInStream call
     */
    ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithDetectOrientation recognizePrintedTextInStream();

    /**
     * Grouping of recognizePrintedTextInStream definition stages.
     */
    interface ComputerVisionRecognizePrintedTextInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify detectOrientation.
         */
        interface WithDetectOrientation {
            /**
             * Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
             *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
             *
             * @return next definition stage
             */
            WithImage withDetectOrientation(boolean detectOrientation);
        }
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The BCP-47 language code of the text to be detected in the image. The default value is 'unk'. Possible
             *   values include: 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it',
             *   'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk'.
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithExecute withLanguage(OcrLanguages language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of recognizePrintedTextInStream definition.
     */
    interface ComputerVisionRecognizePrintedTextInStreamDefinition extends
        ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithDetectOrientation,
        ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithImage,
        ComputerVisionRecognizePrintedTextInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @param model The domain-specific content to recognize.
     * @param image An image stream.
     * @param analyzeImageByDomainInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the DomainModelResults object if successful.
     */
    DomainModelResults analyzeImageByDomainInStream(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter);

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @param model The domain-specific content to recognize.
     * @param image An image stream.
     * @param analyzeImageByDomainInStreamOptionalParameter 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 DomainModelResults object
     */
    Observable<DomainModelResults> analyzeImageByDomainInStreamAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter);

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @return the first stage of the analyzeImageByDomainInStream call
     */
    ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithModel analyzeImageByDomainInStream();

    /**
     * Grouping of analyzeImageByDomainInStream definition stages.
     */
    interface ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify model.
         */
        interface WithModel {
            /**
             * The domain-specific content to recognize.
             *
             * @return next definition stage
             */
            WithImage withModel(String model);
        }
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of analyzeImageByDomainInStream definition.
     */
    interface ComputerVisionAnalyzeImageByDomainInStreamDefinition extends
        ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithModel,
        ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithImage,
        ComputerVisionAnalyzeImageByDomainInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @param width Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param height Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param image An image stream.
     * @param generateThumbnailInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the InputStream object if successful.
     */
    InputStream generateThumbnailInStream(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter);

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @param width Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param height Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param image An image stream.
     * @param generateThumbnailInStreamOptionalParameter 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 InputStream object
     */
    Observable<InputStream> generateThumbnailInStreamAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter);

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @return the first stage of the generateThumbnailInStream call
     */
    ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithWidth generateThumbnailInStream();

    /**
     * Grouping of generateThumbnailInStream definition stages.
     */
    interface ComputerVisionGenerateThumbnailInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify width.
         */
        interface WithWidth {
            /**
             * Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
             *
             * @return next definition stage
             */
            WithHeight withWidth(int width);
        }
        /**
         * The stage of the definition to be specify height.
         */
        interface WithHeight {
            /**
             * Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
             *
             * @return next definition stage
             */
            WithImage withHeight(int height);
        }
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Boolean flag for enabling smart cropping.
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithExecute withSmartCropping(Boolean smartCropping);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of generateThumbnailInStream definition.
     */
    interface ComputerVisionGenerateThumbnailInStreamDefinition extends
        ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithWidth,
        ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithHeight,
        ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithImage,
        ComputerVisionGenerateThumbnailInStreamDefinitionStages.WithExecute {
    }

    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param detectObjectsInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the DetectResult object if successful.
     */
    DetectResult detectObjectsInStream(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter);

    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param detectObjectsInStreamOptionalParameter 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 DetectResult object
     */
    Observable<DetectResult> detectObjectsInStreamAsync(byte[] image, DetectObjectsInStreamOptionalParameter detectObjectsInStreamOptionalParameter);

    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the detectObjectsInStream call
     */
    ComputerVisionDetectObjectsInStreamDefinitionStages.WithImage detectObjectsInStream();

    /**
     * Grouping of detectObjectsInStream definition stages.
     */
    interface ComputerVisionDetectObjectsInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionDetectObjectsInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionDetectObjectsInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of detectObjectsInStream definition.
     */
    interface ComputerVisionDetectObjectsInStreamDefinition extends
        ComputerVisionDetectObjectsInStreamDefinitionStages.WithImage,
        ComputerVisionDetectObjectsInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param describeImageInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageDescription object if successful.
     */
    ImageDescription describeImageInStream(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter);

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param describeImageInStreamOptionalParameter 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 ImageDescription object
     */
    Observable<ImageDescription> describeImageInStreamAsync(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter);

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the describeImageInStream call
     */
    ComputerVisionDescribeImageInStreamDefinitionStages.WithImage describeImageInStream();

    /**
     * Grouping of describeImageInStream definition stages.
     */
    interface ComputerVisionDescribeImageInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Maximum number of candidate descriptions to be returned.  The default is 1.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute withMaxCandidates(Integer maxCandidates);

            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Turn off specified domain models when generating the description.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute withDescriptionExclude(List<DescriptionExclude> descriptionExclude);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of describeImageInStream definition.
     */
    interface ComputerVisionDescribeImageInStreamDefinition extends
        ComputerVisionDescribeImageInStreamDefinitionStages.WithImage,
        ComputerVisionDescribeImageInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @param image An image stream.
     * @param getAreaOfInterestInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the AreaOfInterestResult object if successful.
     */
    AreaOfInterestResult getAreaOfInterestInStream(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter);

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @param image An image stream.
     * @param getAreaOfInterestInStreamOptionalParameter 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 AreaOfInterestResult object
     */
    Observable<AreaOfInterestResult> getAreaOfInterestInStreamAsync(byte[] image, GetAreaOfInterestInStreamOptionalParameter getAreaOfInterestInStreamOptionalParameter);

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @return the first stage of the getAreaOfInterestInStream call
     */
    ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithImage getAreaOfInterestInStream();

    /**
     * Grouping of getAreaOfInterestInStream definition stages.
     */
    interface ComputerVisionGetAreaOfInterestInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of getAreaOfInterestInStream definition.
     */
    interface ComputerVisionGetAreaOfInterestInStreamDefinition extends
        ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithImage,
        ComputerVisionGetAreaOfInterestInStreamDefinitionStages.WithExecute {
    }

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param analyzeImageInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageAnalysis object if successful.
     */
    ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter);

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param image An image stream.
     * @param analyzeImageInStreamOptionalParameter 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 ImageAnalysis object
     */
    Observable<ImageAnalysis> analyzeImageInStreamAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter);

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the analyzeImageInStream call
     */
    ComputerVisionAnalyzeImageInStreamDefinitionStages.WithImage analyzeImageInStream();

    /**
     * Grouping of analyzeImageInStream definition stages.
     */
    interface ComputerVisionAnalyzeImageInStreamDefinitionStages {
        /**
         * The stage of the definition to be specify image.
         */
        interface WithImage {
            /**
             * An image stream.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withImage(byte[] image);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid
             *   visual feature types include: Categories - categorizes image content according to a taxonomy defined in
             *   documentation. Tags - tags the image with a detailed list of words related to the image content. Description
             *   - describes the image content with a complete English sentence. Faces - detects if faces are present. If
             *   present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing.
             *   Color - determines the accent color, dominant color, and whether an image is black&amp;white. Adult -
             *   detects if the image is pornographic in nature (depicts nudity or a sex act), or is gory (depicts extreme
             *   violence or blood). Sexually suggestive content (aka racy content) is also detected. Objects - detects
             *   various objects within an image, including the approximate location. The Objects argument is only available
             *   in English. Brands - detects various brands within an image, including the approximate location. The Brands
             *   argument is only available in English.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withVisualFeatures(List<VisualFeatureTypes> visualFeatures);

            /**
             * A string indicating which domain-specific details to return. Multiple values should be comma-separated.
             *   Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks
             *   - identifies notable landmarks in the image.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withDetails(List<Details> details);

            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Turn off specified domain models when generating the description.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withDescriptionExclude(List<DescriptionExclude> descriptionExclude);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of analyzeImageInStream definition.
     */
    interface ComputerVisionAnalyzeImageInStreamDefinition extends
        ComputerVisionAnalyzeImageInStreamDefinitionStages.WithImage,
        ComputerVisionAnalyzeImageInStreamDefinitionStages.WithExecute {
    }


    /**
     * This interface is used for getting OCR results of Read operation. The URL to this interface should
      *  be retrieved from 'Operation-Location' field returned from Read interface.
     *
     * @param operationId Id of read operation returned in the response of the 'Read' interface.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionOcrErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ReadOperationResult object if successful.
     */
    ReadOperationResult getReadResult(UUID operationId);

    /**
     * This interface is used for getting OCR results of Read operation. The URL to this interface should
      *  be retrieved from 'Operation-Location' field returned from Read interface.
     *
     * @param operationId Id of read operation returned in the response of the 'Read' interface.
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ReadOperationResult object
     */
    Observable<ReadOperationResult> getReadResultAsync(UUID operationId);


    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @param url Publicly reachable URL of an image.
     * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionOcrErrorException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     */
    void read(String url, ReadOptionalParameter readOptionalParameter);

    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @param url Publicly reachable URL of an image.
     * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return a representation of the deferred computation of this call if successful.
     */
    Observable<Void> readAsync(String url, ReadOptionalParameter readOptionalParameter);

    /**
     * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
     *   Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
     *   response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
     *   you must use for your 'GetReadResult' operation to access OCR results.​.
     *
     * @return the first stage of the read call
     */
    ComputerVisionReadDefinitionStages.WithUrl read();

    /**
     * Grouping of read definition stages.
     */
    interface ComputerVisionReadDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionReadDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The BCP-47 language code of the text in the document. Read supports auto language identification and
             *   multi-language documents, so only provide a language code if you would like to force the document to be
             *   processed in that specific language. See https://aka.ms/ocr-languages for list of supported languages.
             *   Possible values include: 'af', 'ast', 'bi', 'br', 'ca', 'ceb', 'ch', 'co', 'crh', 'cs', 'csb', 'da', 'de',
             *   'en', 'es', 'et', 'eu', 'fi', 'fil', 'fj', 'fr', 'fur', 'fy', 'ga', 'gd', 'gil', 'gl', 'gv', 'hni', 'hsb',
             *   'ht', 'hu', 'ia', 'id', 'it', 'iu', 'ja', 'jv', 'kaa', 'kac', 'kea', 'kha', 'kl', 'ko', 'ku', 'kw', 'lb',
             *   'ms', 'mww', 'nap', 'nl', 'no', 'oc', 'pl', 'pt', 'quc', 'rm', 'sco', 'sl', 'sq', 'sv', 'sw', 'tet', 'tr',
             *   'tt', 'uz', 'vo', 'wae', 'yua', 'za', 'zh-Hans', 'zh-Hant', 'zu'.
             *
             * @return next definition stage
             */
            ComputerVisionReadDefinitionStages.WithExecute withLanguage(OcrDetectionLanguage language);

            /**
             * Custom page numbers for multi-page documents(PDF/TIFF), input the number of the pages you want to get OCR
             *   result. For a range of pages, use a hyphen. Separate each page or range with a comma.
             *
             * @return next definition stage
             */
            ComputerVisionReadDefinitionStages.WithExecute withPages(List<String> pages);

            /**
             * Optional parameter to specify the version of the OCR model used for text extraction. Accepted values are:
             *   "latest", "latest-preview", "2021-04-12". Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionReadDefinitionStages.WithExecute withModelVersion(String modelVersion);

            /**
             * Optional parameter to specify which reading order algorithm should be applied when ordering the extract text
             *   elements. Can be either 'basic' or 'natural'. Will default to 'basic' if not specified.
             *
             * @return next definition stage
             */
            ComputerVisionReadDefinitionStages.WithExecute withReadingOrder(String readingOrder);

        }

        /**
         * The last stage of the definition which will make the operation call.
        */
        interface WithExecute extends ComputerVisionReadDefinitionStages.WithAllOptions {
            /**
             * Execute the request.
             *
             */
            void execute();

            /**
             * Execute the request asynchronously.
             *
             * @return a representation of the deferred computation of this call if successful.
             */
            Observable<Void> executeAsync();
        }
    }

    /**
     * The entirety of read definition.
     */
    interface ComputerVisionReadDefinition extends
        ComputerVisionReadDefinitionStages.WithUrl,
        ComputerVisionReadDefinitionStages.WithExecute {
    }

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @param url Publicly reachable URL of an image.
     * @param getAreaOfInterestOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the AreaOfInterestResult object if successful.
     */
    AreaOfInterestResult getAreaOfInterest(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter);

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @param url Publicly reachable URL of an image.
     * @param getAreaOfInterestOptionalParameter 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 AreaOfInterestResult object
     */
    Observable<AreaOfInterestResult> getAreaOfInterestAsync(String url, GetAreaOfInterestOptionalParameter getAreaOfInterestOptionalParameter);

    /**
     * This operation returns a bounding box around the most important area of the image.
     *   A successful response will be returned in JSON. If the request failed, the response contains an error code
     *   and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, FailedToProcess, Timeout, or
     *   InternalServerError.
     *
     * @return the first stage of the getAreaOfInterest call
     */
    ComputerVisionGetAreaOfInterestDefinitionStages.WithUrl getAreaOfInterest();

    /**
     * Grouping of getAreaOfInterest definition stages.
     */
    interface ComputerVisionGetAreaOfInterestDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionGetAreaOfInterestDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionGetAreaOfInterestDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of getAreaOfInterest definition.
     */
    interface ComputerVisionGetAreaOfInterestDefinition extends
        ComputerVisionGetAreaOfInterestDefinitionStages.WithUrl,
        ComputerVisionGetAreaOfInterestDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @param width Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param height Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param url Publicly reachable URL of an image.
     * @param generateThumbnailOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws CloudException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the InputStream object if successful.
     */
    InputStream generateThumbnail(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter);

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @param width Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param height Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
     * @param url Publicly reachable URL of an image.
     * @param generateThumbnailOptionalParameter 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 InputStream object
     */
    Observable<InputStream> generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter);

    /**
     * This operation generates a thumbnail image with the user-specified width and height. By default, the service
     *   analyzes the image, identifies the region of interest (ROI), and generates smart cropping coordinates based
     *   on the ROI. Smart cropping helps when you specify an aspect ratio that differs from that of the input image.
     *   A successful response contains the thumbnail image binary. If the request failed, the response contains an
     *   error code and a message to help determine what went wrong.
     *   Upon failure, the error code and an error message are returned. The error code could be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, InvalidThumbnailSize, NotSupportedImage,
     *   FailedToProcess, Timeout, or InternalServerError.
     *
     * @return the first stage of the generateThumbnail call
     */
    ComputerVisionGenerateThumbnailDefinitionStages.WithWidth generateThumbnail();

    /**
     * Grouping of generateThumbnail definition stages.
     */
    interface ComputerVisionGenerateThumbnailDefinitionStages {
        /**
         * The stage of the definition to be specify width.
         */
        interface WithWidth {
            /**
             * Width of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
             *
             * @return next definition stage
             */
            WithHeight withWidth(int width);
        }
        /**
         * The stage of the definition to be specify height.
         */
        interface WithHeight {
            /**
             * Height of the thumbnail, in pixels. It must be between 1 and 1024. Recommended minimum of 50.
             *
             * @return next definition stage
             */
            WithUrl withHeight(int height);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Boolean flag for enabling smart cropping.
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailDefinitionStages.WithExecute withSmartCropping(Boolean smartCropping);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionGenerateThumbnailDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of generateThumbnail definition.
     */
    interface ComputerVisionGenerateThumbnailDefinition extends
        ComputerVisionGenerateThumbnailDefinitionStages.WithWidth,
        ComputerVisionGenerateThumbnailDefinitionStages.WithHeight,
        ComputerVisionGenerateThumbnailDefinitionStages.WithUrl,
        ComputerVisionGenerateThumbnailDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param tagImageOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the TagResult object if successful.
     */
    TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter);

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param tagImageOptionalParameter 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 TagResult object
     */
    Observable<TagResult> tagImageAsync(String url, TagImageOptionalParameter tagImageOptionalParameter);

    /**
     * This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
     *   The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images.
     *   Unlike categories, tags are not organized according to a hierarchical classification system, but correspond
     *   to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag
     *   "ascomycete" may be accompanied by the hint "fungus".
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the tagImage call
     */
    ComputerVisionTagImageDefinitionStages.WithUrl tagImage();

    /**
     * Grouping of tagImage definition stages.
     */
    interface ComputerVisionTagImageDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionTagImageDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionTagImageDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionTagImageDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of tagImage definition.
     */
    interface ComputerVisionTagImageDefinition extends
        ComputerVisionTagImageDefinitionStages.WithUrl,
        ComputerVisionTagImageDefinitionStages.WithExecute {
    }

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @param detectOrientation Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
     *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
     * @param url Publicly reachable URL of an image.
     * @param recognizePrintedTextOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the OcrResult object if successful.
     */
    OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter);

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @param detectOrientation Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
     *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
     * @param url Publicly reachable URL of an image.
     * @param recognizePrintedTextOptionalParameter 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 OcrResult object
     */
    Observable<OcrResult> recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter);

    /**
     * Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a
     *   machine-usable character stream.
     *   Upon success, the OCR results will be returned.
     *   Upon failure, the error code together with an error message will be returned. The error code can be one of
     *   InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
     *   InternalServerError.
     *
     * @return the first stage of the recognizePrintedText call
     */
    ComputerVisionRecognizePrintedTextDefinitionStages.WithDetectOrientation recognizePrintedText();

    /**
     * Grouping of recognizePrintedText definition stages.
     */
    interface ComputerVisionRecognizePrintedTextDefinitionStages {
        /**
         * The stage of the definition to be specify detectOrientation.
         */
        interface WithDetectOrientation {
            /**
             * Whether detect the text orientation in the image. With detectOrientation=true the OCR service tries to
             *   detect the image orientation and correct it before further processing (e.g. if it's upside-down).
             *
             * @return next definition stage
             */
            WithUrl withDetectOrientation(boolean detectOrientation);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The BCP-47 language code of the text to be detected in the image. The default value is 'unk'. Possible
             *   values include: 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it',
             *   'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro', 'sr-Cyrl', 'sr-Latn', 'sk'.
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextDefinitionStages.WithExecute withLanguage(OcrLanguages language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionRecognizePrintedTextDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of recognizePrintedText definition.
     */
    interface ComputerVisionRecognizePrintedTextDefinition extends
        ComputerVisionRecognizePrintedTextDefinitionStages.WithDetectOrientation,
        ComputerVisionRecognizePrintedTextDefinitionStages.WithUrl,
        ComputerVisionRecognizePrintedTextDefinitionStages.WithExecute {
    }

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @param model The domain-specific content to recognize.
     * @param url Publicly reachable URL of an image.
     * @param analyzeImageByDomainOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the DomainModelResults object if successful.
     */
    DomainModelResults analyzeImageByDomain(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter);

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @param model The domain-specific content to recognize.
     * @param url Publicly reachable URL of an image.
     * @param analyzeImageByDomainOptionalParameter 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 DomainModelResults object
     */
    Observable<DomainModelResults> analyzeImageByDomainAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter);

    /**
     * This operation recognizes content within an image by applying a domain-specific model. The list of
     *   domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET
     *   request. Currently, the API provides following domain-specific models: celebrities, landmarks.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON.
     *   If the request failed, the response will contain an error code and a message to help understand what went
     *   wrong.
     *
     * @return the first stage of the analyzeImageByDomain call
     */
    ComputerVisionAnalyzeImageByDomainDefinitionStages.WithModel analyzeImageByDomain();

    /**
     * Grouping of analyzeImageByDomain definition stages.
     */
    interface ComputerVisionAnalyzeImageByDomainDefinitionStages {
        /**
         * The stage of the definition to be specify model.
         */
        interface WithModel {
            /**
             * The domain-specific content to recognize.
             *
             * @return next definition stage
             */
            WithUrl withModel(String model);
        }
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageByDomainDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of analyzeImageByDomain definition.
     */
    interface ComputerVisionAnalyzeImageByDomainDefinition extends
        ComputerVisionAnalyzeImageByDomainDefinitionStages.WithModel,
        ComputerVisionAnalyzeImageByDomainDefinitionStages.WithUrl,
        ComputerVisionAnalyzeImageByDomainDefinitionStages.WithExecute {
    }


    /**
     * This operation returns the list of domain-specific models that are supported by the Computer
      *  Vision API. Currently, the API supports following domain-specific models: celebrity recognizer,
      *  landmark recognizer.
      *  A successful response will be returned in JSON. If the request failed, the response will contain
      *  an error code and a message to help understand what went wrong.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ListModelsResult object if successful.
     */
    ListModelsResult listModels();

    /**
     * This operation returns the list of domain-specific models that are supported by the Computer
      *  Vision API. Currently, the API supports following domain-specific models: celebrity recognizer,
      *  landmark recognizer.
      *  A successful response will be returned in JSON. If the request failed, the response will contain
      *  an error code and a message to help understand what went wrong.
     *
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @return the observable to the ListModelsResult object
     */
    Observable<ListModelsResult> listModelsAsync();


    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param detectObjectsOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the DetectResult object if successful.
     */
    DetectResult detectObjects(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter);

    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param detectObjectsOptionalParameter 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 DetectResult object
     */
    Observable<DetectResult> detectObjectsAsync(String url, DetectObjectsOptionalParameter detectObjectsOptionalParameter);

    /**
     * Performs object detection on the specified image.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the detectObjects call
     */
    ComputerVisionDetectObjectsDefinitionStages.WithUrl detectObjects();

    /**
     * Grouping of detectObjects definition stages.
     */
    interface ComputerVisionDetectObjectsDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionDetectObjectsDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionDetectObjectsDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of detectObjects definition.
     */
    interface ComputerVisionDetectObjectsDefinition extends
        ComputerVisionDetectObjectsDefinitionStages.WithUrl,
        ComputerVisionDetectObjectsDefinitionStages.WithExecute {
    }

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param describeImageOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageDescription object if successful.
     */
    ImageDescription describeImage(String url, DescribeImageOptionalParameter describeImageOptionalParameter);

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param describeImageOptionalParameter 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 ImageDescription object
     */
    Observable<ImageDescription> describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter);

    /**
     * This operation generates a description of an image in human readable language with complete sentences. The
     *   description is based on a collection of content tags, which are also returned by the operation. More than
     *   one description can be generated for each image. Descriptions are ordered by their confidence score.
     *   Descriptions may include results from celebrity and landmark domain models, if applicable.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the describeImage call
     */
    ComputerVisionDescribeImageDefinitionStages.WithUrl describeImage();

    /**
     * Grouping of describeImage definition stages.
     */
    interface ComputerVisionDescribeImageDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * Maximum number of candidate descriptions to be returned.  The default is 1.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageDefinitionStages.WithExecute withMaxCandidates(Integer maxCandidates);

            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Turn off specified domain models when generating the description.
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageDefinitionStages.WithExecute withDescriptionExclude(List<DescriptionExclude> descriptionExclude);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionDescribeImageDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of describeImage definition.
     */
    interface ComputerVisionDescribeImageDefinition extends
        ComputerVisionDescribeImageDefinitionStages.WithUrl,
        ComputerVisionDescribeImageDefinitionStages.WithExecute {
    }

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param analyzeImageOptionalParameter the object representing the optional parameters to be set before calling this API
     * @throws IllegalArgumentException thrown if parameters fail the validation
     * @throws ComputerVisionErrorResponseException thrown if the request is rejected by server
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
     * @return the ImageAnalysis object if successful.
     */
    ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter);

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @param url Publicly reachable URL of an image.
     * @param analyzeImageOptionalParameter 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 ImageAnalysis object
     */
    Observable<ImageAnalysis> analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter);

    /**
     * This operation extracts a rich set of visual features based on the image content.
     *   Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. Within your
     *   request, there is an optional parameter to allow you to choose which features to return. By default, image
     *   categories are returned in the response.
     *   A successful response will be returned in JSON. If the request failed, the response will contain an error
     *   code and a message to help understand what went wrong.
     *
     * @return the first stage of the analyzeImage call
     */
    ComputerVisionAnalyzeImageDefinitionStages.WithUrl analyzeImage();

    /**
     * Grouping of analyzeImage definition stages.
     */
    interface ComputerVisionAnalyzeImageDefinitionStages {
        /**
         * The stage of the definition to be specify url.
         */
        interface WithUrl {
            /**
             * Publicly reachable URL of an image.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withUrl(String url);
        }

        /**
         * The stage of the definition which allows for any other optional settings to be specified.
         */
        interface WithAllOptions {
            /**
             * A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid
             *   visual feature types include: Categories - categorizes image content according to a taxonomy defined in
             *   documentation. Tags - tags the image with a detailed list of words related to the image content. Description
             *   - describes the image content with a complete English sentence. Faces - detects if faces are present. If
             *   present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing.
             *   Color - determines the accent color, dominant color, and whether an image is black&amp;white. Adult -
             *   detects if the image is pornographic in nature (depicts nudity or a sex act), or is gory (depicts extreme
             *   violence or blood). Sexually suggestive content (aka racy content) is also detected. Objects - detects
             *   various objects within an image, including the approximate location. The Objects argument is only available
             *   in English. Brands - detects various brands within an image, including the approximate location. The Brands
             *   argument is only available in English.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withVisualFeatures(List<VisualFeatureTypes> visualFeatures);

            /**
             * A string indicating which domain-specific details to return. Multiple values should be comma-separated.
             *   Valid visual feature types include: Celebrities - identifies celebrities if detected in the image, Landmarks
             *   - identifies notable landmarks in the image.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withDetails(List<Details> details);

            /**
             * The desired language for output generation. If this parameter is not specified, the default value is
             *   &amp;quot;en&amp;quot;.Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
             *   Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withLanguage(String language);

            /**
             * Turn off specified domain models when generating the description.
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withDescriptionExclude(List<DescriptionExclude> descriptionExclude);

            /**
             * Optional parameter to specify the version of the AI model. Accepted values are: "latest", "2021-04-01".
             *   Defaults to "latest".
             *
             * @return next definition stage
             */
            ComputerVisionAnalyzeImageDefinitionStages.WithExecute withModelVersion(String modelVersion);

        }

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

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

    /**
     * The entirety of analyzeImage definition.
     */
    interface ComputerVisionAnalyzeImageDefinition extends
        ComputerVisionAnalyzeImageDefinitionStages.WithUrl,
        ComputerVisionAnalyzeImageDefinitionStages.WithExecute {
    }

}
