diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ContentModeratorClient.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ContentModeratorClient.java index 58f90d501d16..bc896b18d9e3 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ContentModeratorClient.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ContentModeratorClient.java @@ -9,7 +9,6 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; import com.microsoft.azure.AzureClient; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AzureRegionBaseUrl; import com.microsoft.rest.RestClient; /** @@ -37,19 +36,19 @@ public interface ContentModeratorClient { String userAgent(); /** - * Gets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'. + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. * - * @return the baseUrl value. + * @return the endpoint value. */ - AzureRegionBaseUrl baseUrl(); + String endpoint(); /** - * Sets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'. + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. * - * @param baseUrl the baseUrl value. + * @param endpoint the endpoint value. * @return the service client itself */ - ContentModeratorClient withBaseUrl(AzureRegionBaseUrl baseUrl); + ContentModeratorClient withEndpoint(String endpoint); /** * Gets Gets or sets the preferred language for the response.. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ImageModerations.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ImageModerations.java index 9652492c61a0..65e6ff23c445 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ImageModerations.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ImageModerations.java @@ -8,24 +8,16 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchFileInputOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModelModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Evaluate; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FoundFaces; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchResponse; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCR; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import rx.Observable; /** @@ -36,1201 +28,1117 @@ public interface ImageModerations { /** * Returns the list of faces found. * - * @param findFacesOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - - FoundFaces findFaces(FindFacesOptionalParameter findFacesOptionalParameter); + FoundFaces findFaces(); + + /** + * Returns the list of faces found. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture findFacesAsync(final ServiceCallback serviceCallback); /** * Returns the list of faces found. * - * @param findFacesOptionalParameter 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 FoundFaces object */ - - Observable findFacesAsync(FindFacesOptionalParameter findFacesOptionalParameter); + Observable findFacesAsync(); /** * Returns the list of faces found. * - * @return the first stage of the findFaces call + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable> findFacesWithServiceResponseAsync(); + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. */ - ImageModerationsFindFacesDefinitionStages.WithExecute findFaces(); + FoundFaces findFaces(Boolean cacheImage); /** - * Grouping of findFaces definition stages. + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object */ - interface ImageModerationsFindFacesDefinitionStages { + ServiceFuture findFacesAsync(Boolean cacheImage, final ServiceCallback serviceCallback); - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsFindFacesDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable findFacesAsync(Boolean cacheImage); - } + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable> findFacesWithServiceResponseAsync(Boolean cacheImage); - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsFindFacesDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the FoundFaces object if successful. - */ - FoundFaces execute(); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + OCR oCRMethod(String language); - /** - * Execute the request asynchronously. - * - * @return the observable to the FoundFaces object - */ - Observable executeAsync(); - } - } + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRMethodAsync(String language, final ServiceCallback serviceCallback); /** - * The entirety of findFaces definition. + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object */ - interface ImageModerationsFindFacesDefinition extends - ImageModerationsFindFacesDefinitionStages.WithExecute { - } + Observable oCRMethodAsync(String language); /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter 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 OCR object + */ + Observable> oCRMethodWithServiceResponseAsync(String language); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - - OCR oCRMethod(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter); + OCR oCRMethod(String language, Boolean cacheImage, Boolean enhanced); /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRMethodAsync(String language, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OCR object */ - - Observable oCRMethodAsync(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter); - - /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. - * - * @return the first stage of the oCRMethod call - */ - ImageModerationsOCRMethodDefinitionStages.WithLanguage oCRMethod(); - - /** - * Grouping of oCRMethod definition stages. - */ - interface ImageModerationsOCRMethodDefinitionStages { - /** - * The stage of the definition to be specify language. - */ - interface WithLanguage { - /** - * Language of the terms. - * - * @return next definition stage - */ - ImageModerationsOCRMethodDefinitionStages.WithExecute withLanguage(String language); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsOCRMethodDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - /** - * When set to True, the image goes through additional processing to come with additional candidates. - * image/tiff is not supported when enhanced is set to true - * Note: This impacts the response time. - * - * @return next definition stage - */ - ImageModerationsOCRMethodDefinitionStages.WithExecute withEnhanced(Boolean enhanced); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsOCRMethodDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the OCR object if successful. - */ - OCR execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the OCR object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of oCRMethod definition. - */ - interface ImageModerationsOCRMethodDefinition extends - ImageModerationsOCRMethodDefinitionStages.WithLanguage, - ImageModerationsOCRMethodDefinitionStages.WithExecute { - } + Observable oCRMethodAsync(String language, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable> oCRMethodWithServiceResponseAsync(String language, Boolean cacheImage, Boolean enhanced); /** * Returns probabilities of the image containing racy or adult content. * - * @param evaluateMethodOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - - Evaluate evaluateMethod(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter); + Evaluate evaluateMethod(); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture evaluateMethodAsync(final ServiceCallback serviceCallback); /** * Returns probabilities of the image containing racy or adult content. * - * @param evaluateMethodOptionalParameter 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 Evaluate object */ - - Observable evaluateMethodAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter); + Observable evaluateMethodAsync(); /** * Returns probabilities of the image containing racy or adult content. * - * @return the first stage of the evaluateMethod call + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object */ - ImageModerationsEvaluateMethodDefinitionStages.WithExecute evaluateMethod(); + Observable> evaluateMethodWithServiceResponseAsync(); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + Evaluate evaluateMethod(Boolean cacheImage); /** - * Grouping of evaluateMethod definition stages. + * Returns probabilities of the image containing racy or adult content. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object */ - interface ImageModerationsEvaluateMethodDefinitionStages { + ServiceFuture evaluateMethodAsync(Boolean cacheImage, final ServiceCallback serviceCallback); - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsEvaluateMethodDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable evaluateMethodAsync(Boolean cacheImage); - } + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable> evaluateMethodWithServiceResponseAsync(Boolean cacheImage); - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsEvaluateMethodDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Evaluate object if successful. - */ - Evaluate execute(); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. + */ + MatchResponse matchMethod(); - /** - * Execute the request asynchronously. - * - * @return the observable to the Evaluate object - */ - Observable executeAsync(); - } - } + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture matchMethodAsync(final ServiceCallback serviceCallback); /** - * The entirety of evaluateMethod definition. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object */ - interface ImageModerationsEvaluateMethodDefinition extends - ImageModerationsEvaluateMethodDefinitionStages.WithExecute { - } + Observable matchMethodAsync(); /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable> matchMethodWithServiceResponseAsync(); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - - MatchResponse matchMethod(MatchMethodOptionalParameter matchMethodOptionalParameter); + MatchResponse matchMethod(String listId, Boolean cacheImage); /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the MatchResponse object + * @return the {@link ServiceFuture} object */ - - Observable matchMethodAsync(MatchMethodOptionalParameter matchMethodOptionalParameter); + ServiceFuture matchMethodAsync(String listId, Boolean cacheImage, final ServiceCallback serviceCallback); /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @return the first stage of the matchMethod call + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object */ - ImageModerationsMatchMethodDefinitionStages.WithExecute matchMethod(); + Observable matchMethodAsync(String listId, Boolean cacheImage); /** - * Grouping of matchMethod definition stages. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object */ - interface ImageModerationsMatchMethodDefinitionStages { + Observable> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage); - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * The list Id. - * - * @return next definition stage - */ - ImageModerationsMatchMethodDefinitionStages.WithExecute withListId(String listId); + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. + */ + FoundFaces findFacesFileInput(byte[] imageStream); - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsMatchMethodDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture findFacesFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback); - } + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable findFacesFileInputAsync(byte[] imageStream); - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsMatchMethodDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the MatchResponse object if successful. - */ - MatchResponse execute(); + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable> findFacesFileInputWithServiceResponseAsync(byte[] imageStream); + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. + */ + FoundFaces findFacesFileInput(byte[] imageStream, Boolean cacheImage); - /** - * Execute the request asynchronously. - * - * @return the observable to the MatchResponse object - */ - Observable executeAsync(); - } - } + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage, final ServiceCallback serviceCallback); /** - * The entirety of matchMethod definition. + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object */ - interface ImageModerationsMatchMethodDefinition extends - ImageModerationsMatchMethodDefinitionStages.WithExecute { - } + Observable findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage); /** * Returns the list of faces found. * * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable> findFacesFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage); + + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - - FoundFaces findFacesFileInput(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter); + FoundFaces findFacesUrlInput(String contentType, BodyModel imageUrl); /** * Returns the list of faces found. * - * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param contentType The content type. + * @param imageUrl The image url. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the FoundFaces object + * @return the {@link ServiceFuture} object */ - - Observable findFacesFileInputAsync(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter); + ServiceFuture findFacesUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback); /** * Returns the list of faces found. * - * @return the first stage of the findFacesFileInput call - */ - ImageModerationsFindFacesFileInputDefinitionStages.WithImageStream findFacesFileInput(); - - /** - * Grouping of findFacesFileInput definition stages. - */ - interface ImageModerationsFindFacesFileInputDefinitionStages { - /** - * The stage of the definition to be specify imageStream. - */ - interface WithImageStream { - /** - * The image file. - * - * @return next definition stage - */ - ImageModerationsFindFacesFileInputDefinitionStages.WithExecute withImageStream(byte[] imageStream); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsFindFacesFileInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsFindFacesFileInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the FoundFaces object if successful. - */ - FoundFaces execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the FoundFaces object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of findFacesFileInput definition. - */ - interface ImageModerationsFindFacesFileInputDefinition extends - ImageModerationsFindFacesFileInputDefinitionStages.WithImageStream, - ImageModerationsFindFacesFileInputDefinitionStages.WithExecute { - } + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable findFacesUrlInputAsync(String contentType, BodyModel imageUrl); /** * Returns the list of faces found. * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter 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 FoundFaces object + */ + Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl); + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - - FoundFaces findFacesUrlInput(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter); + FoundFaces findFacesUrlInput(String contentType, BodyModel imageUrl, Boolean cacheImage); /** * Returns the list of faces found. * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture findFacesUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage, final ServiceCallback serviceCallback); + + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FoundFaces object */ - - Observable findFacesUrlInputAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter); + Observable findFacesUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage); /** * Returns the list of faces found. * - * @return the first stage of the findFacesUrlInput call - */ - ImageModerationsFindFacesUrlInputDefinitionStages.WithContentType findFacesUrlInput(); - - /** - * Grouping of findFacesUrlInput definition stages. - */ - interface ImageModerationsFindFacesUrlInputDefinitionStages { - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithImageUrl withContentType(String contentType); - } - /** - * The stage of the definition to be specify imageUrl. - */ - interface WithImageUrl { - /** - * The image url. - * - * @return next definition stage - */ - ImageModerationsFindFacesUrlInputDefinitionStages.WithExecute withImageUrl(BodyModelModel imageUrl); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsFindFacesUrlInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsFindFacesUrlInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the FoundFaces object if successful. - */ - FoundFaces execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the FoundFaces object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of findFacesUrlInput definition. - */ - interface ImageModerationsFindFacesUrlInputDefinition extends - ImageModerationsFindFacesUrlInputDefinitionStages.WithContentType, - ImageModerationsFindFacesUrlInputDefinitionStages.WithImageUrl, - ImageModerationsFindFacesUrlInputDefinitionStages.WithExecute { - } - - /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, Boolean cacheImage); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - - OCR oCRUrlInput(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter); + OCR oCRUrlInput(String language, String contentType, BodyModel imageUrl); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl); /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter 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 OCR object */ - - Observable oCRUrlInputAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter); - - /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. - * - * @return the first stage of the oCRUrlInput call - */ - ImageModerationsOCRUrlInputDefinitionStages.WithLanguage oCRUrlInput(); - - /** - * Grouping of oCRUrlInput definition stages. - */ - interface ImageModerationsOCRUrlInputDefinitionStages { - /** - * The stage of the definition to be specify language. - */ - interface WithLanguage { - /** - * Language of the terms. - * - * @return next definition stage - */ - WithContentType withLanguage(String language); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithImageUrl withContentType(String contentType); - } - /** - * The stage of the definition to be specify imageUrl. - */ - interface WithImageUrl { - /** - * The image url. - * - * @return next definition stage - */ - ImageModerationsOCRUrlInputDefinitionStages.WithExecute withImageUrl(BodyModelModel imageUrl); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsOCRUrlInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - /** - * When set to True, the image goes through additional processing to come with additional candidates. - * image/tiff is not supported when enhanced is set to true - * Note: This impacts the response time. - * - * @return next definition stage - */ - ImageModerationsOCRUrlInputDefinitionStages.WithExecute withEnhanced(Boolean enhanced); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsOCRUrlInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the OCR object if successful. - */ - OCR execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the OCR object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of oCRUrlInput definition. - */ - interface ImageModerationsOCRUrlInputDefinition extends - ImageModerationsOCRUrlInputDefinitionStages.WithLanguage, - ImageModerationsOCRUrlInputDefinitionStages.WithContentType, - ImageModerationsOCRUrlInputDefinitionStages.WithImageUrl, - ImageModerationsOCRUrlInputDefinitionStages.WithExecute { - } - - /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModel imageUrl); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + OCR oCRUrlInput(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - - OCR oCRFileInput(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter); + OCR oCRFileInput(String language, byte[] imageStream); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, final ServiceCallback serviceCallback); /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter 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 OCR object */ - - Observable oCRFileInputAsync(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter); - - /** - * Returns any text found in the image for the language specified. If no language is specified in input then - * the detection defaults to English. - * - * @return the first stage of the oCRFileInput call - */ - ImageModerationsOCRFileInputDefinitionStages.WithLanguage oCRFileInput(); - - /** - * Grouping of oCRFileInput definition stages. - */ - interface ImageModerationsOCRFileInputDefinitionStages { - /** - * The stage of the definition to be specify language. - */ - interface WithLanguage { - /** - * Language of the terms. - * - * @return next definition stage - */ - WithImageStream withLanguage(String language); - } - /** - * The stage of the definition to be specify imageStream. - */ - interface WithImageStream { - /** - * The image file. - * - * @return next definition stage - */ - ImageModerationsOCRFileInputDefinitionStages.WithExecute withImageStream(byte[] imageStream); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsOCRFileInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - /** - * When set to True, the image goes through additional processing to come with additional candidates. - * image/tiff is not supported when enhanced is set to true - * Note: This impacts the response time. - * - * @return next definition stage - */ - ImageModerationsOCRFileInputDefinitionStages.WithExecute withEnhanced(Boolean enhanced); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsOCRFileInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the OCR object if successful. - */ - OCR execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the OCR object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of oCRFileInput definition. - */ - interface ImageModerationsOCRFileInputDefinition extends - ImageModerationsOCRFileInputDefinitionStages.WithLanguage, - ImageModerationsOCRFileInputDefinitionStages.WithImageStream, - ImageModerationsOCRFileInputDefinitionStages.WithExecute { - } + Observable oCRFileInputAsync(String language, byte[] imageStream); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + OCR oCRFileInput(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable oCRFileInputAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced); + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + Observable> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + Evaluate evaluateFileInput(byte[] imageStream); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture evaluateFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable evaluateFileInputAsync(byte[] imageStream); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable> evaluateFileInputWithServiceResponseAsync(byte[] imageStream); /** * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - - Evaluate evaluateFileInput(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter); + Evaluate evaluateFileInput(byte[] imageStream, Boolean cacheImage); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture evaluateFileInputAsync(byte[] imageStream, Boolean cacheImage, final ServiceCallback serviceCallback); /** * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Evaluate object */ - - Observable evaluateFileInputAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter); + Observable evaluateFileInputAsync(byte[] imageStream, Boolean cacheImage); /** * Returns probabilities of the image containing racy or adult content. * - * @return the first stage of the evaluateFileInput call - */ - ImageModerationsEvaluateFileInputDefinitionStages.WithImageStream evaluateFileInput(); - - /** - * Grouping of evaluateFileInput definition stages. - */ - interface ImageModerationsEvaluateFileInputDefinitionStages { - /** - * The stage of the definition to be specify imageStream. - */ - interface WithImageStream { - /** - * The image file. - * - * @return next definition stage - */ - ImageModerationsEvaluateFileInputDefinitionStages.WithExecute withImageStream(byte[] imageStream); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsEvaluateFileInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsEvaluateFileInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Evaluate object if successful. - */ - Evaluate execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Evaluate object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of evaluateFileInput definition. - */ - interface ImageModerationsEvaluateFileInputDefinition extends - ImageModerationsEvaluateFileInputDefinitionStages.WithImageStream, - ImageModerationsEvaluateFileInputDefinitionStages.WithExecute { - } + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage); /** * Returns probabilities of the image containing racy or adult content. * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - - Evaluate evaluateUrlInput(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter); + Evaluate evaluateUrlInput(String contentType, BodyModel imageUrl); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture evaluateUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback); /** * Returns probabilities of the image containing racy or adult content. * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter 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 Evaluate object */ - - Observable evaluateUrlInputAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter); + Observable evaluateUrlInputAsync(String contentType, BodyModel imageUrl); /** * Returns probabilities of the image containing racy or adult content. * - * @return the first stage of the evaluateUrlInput call - */ - ImageModerationsEvaluateUrlInputDefinitionStages.WithContentType evaluateUrlInput(); - - /** - * Grouping of evaluateUrlInput definition stages. - */ - interface ImageModerationsEvaluateUrlInputDefinitionStages { - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithImageUrl withContentType(String contentType); - } - /** - * The stage of the definition to be specify imageUrl. - */ - interface WithImageUrl { - /** - * The image url. - * - * @return next definition stage - */ - ImageModerationsEvaluateUrlInputDefinitionStages.WithExecute withImageUrl(BodyModelModel imageUrl); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsEvaluateUrlInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsEvaluateUrlInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Evaluate object if successful. - */ - Evaluate execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Evaluate object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of evaluateUrlInput definition. - */ - interface ImageModerationsEvaluateUrlInputDefinition extends - ImageModerationsEvaluateUrlInputDefinitionStages.WithContentType, - ImageModerationsEvaluateUrlInputDefinitionStages.WithImageUrl, - ImageModerationsEvaluateUrlInputDefinitionStages.WithExecute { - } - - /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl); + /** + * Returns probabilities of the image containing racy or adult content. * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + Evaluate evaluateUrlInput(String contentType, BodyModel imageUrl, Boolean cacheImage); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture evaluateUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage, final ServiceCallback serviceCallback); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable evaluateUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage); + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, Boolean cacheImage); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. + */ + MatchResponse matchUrlInput(String contentType, BodyModel imageUrl); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture matchUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable matchUrlInputAsync(String contentType, BodyModel imageUrl); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - - MatchResponse matchUrlInput(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter); + MatchResponse matchUrlInput(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture matchUrlInputAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage, final ServiceCallback serviceCallback); /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable matchUrlInputAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. + */ + MatchResponse matchFileInput(byte[] imageStream); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture matchFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MatchResponse object */ - - Observable matchUrlInputAsync(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter); - - /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. - * - * @return the first stage of the matchUrlInput call - */ - ImageModerationsMatchUrlInputDefinitionStages.WithContentType matchUrlInput(); - - /** - * Grouping of matchUrlInput definition stages. - */ - interface ImageModerationsMatchUrlInputDefinitionStages { - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithImageUrl withContentType(String contentType); - } - /** - * The stage of the definition to be specify imageUrl. - */ - interface WithImageUrl { - /** - * The image url. - * - * @return next definition stage - */ - ImageModerationsMatchUrlInputDefinitionStages.WithExecute withImageUrl(BodyModelModel imageUrl); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * The list Id. - * - * @return next definition stage - */ - ImageModerationsMatchUrlInputDefinitionStages.WithExecute withListId(String listId); - - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsMatchUrlInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsMatchUrlInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the MatchResponse object if successful. - */ - MatchResponse execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the MatchResponse object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of matchUrlInput definition. - */ - interface ImageModerationsMatchUrlInputDefinition extends - ImageModerationsMatchUrlInputDefinitionStages.WithContentType, - ImageModerationsMatchUrlInputDefinitionStages.WithImageUrl, - ImageModerationsMatchUrlInputDefinitionStages.WithExecute { - } - - /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + Observable matchFileInputAsync(byte[] imageStream); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter 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 MatchResponse object + */ + Observable> matchFileInputWithServiceResponseAsync(byte[] imageStream); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - - MatchResponse matchFileInput(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter); + MatchResponse matchFileInput(byte[] imageStream, String listId, Boolean cacheImage); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture matchFileInputAsync(byte[] imageStream, String listId, Boolean cacheImage, final ServiceCallback serviceCallback); + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + Observable matchFileInputAsync(byte[] imageStream, String listId, Boolean cacheImage); /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MatchResponse object */ - - Observable matchFileInputAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter); - - /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image - * lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - * Returns ID and tags of matching image.<br/> - * <br/> - * Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected - * in the response. - * - * @return the first stage of the matchFileInput call - */ - ImageModerationsMatchFileInputDefinitionStages.WithImageStream matchFileInput(); - - /** - * Grouping of matchFileInput definition stages. - */ - interface ImageModerationsMatchFileInputDefinitionStages { - /** - * The stage of the definition to be specify imageStream. - */ - interface WithImageStream { - /** - * The image file. - * - * @return next definition stage - */ - ImageModerationsMatchFileInputDefinitionStages.WithExecute withImageStream(byte[] imageStream); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * The list Id. - * - * @return next definition stage - */ - ImageModerationsMatchFileInputDefinitionStages.WithExecute withListId(String listId); - - /** - * Whether to retain the submitted image for future use; defaults to false if omitted. - * - * @return next definition stage - */ - ImageModerationsMatchFileInputDefinitionStages.WithExecute withCacheImage(Boolean cacheImage); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ImageModerationsMatchFileInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the MatchResponse object if successful. - */ - MatchResponse execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the MatchResponse object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of matchFileInput definition. - */ - interface ImageModerationsMatchFileInputDefinition extends - ImageModerationsMatchFileInputDefinitionStages.WithImageStream, - ImageModerationsMatchFileInputDefinitionStages.WithExecute { - } + Observable> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImageLists.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImageLists.java index 20f2226002ac..13614d640bc0 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImageLists.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImageLists.java @@ -9,9 +9,13 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Body; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ImageList; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import java.util.List; import rx.Observable; @@ -20,7 +24,6 @@ * in ListManagementImageLists. */ public interface ListManagementImageLists { - /** * Returns the details of the image list with list Id equal to list Id passed. * @@ -32,6 +35,16 @@ public interface ListManagementImageLists { */ ImageList getDetails(String listId); + /** + * Returns the details of the image list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getDetailsAsync(String listId, final ServiceCallback serviceCallback); + /** * Returns the details of the image list with list Id equal to list Id passed. * @@ -41,7 +54,14 @@ public interface ListManagementImageLists { */ Observable getDetailsAsync(String listId); - + /** + * Returns the details of the image list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageList object + */ + Observable> getDetailsWithServiceResponseAsync(String listId); /** * Deletes image list with the list Id equal to list Id passed. @@ -54,6 +74,16 @@ public interface ListManagementImageLists { */ String delete(String listId); + /** + * Deletes image list with the list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String listId, final ServiceCallback serviceCallback); + /** * Deletes image list with the list Id equal to list Id passed. * @@ -63,57 +93,104 @@ public interface ListManagementImageLists { */ Observable deleteAsync(String listId); - + /** + * Deletes image list with the list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteWithServiceResponseAsync(String listId); /** * Updates an image list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ImageList object if successful. */ - ImageList update(String listId, String contentType, BodyModel bodyParameter); + ImageList update(String listId, String contentType, Body body); /** * Updates an image list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageList object + * @return the {@link ServiceFuture} object */ - Observable updateAsync(String listId, String contentType, BodyModel bodyParameter); + ServiceFuture updateAsync(String listId, String contentType, Body body, final ServiceCallback serviceCallback); + /** + * Updates an image list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageList object + */ + Observable updateAsync(String listId, String contentType, Body body); + /** + * Updates an image list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageList object + */ + Observable> updateWithServiceResponseAsync(String listId, String contentType, Body body); /** * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ImageList object if successful. */ - ImageList create(String contentType, BodyModel bodyParameter); + ImageList create(String contentType, Body body); /** * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the ImageList object + * @return the {@link ServiceFuture} object */ - Observable createAsync(String contentType, BodyModel bodyParameter); + ServiceFuture createAsync(String contentType, Body body, final ServiceCallback serviceCallback); + /** + * Creates an image list. + * + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageList object + */ + Observable createAsync(String contentType, Body body); + /** + * Creates an image list. + * + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageList object + */ + Observable> createWithServiceResponseAsync(String contentType, Body body); /** * Gets all the Image Lists. @@ -125,6 +202,15 @@ public interface ListManagementImageLists { */ List getAllImageLists(); + /** + * Gets all the Image Lists. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> getAllImageListsAsync(final ServiceCallback> serviceCallback); + /** * Gets all the Image Lists. * @@ -133,7 +219,13 @@ public interface ListManagementImageLists { */ Observable> getAllImageListsAsync(); - + /** + * Gets all the Image Lists. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<ImageList> object + */ + Observable>> getAllImageListsWithServiceResponseAsync(); /** * Refreshes the index of the list with list Id equal to list Id passed. @@ -146,6 +238,16 @@ public interface ListManagementImageLists { */ RefreshIndex refreshIndexMethod(String listId); + /** + * Refreshes the index of the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture refreshIndexMethodAsync(String listId, final ServiceCallback serviceCallback); + /** * Refreshes the index of the list with list Id equal to list Id passed. * @@ -155,5 +257,13 @@ public interface ListManagementImageLists { */ Observable refreshIndexMethodAsync(String listId); + /** + * Refreshes the index of the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RefreshIndex object + */ + Observable> refreshIndexMethodWithServiceResponseAsync(String listId); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImages.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImages.java index e67c32e55e76..134df7a89157 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImages.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementImages.java @@ -8,13 +8,14 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageFileInputOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModelModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Image; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ImageIds; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import rx.Observable; /** @@ -26,97 +27,86 @@ public interface ListManagementImages { * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - - Image addImage(String listId, AddImageOptionalParameter addImageOptionalParameter); + Image addImage(String listId); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageAsync(String listId, final ServiceCallback serviceCallback); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable addImageAsync(String listId); /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter 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 Image object */ - - Observable addImageAsync(String listId, AddImageOptionalParameter addImageOptionalParameter); + Observable> addImageWithServiceResponseAsync(String listId); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + Image addImage(String listId, Integer tag, String label); /** * Add an image to the list with list Id equal to list Id passed. * - * @return the first stage of the addImage call - */ - ListManagementImagesAddImageDefinitionStages.WithListId addImage(); - - /** - * Grouping of addImage definition stages. - */ - interface ListManagementImagesAddImageDefinitionStages { - /** - * The stage of the definition to be specify listId. - */ - interface WithListId { - /** - * List Id of the image list. - * - * @return next definition stage - */ - ListManagementImagesAddImageDefinitionStages.WithExecute withListId(String listId); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Tag for the image. - * - * @return next definition stage - */ - ListManagementImagesAddImageDefinitionStages.WithExecute withTag(Integer tag); - - /** - * The image label. - * - * @return next definition stage - */ - ListManagementImagesAddImageDefinitionStages.WithExecute withLabel(String label); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ListManagementImagesAddImageDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Image object if successful. - */ - Image execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Image object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addImage definition. - */ - interface ListManagementImagesAddImageDefinition extends - ListManagementImagesAddImageDefinitionStages.WithListId, - ListManagementImagesAddImageDefinitionStages.WithExecute { - } + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageAsync(String listId, Integer tag, String label, final ServiceCallback serviceCallback); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable addImageAsync(String listId, Integer tag, String label); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable> addImageWithServiceResponseAsync(String listId, Integer tag, String label); /** * Deletes all images from the list with list Id equal to list Id passed. @@ -129,6 +119,16 @@ interface ListManagementImagesAddImageDefinition extends */ String deleteAllImages(String listId); + /** + * Deletes all images from the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAllImagesAsync(String listId, final ServiceCallback serviceCallback); + /** * Deletes all images from the list with list Id equal to list Id passed. * @@ -138,7 +138,14 @@ interface ListManagementImagesAddImageDefinition extends */ Observable deleteAllImagesAsync(String listId); - + /** + * Deletes all images from the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteAllImagesWithServiceResponseAsync(String listId); /** * Gets all image Ids from the list with list Id equal to list Id passed. @@ -151,6 +158,16 @@ interface ListManagementImagesAddImageDefinition extends */ ImageIds getAllImageIds(String listId); + /** + * Gets all image Ids from the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAllImageIdsAsync(String listId, final ServiceCallback serviceCallback); + /** * Gets all image Ids from the list with list Id equal to list Id passed. * @@ -160,7 +177,14 @@ interface ListManagementImagesAddImageDefinition extends */ Observable getAllImageIdsAsync(String listId); - + /** + * Gets all image Ids from the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the ImageIds object + */ + Observable> getAllImageIdsWithServiceResponseAsync(String listId); /** * Deletes an image from the list with list Id and image Id passed. @@ -174,6 +198,17 @@ interface ListManagementImagesAddImageDefinition extends */ String deleteImage(String listId, String imageId); + /** + * Deletes an image from the list with list Id and image Id passed. + * + * @param listId List Id of the image list. + * @param imageId Id of the image. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteImageAsync(String listId, String imageId, final ServiceCallback serviceCallback); + /** * Deletes an image from the list with list Id and image Id passed. * @@ -184,6 +219,51 @@ interface ListManagementImagesAddImageDefinition extends */ Observable deleteImageAsync(String listId, String imageId); + /** + * Deletes an image from the list with list Id and image Id passed. + * + * @param listId List Id of the image list. + * @param imageId Id of the image. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteImageWithServiceResponseAsync(String listId, String imageId); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + Image addImageUrlInput(String listId, String contentType, BodyModel imageUrl); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl); /** * Add an image to the list with list Id equal to list Id passed. @@ -191,14 +271,51 @@ interface ListManagementImagesAddImageDefinition extends * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter 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 Image object + */ + Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModel imageUrl); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - - Image addImageUrlInput(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter); + Image addImageUrlInput(String listId, String contentType, BodyModel imageUrl, Integer tag, String label); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label, final ServiceCallback serviceCallback); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label); /** * Add an image to the list with list Id equal to list Id passed. @@ -206,215 +323,104 @@ interface ListManagementImagesAddImageDefinition extends * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param tag Tag for the image. + * @param label The image label. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Image object */ - - Observable addImageUrlInputAsync(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter); + Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + Image addImageFileInput(String listId, byte[] imageStream); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageFileInputAsync(String listId, byte[] imageStream, final ServiceCallback serviceCallback); /** * Add an image to the list with list Id equal to list Id passed. * - * @return the first stage of the addImageUrlInput call - */ - ListManagementImagesAddImageUrlInputDefinitionStages.WithListId addImageUrlInput(); - - /** - * Grouping of addImageUrlInput definition stages. - */ - interface ListManagementImagesAddImageUrlInputDefinitionStages { - /** - * The stage of the definition to be specify listId. - */ - interface WithListId { - /** - * List Id of the image list. - * - * @return next definition stage - */ - WithContentType withListId(String listId); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithImageUrl withContentType(String contentType); - } - /** - * The stage of the definition to be specify imageUrl. - */ - interface WithImageUrl { - /** - * The image url. - * - * @return next definition stage - */ - ListManagementImagesAddImageUrlInputDefinitionStages.WithExecute withImageUrl(BodyModelModel imageUrl); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Tag for the image. - * - * @return next definition stage - */ - ListManagementImagesAddImageUrlInputDefinitionStages.WithExecute withTag(Integer tag); - - /** - * The image label. - * - * @return next definition stage - */ - ListManagementImagesAddImageUrlInputDefinitionStages.WithExecute withLabel(String label); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ListManagementImagesAddImageUrlInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Image object if successful. - */ - Image execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Image object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addImageUrlInput definition. - */ - interface ListManagementImagesAddImageUrlInputDefinition extends - ListManagementImagesAddImageUrlInputDefinitionStages.WithListId, - ListManagementImagesAddImageUrlInputDefinitionStages.WithContentType, - ListManagementImagesAddImageUrlInputDefinitionStages.WithImageUrl, - ListManagementImagesAddImageUrlInputDefinitionStages.WithExecute { - } + * @param listId List Id of the image list. + * @param imageStream The image file. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable addImageFileInputAsync(String listId, byte[] imageStream); /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter 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 Image object + */ + Observable> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - - Image addImageFileInput(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter); + Image addImageFileInput(String listId, byte[] imageStream, Integer tag, String label); + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addImageFileInputAsync(String listId, byte[] imageStream, Integer tag, String label, final ServiceCallback serviceCallback); /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter the object representing the optional parameters to be set before calling this API + * @param tag Tag for the image. + * @param label The image label. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Image object */ - - Observable addImageFileInputAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter); + Observable addImageFileInputAsync(String listId, byte[] imageStream, Integer tag, String label); /** * Add an image to the list with list Id equal to list Id passed. * - * @return the first stage of the addImageFileInput call - */ - ListManagementImagesAddImageFileInputDefinitionStages.WithListId addImageFileInput(); - - /** - * Grouping of addImageFileInput definition stages. - */ - interface ListManagementImagesAddImageFileInputDefinitionStages { - /** - * The stage of the definition to be specify listId. - */ - interface WithListId { - /** - * List Id of the image list. - * - * @return next definition stage - */ - WithImageStream withListId(String listId); - } - /** - * The stage of the definition to be specify imageStream. - */ - interface WithImageStream { - /** - * The image file. - * - * @return next definition stage - */ - ListManagementImagesAddImageFileInputDefinitionStages.WithExecute withImageStream(byte[] imageStream); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Tag for the image. - * - * @return next definition stage - */ - ListManagementImagesAddImageFileInputDefinitionStages.WithExecute withTag(Integer tag); - - /** - * The image label. - * - * @return next definition stage - */ - ListManagementImagesAddImageFileInputDefinitionStages.WithExecute withLabel(String label); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ListManagementImagesAddImageFileInputDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Image object if successful. - */ - Image execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Image object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addImageFileInput definition. - */ - interface ListManagementImagesAddImageFileInputDefinition extends - ListManagementImagesAddImageFileInputDefinitionStages.WithListId, - ListManagementImagesAddImageFileInputDefinitionStages.WithImageStream, - ListManagementImagesAddImageFileInputDefinitionStages.WithExecute { - } + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + Observable> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream, Integer tag, String label); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTermLists.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTermLists.java index bb68a3d6e54e..18a8bd1de757 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTermLists.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTermLists.java @@ -9,9 +9,13 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Body; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.TermList; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import java.util.List; import rx.Observable; @@ -20,7 +24,6 @@ * in ListManagementTermLists. */ public interface ListManagementTermLists { - /** * Returns list Id details of the term list with list Id equal to list Id passed. * @@ -32,6 +35,16 @@ public interface ListManagementTermLists { */ TermList getDetails(String listId); + /** + * Returns list Id details of the term list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getDetailsAsync(String listId, final ServiceCallback serviceCallback); + /** * Returns list Id details of the term list with list Id equal to list Id passed. * @@ -41,7 +54,14 @@ public interface ListManagementTermLists { */ Observable getDetailsAsync(String listId); - + /** + * Returns list Id details of the term list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TermList object + */ + Observable> getDetailsWithServiceResponseAsync(String listId); /** * Deletes term list with the list Id equal to list Id passed. @@ -54,6 +74,16 @@ public interface ListManagementTermLists { */ String delete(String listId); + /** + * Deletes term list with the list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAsync(String listId, final ServiceCallback serviceCallback); + /** * Deletes term list with the list Id equal to list Id passed. * @@ -63,57 +93,104 @@ public interface ListManagementTermLists { */ Observable deleteAsync(String listId); - + /** + * Deletes term list with the list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteWithServiceResponseAsync(String listId); /** * Updates an Term List. * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TermList object if successful. */ - TermList update(String listId, String contentType, BodyModel bodyParameter); + TermList update(String listId, String contentType, Body body); /** * Updates an Term List. * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TermList object + * @return the {@link ServiceFuture} object */ - Observable updateAsync(String listId, String contentType, BodyModel bodyParameter); + ServiceFuture updateAsync(String listId, String contentType, Body body, final ServiceCallback serviceCallback); + /** + * Updates an Term List. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TermList object + */ + Observable updateAsync(String listId, String contentType, Body body); + /** + * Updates an Term List. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TermList object + */ + Observable> updateWithServiceResponseAsync(String listId, String contentType, Body body); /** * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TermList object if successful. */ - TermList create(String contentType, BodyModel bodyParameter); + TermList create(String contentType, Body body); /** * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the TermList object + * @return the {@link ServiceFuture} object */ - Observable createAsync(String contentType, BodyModel bodyParameter); + ServiceFuture createAsync(String contentType, Body body, final ServiceCallback serviceCallback); + /** + * Creates a Term List. + * + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TermList object + */ + Observable createAsync(String contentType, Body body); + /** + * Creates a Term List. + * + * @param contentType The content type. + * @param body Schema of the body. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the TermList object + */ + Observable> createWithServiceResponseAsync(String contentType, Body body); /** * gets all the Term Lists. @@ -125,6 +202,15 @@ public interface ListManagementTermLists { */ List getAllTermLists(); + /** + * gets all the Term Lists. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> getAllTermListsAsync(final ServiceCallback> serviceCallback); + /** * gets all the Term Lists. * @@ -133,7 +219,13 @@ public interface ListManagementTermLists { */ Observable> getAllTermListsAsync(); - + /** + * gets all the Term Lists. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<TermList> object + */ + Observable>> getAllTermListsWithServiceResponseAsync(); /** * Refreshes the index of the list with list Id equal to list ID passed. @@ -147,6 +239,17 @@ public interface ListManagementTermLists { */ RefreshIndex refreshIndexMethod(String listId, String language); + /** + * Refreshes the index of the list with list Id equal to list ID passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture refreshIndexMethodAsync(String listId, String language, final ServiceCallback serviceCallback); + /** * Refreshes the index of the list with list Id equal to list ID passed. * @@ -157,5 +260,14 @@ public interface ListManagementTermLists { */ Observable refreshIndexMethodAsync(String listId, String language); + /** + * Refreshes the index of the list with list Id equal to list ID passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the RefreshIndex object + */ + Observable> refreshIndexMethodWithServiceResponseAsync(String listId, String language); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTerms.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTerms.java index ca24d78d8cd3..758e0d37cbab 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTerms.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/ListManagementTerms.java @@ -8,9 +8,12 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.GetAllTermsOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Terms; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import rx.Observable; /** @@ -18,12 +21,11 @@ * in ListManagementTerms. */ public interface ListManagementTerms { - /** * Add a term to the term list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param term Term to be deleted. + * @param term Term to be deleted * @param language Language of the terms. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server @@ -36,20 +38,41 @@ public interface ListManagementTerms { * Add a term to the term list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param term Term to be deleted. + * @param term Term to be deleted + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addTermAsync(String listId, String term, String language, final ServiceCallback serviceCallback); + + /** + * Add a term to the term list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param term Term to be deleted * @param language Language of the terms. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Object object */ Observable addTermAsync(String listId, String term, String language); - + /** + * Add a term to the term list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param term Term to be deleted + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Object object + */ + Observable> addTermWithServiceResponseAsync(String listId, String term, String language); /** * Deletes a term from the list with list Id equal to the list Id passed. * * @param listId List Id of the image list. - * @param term Term to be deleted. + * @param term Term to be deleted * @param language Language of the terms. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server @@ -62,123 +85,128 @@ public interface ListManagementTerms { * Deletes a term from the list with list Id equal to the list Id passed. * * @param listId List Id of the image list. - * @param term Term to be deleted. + * @param term Term to be deleted + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteTermAsync(String listId, String term, String language, final ServiceCallback serviceCallback); + + /** + * Deletes a term from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param term Term to be deleted * @param language Language of the terms. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the String object */ Observable deleteTermAsync(String listId, String term, String language); + /** + * Deletes a term from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param term Term to be deleted + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteTermWithServiceResponseAsync(String listId, String term, String language); /** * Gets all terms from the list with list Id equal to the list Id passed. * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Terms object if successful. */ - - Terms getAllTerms(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter); + Terms getAllTerms(String listId, String language); + + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAllTermsAsync(String listId, String language, final ServiceCallback serviceCallback); + + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Terms object + */ + Observable getAllTermsAsync(String listId, String language); /** * Gets all terms from the list with list Id equal to the list Id passed. * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter 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 Terms object */ - - Observable getAllTermsAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter); + Observable> getAllTermsWithServiceResponseAsync(String listId, String language); + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Terms object if successful. + */ + Terms getAllTerms(String listId, String language, Integer offset, Integer limit); /** * Gets all terms from the list with list Id equal to the list Id passed. * - * @return the first stage of the getAllTerms call - */ - ListManagementTermsGetAllTermsDefinitionStages.WithListId getAllTerms(); - - /** - * Grouping of getAllTerms definition stages. - */ - interface ListManagementTermsGetAllTermsDefinitionStages { - /** - * The stage of the definition to be specify listId. - */ - interface WithListId { - /** - * List Id of the image list. - * - * @return next definition stage - */ - WithLanguage withListId(String listId); - } - /** - * The stage of the definition to be specify language. - */ - interface WithLanguage { - /** - * Language of the terms. - * - * @return next definition stage - */ - ListManagementTermsGetAllTermsDefinitionStages.WithExecute withLanguage(String language); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * The pagination start index. - * - * @return next definition stage - */ - ListManagementTermsGetAllTermsDefinitionStages.WithExecute withOffset(Integer offset); - - /** - * The max limit. - * - * @return next definition stage - */ - ListManagementTermsGetAllTermsDefinitionStages.WithExecute withLimit(Integer limit); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ListManagementTermsGetAllTermsDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Terms object if successful. - */ - Terms execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Terms object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of getAllTerms definition. - */ - interface ListManagementTermsGetAllTermsDefinition extends - ListManagementTermsGetAllTermsDefinitionStages.WithListId, - ListManagementTermsGetAllTermsDefinitionStages.WithLanguage, - ListManagementTermsGetAllTermsDefinitionStages.WithExecute { - } + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getAllTermsAsync(String listId, String language, Integer offset, Integer limit, final ServiceCallback serviceCallback); + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Terms object + */ + Observable getAllTermsAsync(String listId, String language, Integer offset, Integer limit); + + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Terms object + */ + Observable> getAllTermsWithServiceResponseAsync(String listId, String language, Integer offset, Integer limit); /** * Deletes all terms from the list with list Id equal to the list Id passed. @@ -192,6 +220,17 @@ interface ListManagementTermsGetAllTermsDefinition extends */ String deleteAllTerms(String listId, String language); + /** + * Deletes all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture deleteAllTermsAsync(String listId, String language, final ServiceCallback serviceCallback); + /** * Deletes all terms from the list with list Id equal to the list Id passed. * @@ -202,5 +241,14 @@ interface ListManagementTermsGetAllTermsDefinition extends */ Observable deleteAllTermsAsync(String listId, String language); + /** + * Deletes all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the String object + */ + Observable> deleteAllTermsWithServiceResponseAsync(String listId, String language); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/Reviews.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/Reviews.java index 7ce1c9ce462d..76e1f3a4a61d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/Reviews.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/Reviews.java @@ -8,13 +8,6 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateReviewsOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateJobOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.GetVideoFramesOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameUrlOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameStreamOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateReviewBodyItem; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsBodyItem; @@ -24,6 +17,10 @@ import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Review; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.TranscriptModerationBodyItem; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.VideoFrameBodyItem; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import java.util.List; import rx.Observable; @@ -32,7 +29,6 @@ * in Reviews. */ public interface Reviews { - /** * Returns review details for the review Id passed. * @@ -45,6 +41,17 @@ public interface Reviews { */ Review getReview(String teamName, String reviewId); + /** + * Returns review details for the review Id passed. + * + * @param teamName Your Team Name. + * @param reviewId Id of the review. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getReviewAsync(String teamName, String reviewId, final ServiceCallback serviceCallback); + /** * Returns review details for the review Id passed. * @@ -55,7 +62,15 @@ public interface Reviews { */ Observable getReviewAsync(String teamName, String reviewId); - + /** + * Returns review details for the review Id passed. + * + * @param teamName Your Team Name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Review object + */ + Observable> getReviewWithServiceResponseAsync(String teamName, String reviewId); /** * Get the Job Details for a Job Id. @@ -69,6 +84,17 @@ public interface Reviews { */ Job getJobDetails(String teamName, String jobId); + /** + * Get the Job Details for a Job Id. + * + * @param teamName Your Team Name. + * @param jobId Id of the job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getJobDetailsAsync(String teamName, String jobId, final ServiceCallback serviceCallback); + /** * Get the Job Details for a Job Id. * @@ -79,824 +105,1241 @@ public interface Reviews { */ Observable getJobDetailsAsync(String teamName, String jobId); + /** + * Get the Job Details for a Job Id. + * + * @param teamName Your Team Name. + * @param jobId Id of the job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Job object + */ + Observable> getJobDetailsWithServiceResponseAsync(String teamName, String jobId); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + List createReviews(String teamName, String urlContentType, List createReviewBody); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, final ServiceCallback> serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody); /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable>> createReviewsWithServiceResponseAsync(String teamName, String urlContentType, List createReviewBody); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param urlContentType The content type. - * @param createReviewBody Body for create reviews API. - * @param createReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<String> object if successful. */ - - List createReviews(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + List createReviews(String teamName, String urlContentType, List createReviewBody, String subTeam); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param urlContentType The content type. - * @param createReviewBody Body for create reviews API. - * @param createReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, String subTeam, final ServiceCallback> serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, String subTeam); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<String> object */ - - Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @return the first stage of the createReviews call - */ - ReviewsCreateReviewsDefinitionStages.WithTeamName createReviews(); - - /** - * Grouping of createReviews definition stages. - */ - interface ReviewsCreateReviewsDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithUrlContentType withTeamName(String teamName); - } - /** - * The stage of the definition to be specify urlContentType. - */ - interface WithUrlContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithCreateReviewBody withUrlContentType(String urlContentType); - } - /** - * The stage of the definition to be specify createReviewBody. - */ - interface WithCreateReviewBody { - /** - * Body for create reviews API. - * - * @return next definition stage - */ - ReviewsCreateReviewsDefinitionStages.WithExecute withCreateReviewBody(List createReviewBody); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * SubTeam of your team, you want to assign the created review to. - * - * @return next definition stage - */ - ReviewsCreateReviewsDefinitionStages.WithExecute withSubTeam(String subTeam); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsCreateReviewsDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the List<String> object if successful. - */ - List execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the List<String> object - */ - Observable> executeAsync(); - } - } - - /** - * The entirety of createReviews definition. - */ - interface ReviewsCreateReviewsDefinition extends - ReviewsCreateReviewsDefinitionStages.WithTeamName, - ReviewsCreateReviewsDefinitionStages.WithUrlContentType, - ReviewsCreateReviewsDefinitionStages.WithCreateReviewBody, - ReviewsCreateReviewsDefinitionStages.WithExecute { - } + Observable>> createReviewsWithServiceResponseAsync(String teamName, String urlContentType, List createReviewBody, String subTeam); /** * A job Id will be returned for the content posted on this endpoint. - * Once the content is evaluated against the Workflow provided the review will be created or ignored based on - * the workflow expression. - * <h3>CallBack Schemas </h3> - * <p> - * <h4>Job Completion CallBack - * Sample</h4><br/> - * {<br/> - * "JobId": "<Job Id>,<br/> - * "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> - * "WorkFlowId": "default",<br/> - * "Status": "<This will be one of Complete, InProgress, Error>",<br/> - * "ContentType": "Image",<br/> - * "ContentId": "<This is the ContentId that was specified on input>",<br/> - * "CallBackType": "Job",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p> - * <p> - * <h4>Review Completion CallBack - * Sample</h4><br/> - * { - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx", - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @param teamName Your team name. - * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video'. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' * @param contentId Id/Name to identify the content submitted. * @param workflowName Workflow Name that you want to invoke. - * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg'. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the JobId object if successful. */ - - JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter); + JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue); + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, final ServiceCallback serviceCallback); /** * A job Id will be returned for the content posted on this endpoint. - * Once the content is evaluated against the Workflow provided the review will be created or ignored based on - * the workflow expression. - * <h3>CallBack Schemas </h3> - * <p> - * <h4>Job Completion CallBack - * Sample</h4><br/> - * {<br/> - * "JobId": "<Job Id>,<br/> - * "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> - * "WorkFlowId": "default",<br/> - * "Status": "<This will be one of Complete, InProgress, Error>",<br/> - * "ContentType": "Image",<br/> - * "ContentId": "<This is the ContentId that was specified on input>",<br/> - * "CallBackType": "Job",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p> - * <p> - * <h4>Review Completion CallBack - * Sample</h4><br/> - * { - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx", - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @param teamName Your team name. - * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video'. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' * @param contentId Id/Name to identify the content submitted. * @param workflowName Workflow Name that you want to invoke. - * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg'. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter 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 JobId object */ - - Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter); + Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue); /** * A job Id will be returned for the content posted on this endpoint. - * Once the content is evaluated against the Workflow provided the review will be created or ignored based on - * the workflow expression. - * <h3>CallBack Schemas </h3> - * <p> - * <h4>Job Completion CallBack - * Sample</h4><br/> - * {<br/> - * "JobId": "<Job Id>,<br/> - * "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> - * "WorkFlowId": "default",<br/> - * "Status": "<This will be one of Complete, InProgress, Error>",<br/> - * "ContentType": "Image",<br/> - * "ContentId": "<This is the ContentId that was specified on input>",<br/> - * "CallBackType": "Job",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p> - * <p> - * <h4>Review Completion CallBack - * Sample</h4><br/> - * { - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx", - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @return the first stage of the createJob call - */ - ReviewsCreateJobDefinitionStages.WithTeamName createJob(); - - /** - * Grouping of createJob definition stages. - */ - interface ReviewsCreateJobDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithContentType withTeamName(String teamName); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * Image, Text or Video. Possible values include: 'Image', 'Text', 'Video'. - * - * @return next definition stage - */ - WithContentId withContentType(String contentType); - } - /** - * The stage of the definition to be specify contentId. - */ - interface WithContentId { - /** - * Id/Name to identify the content submitted. - * - * @return next definition stage - */ - WithWorkflowName withContentId(String contentId); - } - /** - * The stage of the definition to be specify workflowName. - */ - interface WithWorkflowName { - /** - * Workflow Name that you want to invoke. - * - * @return next definition stage - */ - WithJobContentType withWorkflowName(String workflowName); - } - /** - * The stage of the definition to be specify jobContentType. - */ - interface WithJobContentType { - /** - * The content type. Possible values include: 'application/json', 'image/jpeg'. - * - * @return next definition stage - */ - WithContentValue withJobContentType(String jobContentType); - } - /** - * The stage of the definition to be specify contentValue. - */ - interface WithContentValue { - /** - * Content to evaluate for a job. - * - * @return next definition stage - */ - ReviewsCreateJobDefinitionStages.WithExecute withContentValue(String contentValue); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Callback endpoint for posting the create job result. - * - * @return next definition stage - */ - ReviewsCreateJobDefinitionStages.WithExecute withCallBackEndpoint(String callBackEndpoint); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsCreateJobDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the JobId object if successful. - */ - JobId execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the JobId object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of createJob definition. - */ - interface ReviewsCreateJobDefinition extends - ReviewsCreateJobDefinitionStages.WithTeamName, - ReviewsCreateJobDefinitionStages.WithContentType, - ReviewsCreateJobDefinitionStages.WithContentId, - ReviewsCreateJobDefinitionStages.WithWorkflowName, - ReviewsCreateJobDefinitionStages.WithJobContentType, - ReviewsCreateJobDefinitionStages.WithContentValue, - ReviewsCreateJobDefinitionStages.WithExecute { - } - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobId object + */ + Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue); + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobId object if successful. + */ + JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint); + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint, final ServiceCallback serviceCallback); + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobId object + */ + Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint); + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobId object + */ + Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - - void addVideoFrame(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + void addVideoFrame(String teamName, String reviewId); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameAsync(String teamName, String reviewId, final ServiceCallback serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter 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 addVideoFrameAsync(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @return the first stage of the addVideoFrame call - */ - ReviewsAddVideoFrameDefinitionStages.WithTeamName addVideoFrame(); - - /** - * Grouping of addVideoFrame definition stages. - */ - interface ReviewsAddVideoFrameDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithReviewId withTeamName(String teamName); - } - /** - * The stage of the definition to be specify reviewId. - */ - interface WithReviewId { - /** - * Id of the review. - * - * @return next definition stage - */ - ReviewsAddVideoFrameDefinitionStages.WithExecute withReviewId(String reviewId); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Timescale of the video you are adding frames to. - * - * @return next definition stage - */ - ReviewsAddVideoFrameDefinitionStages.WithExecute withTimescale(Integer timescale); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsAddVideoFrameDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - */ - void execute(); - - /** - * Execute the request asynchronously. - * - * @return a representation of the deferred computation of this call if successful. - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addVideoFrame definition. - */ - interface ReviewsAddVideoFrameDefinition extends - ReviewsAddVideoFrameDefinitionStages.WithTeamName, - ReviewsAddVideoFrameDefinitionStages.WithReviewId, - ReviewsAddVideoFrameDefinitionStages.WithExecute { - } - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameAsync(String teamName, String reviewId); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameWithServiceResponseAsync(String teamName, String reviewId); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void addVideoFrame(String teamName, String reviewId, Integer timescale); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameAsync(String teamName, String reviewId, Integer timescale, final ServiceCallback serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameAsync(String teamName, String reviewId, Integer timescale); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameWithServiceResponseAsync(String teamName, String reviewId, Integer timescale); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Frames object if successful. + */ + Frames getVideoFrames(String teamName, String reviewId); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getVideoFramesAsync(String teamName, String reviewId, final ServiceCallback serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Frames object + */ + Observable getVideoFramesAsync(String teamName, String reviewId); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Frames object + */ + Observable> getVideoFramesWithServiceResponseAsync(String teamName, String reviewId); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Frames object if successful. */ - - Frames getVideoFrames(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + Frames getVideoFrames(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture getVideoFramesAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter, final ServiceCallback serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Frames object */ - - Observable getVideoFramesAsync(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @return the first stage of the getVideoFrames call - */ - ReviewsGetVideoFramesDefinitionStages.WithTeamName getVideoFrames(); - - /** - * Grouping of getVideoFrames definition stages. - */ - interface ReviewsGetVideoFramesDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithReviewId withTeamName(String teamName); - } - /** - * The stage of the definition to be specify reviewId. - */ - interface WithReviewId { - /** - * Id of the review. - * - * @return next definition stage - */ - ReviewsGetVideoFramesDefinitionStages.WithExecute withReviewId(String reviewId); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Time stamp of the frame from where you want to start fetching the frames. - * - * @return next definition stage - */ - ReviewsGetVideoFramesDefinitionStages.WithExecute withStartSeed(Integer startSeed); - - /** - * Number of frames to fetch. - * - * @return next definition stage - */ - ReviewsGetVideoFramesDefinitionStages.WithExecute withNoOfRecords(Integer noOfRecords); - - /** - * Get frames filtered by tags. - * - * @return next definition stage - */ - ReviewsGetVideoFramesDefinitionStages.WithExecute withFilter(String filter); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsGetVideoFramesDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Frames object if successful. - */ - Frames execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the Frames object - */ - Observable executeAsync(); - } - } - - /** - * The entirety of getVideoFrames definition. - */ - interface ReviewsGetVideoFramesDefinition extends - ReviewsGetVideoFramesDefinitionStages.WithTeamName, - ReviewsGetVideoFramesDefinitionStages.WithReviewId, - ReviewsGetVideoFramesDefinitionStages.WithExecute { - } + Observable getVideoFramesAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Frames object + */ + Observable> getVideoFramesWithServiceResponseAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter); /** * Publish video review to make it available for review. @@ -914,22 +1357,39 @@ interface ReviewsGetVideoFramesDefinition extends * * @param teamName Your team name. * @param reviewId Id of the review. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return a representation of the deferred computation of this call if successful. + * @return the {@link ServiceFuture} object */ - Observable publishVideoReviewAsync(String teamName, String reviewId); + ServiceFuture publishVideoReviewAsync(String teamName, String reviewId, final ServiceCallback serviceCallback); + /** + * Publish video review to make it available for review. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable publishVideoReviewAsync(String teamName, String reviewId); + /** + * Publish video review to make it available for review. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> publishVideoReviewWithServiceResponseAsync(String teamName, String reviewId); /** - * This API adds a transcript screen text result file for a video review. Transcript screen text - * result file is a result of Screen Text API . In order to generate transcript screen text result - * file , a transcript file has to be screened for profanity using Screen Text API. + * This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. - * @param transcriptModerationBody Body for add video transcript moderation result API. + * @param transcriptModerationBody Body for add video transcript moderation result API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent @@ -937,24 +1397,44 @@ interface ReviewsGetVideoFramesDefinition extends void addVideoTranscriptModerationResult(String teamName, String reviewId, String contentType, List transcriptModerationBody); /** - * This API adds a transcript screen text result file for a video review. Transcript screen text - * result file is a result of Screen Text API . In order to generate transcript screen text result - * file , a transcript file has to be screened for profanity using Screen Text API. + * This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. - * @param transcriptModerationBody Body for add video transcript moderation result API. + * @param transcriptModerationBody Body for add video transcript moderation result API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return a representation of the deferred computation of this call if successful. + * @return the {@link ServiceFuture} object */ - Observable addVideoTranscriptModerationResultAsync(String teamName, String reviewId, String contentType, List transcriptModerationBody); + ServiceFuture addVideoTranscriptModerationResultAsync(String teamName, String reviewId, String contentType, List transcriptModerationBody, final ServiceCallback serviceCallback); + /** + * This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param transcriptModerationBody Body for add video transcript moderation result API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoTranscriptModerationResultAsync(String teamName, String reviewId, String contentType, List transcriptModerationBody); + /** + * This API adds a transcript screen text result file for a video review. Transcript screen text result file is a result of Screen Text API . In order to generate transcript screen text result file , a transcript file has to be screened for profanity using Screen Text API. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param transcriptModerationBody Body for add video transcript moderation result API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoTranscriptModerationResultWithServiceResponseAsync(String teamName, String reviewId, String contentType, List transcriptModerationBody); /** - * This API adds a transcript file (text version of all the words spoken in a video) to a video - * review. The file should be a valid WebVTT format. + * This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format. * * @param teamName Your team name. * @param reviewId Id of the review. @@ -966,486 +1446,516 @@ interface ReviewsGetVideoFramesDefinition extends void addVideoTranscript(String teamName, String reviewId, byte[] vTTfile); /** - * This API adds a transcript file (text version of all the words spoken in a video) to a video - * review. The file should be a valid WebVTT format. + * This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param vTTfile Transcript file of the video. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoTranscriptAsync(String teamName, String reviewId, byte[] vTTfile, final ServiceCallback serviceCallback); + + /** + * This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format. * * @param teamName Your team name. * @param reviewId Id of the review. * @param vTTfile Transcript file of the video. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return a representation of the deferred computation of this call if successful. + * @return the {@link ServiceResponse} object if successful. */ Observable addVideoTranscriptAsync(String teamName, String reviewId, byte[] vTTfile); + /** + * This API adds a transcript file (text version of all the words spoken in a video) to a video review. The file should be a valid WebVTT format. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param vTTfile Transcript file of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoTranscriptWithServiceResponseAsync(String teamName, String reviewId, byte[] vTTfile); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, final ServiceCallback> serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody); /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param contentType The content type. - * @param createVideoReviewsBody Body for create reviews API. - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List createVideoReviewsBody); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<String> object if successful. */ - - List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. + List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody, String subTeam); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. * * @param teamName Your team name. * @param contentType The content type. - * @param createVideoReviewsBody Body for create reviews API. - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param createVideoReviewsBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam, final ServiceCallback> serviceCallback); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam); + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<String> object */ - - Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter); - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of - * the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - * <h3>CallBack Schemas </h3> - * <h4>Review Completion CallBack Sample</h4> - * <p> - * {<br/> - * "ReviewId": "<Review Id>",<br/> - * "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - * "ModifiedBy": "<Name of the Reviewer>",<br/> - * "CallBackType": "Review",<br/> - * "ContentId": "<The ContentId that was specified input>",<br/> - * "Metadata": {<br/> - * "adultscore": "0.xxx",<br/> - * "a": "False",<br/> - * "racyscore": "0.xxx",<br/> - * "r": "True"<br/> - * },<br/> - * "ReviewerResultTags": {<br/> - * "a": "False",<br/> - * "r": "True"<br/> - * }<br/> - * }<br/> - * </p>. - * - * @return the first stage of the createVideoReviews call - */ - ReviewsCreateVideoReviewsDefinitionStages.WithTeamName createVideoReviews(); - - /** - * Grouping of createVideoReviews definition stages. - */ - interface ReviewsCreateVideoReviewsDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithContentType withTeamName(String teamName); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithCreateVideoReviewsBody withContentType(String contentType); - } - /** - * The stage of the definition to be specify createVideoReviewsBody. - */ - interface WithCreateVideoReviewsBody { - /** - * Body for create reviews API. - * - * @return next definition stage - */ - ReviewsCreateVideoReviewsDefinitionStages.WithExecute withCreateVideoReviewsBody(List createVideoReviewsBody); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * SubTeam of your team, you want to assign the created review to. - * - * @return next definition stage - */ - ReviewsCreateVideoReviewsDefinitionStages.WithExecute withSubTeam(String subTeam); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsCreateVideoReviewsDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the List<String> object if successful. - */ - List execute(); - - /** - * Execute the request asynchronously. - * - * @return the observable to the List<String> object - */ - Observable> executeAsync(); - } - } - - /** - * The entirety of createVideoReviews definition. - */ - interface ReviewsCreateVideoReviewsDefinition extends - ReviewsCreateVideoReviewsDefinitionStages.WithTeamName, - ReviewsCreateVideoReviewsDefinitionStages.WithContentType, - ReviewsCreateVideoReviewsDefinitionStages.WithCreateVideoReviewsBody, - ReviewsCreateVideoReviewsDefinitionStages.WithExecute { - } - - /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. + Observable>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. - * @param videoFrameBody Body for add video frames API. - * @param addVideoFrameUrlOptionalParameter the object representing the optional parameters to be set before calling this API + * @param videoFrameBody Body for add video frames API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - - void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter); + void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody); /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. - * @param videoFrameBody Body for add video frames API. - * @param addVideoFrameUrlOptionalParameter 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 addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter); - - /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. - * - * @return the first stage of the addVideoFrameUrl call - */ - ReviewsAddVideoFrameUrlDefinitionStages.WithTeamName addVideoFrameUrl(); - - /** - * Grouping of addVideoFrameUrl definition stages. - */ - interface ReviewsAddVideoFrameUrlDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithReviewId withTeamName(String teamName); - } - /** - * The stage of the definition to be specify reviewId. - */ - interface WithReviewId { - /** - * Id of the review. - * - * @return next definition stage - */ - WithContentType withReviewId(String reviewId); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithVideoFrameBody withContentType(String contentType); - } - /** - * The stage of the definition to be specify videoFrameBody. - */ - interface WithVideoFrameBody { - /** - * Body for add video frames API. - * - * @return next definition stage - */ - ReviewsAddVideoFrameUrlDefinitionStages.WithExecute withVideoFrameBody(List videoFrameBody); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Timescale of the video. - * - * @return next definition stage - */ - ReviewsAddVideoFrameUrlDefinitionStages.WithExecute withTimescale(Integer timescale); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsAddVideoFrameUrlDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - */ - void execute(); - - /** - * Execute the request asynchronously. - * - * @return a representation of the deferred computation of this call if successful. - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addVideoFrameUrl definition. - */ - interface ReviewsAddVideoFrameUrlDefinition extends - ReviewsAddVideoFrameUrlDefinitionStages.WithTeamName, - ReviewsAddVideoFrameUrlDefinitionStages.WithReviewId, - ReviewsAddVideoFrameUrlDefinitionStages.WithContentType, - ReviewsAddVideoFrameUrlDefinitionStages.WithVideoFrameBody, - ReviewsAddVideoFrameUrlDefinitionStages.WithExecute { - } - - /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. + * @param videoFrameBody Body for add video frames API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, final ServiceCallback serviceCallback); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameUrlWithServiceResponseAsync(String teamName, String reviewId, String contentType, List videoFrameBody); + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale, final ServiceCallback serviceCallback); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameUrlWithServiceResponseAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - - void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter); + void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata); /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * * @param teamName Your team name. * @param reviewId Id of the review. * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter 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 addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter); - - /** - * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to - * convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content - * Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation - * output is Ticks/Second. - * - * @return the first stage of the addVideoFrameStream call - */ - ReviewsAddVideoFrameStreamDefinitionStages.WithTeamName addVideoFrameStream(); - - /** - * Grouping of addVideoFrameStream definition stages. - */ - interface ReviewsAddVideoFrameStreamDefinitionStages { - /** - * The stage of the definition to be specify teamName. - */ - interface WithTeamName { - /** - * Your team name. - * - * @return next definition stage - */ - WithReviewId withTeamName(String teamName); - } - /** - * The stage of the definition to be specify reviewId. - */ - interface WithReviewId { - /** - * Id of the review. - * - * @return next definition stage - */ - WithContentType withReviewId(String reviewId); - } - /** - * The stage of the definition to be specify contentType. - */ - interface WithContentType { - /** - * The content type. - * - * @return next definition stage - */ - WithFrameImageZip withContentType(String contentType); - } - /** - * The stage of the definition to be specify frameImageZip. - */ - interface WithFrameImageZip { - /** - * Zip file containing frame images. - * - * @return next definition stage - */ - WithFrameMetadata withFrameImageZip(byte[] frameImageZip); - } - /** - * The stage of the definition to be specify frameMetadata. - */ - interface WithFrameMetadata { - /** - * Metadata of the frame. - * - * @return next definition stage - */ - ReviewsAddVideoFrameStreamDefinitionStages.WithExecute withFrameMetadata(String frameMetadata); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Timescale of the video . - * - * @return next definition stage - */ - ReviewsAddVideoFrameStreamDefinitionStages.WithExecute withTimescale(Integer timescale); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends ReviewsAddVideoFrameStreamDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - */ - void execute(); - - /** - * Execute the request asynchronously. - * - * @return a representation of the deferred computation of this call if successful. - */ - Observable executeAsync(); - } - } - - /** - * The entirety of addVideoFrameStream definition. - */ - interface ReviewsAddVideoFrameStreamDefinition extends - ReviewsAddVideoFrameStreamDefinitionStages.WithTeamName, - ReviewsAddVideoFrameStreamDefinitionStages.WithReviewId, - ReviewsAddVideoFrameStreamDefinitionStages.WithContentType, - ReviewsAddVideoFrameStreamDefinitionStages.WithFrameImageZip, - ReviewsAddVideoFrameStreamDefinitionStages.WithFrameMetadata, - ReviewsAddVideoFrameStreamDefinitionStages.WithExecute { - } + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, final ServiceCallback serviceCallback); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameStreamWithServiceResponseAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata); + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale, final ServiceCallback serviceCallback); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale); + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + Observable> addVideoFrameStreamWithServiceResponseAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/TextModerations.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/TextModerations.java index 4bf35ee96e7b..49e00cf9ba57 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/TextModerations.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/TextModerations.java @@ -8,10 +8,13 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ScreenTextOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.DetectedLanguage; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Screen; +import com.microsoft.rest.ServiceCallback; +import com.microsoft.rest.ServiceFuture; +import com.microsoft.rest.ServiceResponse; +import java.io.IOException; import rx.Observable; /** @@ -23,142 +26,119 @@ public interface TextModerations { * Detect profanity and match against custom and shared blacklists. * Detects profanity in more than 100 languages and match against custom and shared blacklists. * - * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'. + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Screen object if successful. */ - - Screen screenText(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter); + Screen screenText(String textContentType, byte[] textContent); /** * Detect profanity and match against custom and shared blacklists. * Detects profanity in more than 100 languages and match against custom and shared blacklists. * - * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'. + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter the object representing the optional parameters to be set before calling this API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Screen object + * @return the {@link ServiceFuture} object */ - - Observable screenTextAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter); + ServiceFuture screenTextAsync(String textContentType, byte[] textContent, final ServiceCallback serviceCallback); /** * Detect profanity and match against custom and shared blacklists. * Detects profanity in more than 100 languages and match against custom and shared blacklists. * - * @return the first stage of the screenText call + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Screen object */ - TextModerationsScreenTextDefinitionStages.WithTextContentType screenText(); + Observable screenTextAsync(String textContentType, byte[] textContent); /** - * Grouping of screenText definition stages. + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Screen object */ - interface TextModerationsScreenTextDefinitionStages { - /** - * The stage of the definition to be specify textContentType. - */ - interface WithTextContentType { - /** - * The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'. - * - * @return next definition stage - */ - WithTextContent withTextContentType(String textContentType); - } - /** - * The stage of the definition to be specify textContent. - */ - interface WithTextContent { - /** - * Content to screen. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withTextContent(byte[] textContent); - } - - /** - * The stage of the definition which allows for any other optional settings to be specified. - */ - interface WithAllOptions { - /** - * Language of the text. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withLanguage(String language); - - /** - * Autocorrect text. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withAutocorrect(Boolean autocorrect); - - /** - * Detect personal identifiable information. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withPII(Boolean pII); - - /** - * The list Id. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withListId(String listId); - - /** - * Classify input. - * - * @return next definition stage - */ - TextModerationsScreenTextDefinitionStages.WithExecute withClassify(Boolean classify); - - } - - /** - * The last stage of the definition which will make the operation call. - */ - interface WithExecute extends TextModerationsScreenTextDefinitionStages.WithAllOptions { - /** - * Execute the request. - * - * @return the Screen object if successful. - */ - Screen execute(); + Observable> screenTextWithServiceResponseAsync(String textContentType, byte[] textContent); + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Screen object if successful. + */ + Screen screenText(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify); - /** - * Execute the request asynchronously. - * - * @return the observable to the Screen object - */ - Observable executeAsync(); - } - } + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture screenTextAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify, final ServiceCallback serviceCallback); /** - * The entirety of screenText definition. + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Screen object */ - interface TextModerationsScreenTextDefinition extends - TextModerationsScreenTextDefinitionStages.WithTextContentType, - TextModerationsScreenTextDefinitionStages.WithTextContent, - TextModerationsScreenTextDefinitionStages.WithExecute { - } + Observable screenTextAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify); + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Screen object + */ + Observable> screenTextWithServiceResponseAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify); /** - * This operation will detect the language of given input content. Returns the - * <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the - * predominant language comprising the submitted text. Over 110 languages supported. + * This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. * - * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'. + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server @@ -168,16 +148,34 @@ interface TextModerationsScreenTextDefinition extends DetectedLanguage detectLanguage(String textContentType, byte[] textContent); /** - * This operation will detect the language of given input content. Returns the - * <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the - * predominant language comprising the submitted text. Over 110 languages supported. + * This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. * - * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown'. + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + ServiceFuture detectLanguageAsync(String textContentType, byte[] textContent, final ServiceCallback serviceCallback); + + /** + * This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DetectedLanguage object */ Observable detectLanguageAsync(String textContentType, byte[] textContent); + /** + * This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the DetectedLanguage object + */ + Observable> detectLanguageWithServiceResponseAsync(String textContentType, byte[] textContent); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ContentModeratorClientImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ContentModeratorClientImpl.java index 43d1684c7c44..b75f16f7c5c0 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ContentModeratorClientImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ContentModeratorClientImpl.java @@ -16,7 +16,6 @@ import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImages; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTermLists; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTerms; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AzureRegionBaseUrl; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.Reviews; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.TextModerations; import com.microsoft.rest.credentials.ServiceClientCredentials; @@ -37,26 +36,26 @@ public AzureClient getAzureClient() { return this.azureClient; } - /** Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'. */ - private AzureRegionBaseUrl baseUrl; + /** Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). */ + private String endpoint; /** - * Gets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'. + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). * - * @return the baseUrl value. + * @return the endpoint value. */ - public AzureRegionBaseUrl baseUrl() { - return this.baseUrl; + public String endpoint() { + return this.endpoint; } /** - * Sets Supported Azure regions for Content Moderator endpoints. Possible values include: 'westus.api.cognitive.microsoft.com', 'westus2.api.cognitive.microsoft.com', 'eastus.api.cognitive.microsoft.com', 'eastus2.api.cognitive.microsoft.com', 'westcentralus.api.cognitive.microsoft.com', 'southcentralus.api.cognitive.microsoft.com', 'westeurope.api.cognitive.microsoft.com', 'northeurope.api.cognitive.microsoft.com', 'southeastasia.api.cognitive.microsoft.com', 'eastasia.api.cognitive.microsoft.com', 'australiaeast.api.cognitive.microsoft.com', 'brazilsouth.api.cognitive.microsoft.com', 'contentmoderatortest.azure-api.net'. + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). * - * @param baseUrl the baseUrl value. + * @param endpoint the endpoint value. * @return the service client itself */ - public ContentModeratorClientImpl withBaseUrl(AzureRegionBaseUrl baseUrl) { - this.baseUrl = baseUrl; + public ContentModeratorClientImpl withEndpoint(String endpoint) { + this.endpoint = endpoint; return this; } @@ -226,7 +225,7 @@ public Reviews reviews() { * @param credentials the management credentials for Azure */ public ContentModeratorClientImpl(ServiceClientCredentials credentials) { - this("https://{baseUrl}", credentials); + this("https://{Endpoint}", credentials); } /** @@ -235,7 +234,7 @@ public ContentModeratorClientImpl(ServiceClientCredentials credentials) { * @param baseUrl the base URL of the host * @param credentials the management credentials for Azure */ - public ContentModeratorClientImpl(String baseUrl, ServiceClientCredentials credentials) { + private ContentModeratorClientImpl(String baseUrl, ServiceClientCredentials credentials) { super(baseUrl, credentials); initialize(); } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java index ee8d81053244..b1ec5cd77092 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ImageModerationsImpl.java @@ -8,24 +8,12 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchMethodOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FindFacesUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.OCRFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateFileInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.EvaluateUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchFileInputOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations; import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModelModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Evaluate; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.FoundFaces; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.MatchResponse; @@ -34,6 +22,7 @@ import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; +import java.io.InputStream; import java.io.IOException; import okhttp3.MediaType; import okhttp3.RequestBody; @@ -95,11 +84,11 @@ interface ImageModerationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations findFacesUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/FindFaces") - Observable> findFacesUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> findFacesUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations oCRUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/OCR") - Observable> oCRUrlInput(@Query("language") String language, @Query("CacheImage") Boolean cacheImage, @Query("enhanced") Boolean enhanced, @Header("Content-Type") String contentType, @Body BodyModelModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> oCRUrlInput(@Query("language") String language, @Query("CacheImage") Boolean cacheImage, @Query("enhanced") Boolean enhanced, @Header("Content-Type") String contentType, @Body BodyModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations oCRFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/OCR") @@ -111,11 +100,11 @@ interface ImageModerationsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations evaluateUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Evaluate") - Observable> evaluateUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> evaluateUrlInput(@Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations matchUrlInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Match") - Observable> matchUrlInput(@Query("listId") String listId, @Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModelModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> matchUrlInput(@Query("listId") String listId, @Query("CacheImage") Boolean cacheImage, @Header("Content-Type") String contentType, @Body BodyModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ImageModerations matchFileInput" }) @POST("contentmoderator/moderate/v1.0/ProcessImage/Match") @@ -123,41 +112,37 @@ interface ImageModerationsService { } - /** * Returns the list of faces found. * - * @param findFacesOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - public FoundFaces findFaces(FindFacesOptionalParameter findFacesOptionalParameter) { - return findFacesWithServiceResponseAsync(findFacesOptionalParameter).toBlocking().single().body(); + public FoundFaces findFaces() { + return findFacesWithServiceResponseAsync().toBlocking().single().body(); } /** * Returns the list of faces found. * - * @param findFacesOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture findFacesAsync(FindFacesOptionalParameter findFacesOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(findFacesWithServiceResponseAsync(findFacesOptionalParameter), serviceCallback); + public ServiceFuture findFacesAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesWithServiceResponseAsync(), serviceCallback); } /** * Returns the list of faces found. * - * @param findFacesOptionalParameter 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 FoundFaces object */ - public Observable findFacesAsync(FindFacesOptionalParameter findFacesOptionalParameter) { - return findFacesWithServiceResponseAsync(findFacesOptionalParameter).map(new Func1, FoundFaces>() { + public Observable findFacesAsync() { + return findFacesWithServiceResponseAsync().map(new Func1, FoundFaces>() { @Override public FoundFaces call(ServiceResponse response) { return response.body(); @@ -168,17 +153,68 @@ public FoundFaces call(ServiceResponse response) { /** * Returns the list of faces found. * - * @param findFacesOptionalParameter 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 FoundFaces object */ - public Observable> findFacesWithServiceResponseAsync(FindFacesOptionalParameter findFacesOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> findFacesWithServiceResponseAsync() { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - final Boolean cacheImage = findFacesOptionalParameter != null ? findFacesOptionalParameter.cacheImage() : null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = findFacesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. + */ + public FoundFaces findFaces(Boolean cacheImage) { + return findFacesWithServiceResponseAsync(cacheImage).toBlocking().single().body(); + } + + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture findFacesAsync(Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesWithServiceResponseAsync(cacheImage), serviceCallback); + } - return findFacesWithServiceResponseAsync(cacheImage); + /** + * Returns the list of faces found. + * + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + public Observable findFacesAsync(Boolean cacheImage) { + return findFacesWithServiceResponseAsync(cacheImage).map(new Func1, FoundFaces>() { + @Override + public FoundFaces call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -189,10 +225,10 @@ public Observable> findFacesWithServiceResponseAsync * @return the observable to the FoundFaces object */ public Observable> findFacesWithServiceResponseAsync(Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.findFaces(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -214,86 +250,40 @@ private ServiceResponse findFacesDelegate(Response res .build(response); } - @Override - public ImageModerationsFindFacesParameters findFaces() { - return new ImageModerationsFindFacesParameters(this); - } - - /** - * Internal class implementing ImageModerationsFindFacesDefinition. - */ - class ImageModerationsFindFacesParameters implements ImageModerationsFindFacesDefinition { - private ImageModerationsImpl parent; - private Boolean cacheImage; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsFindFacesParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsFindFacesParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public FoundFaces execute() { - return findFacesWithServiceResponseAsync(cacheImage).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return findFacesWithServiceResponseAsync(cacheImage).map(new Func1, FoundFaces>() { - @Override - public FoundFaces call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - public OCR oCRMethod(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter) { - return oCRMethodWithServiceResponseAsync(language, oCRMethodOptionalParameter).toBlocking().single().body(); + public OCR oCRMethod(String language) { + return oCRMethodWithServiceResponseAsync(language).toBlocking().single().body(); } /** * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture oCRMethodAsync(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(oCRMethodWithServiceResponseAsync(language, oCRMethodOptionalParameter), serviceCallback); + public ServiceFuture oCRMethodAsync(String language, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRMethodWithServiceResponseAsync(language), serviceCallback); } /** * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter 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 OCR object */ - public Observable oCRMethodAsync(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter) { - return oCRMethodWithServiceResponseAsync(language, oCRMethodOptionalParameter).map(new Func1, OCR>() { + public Observable oCRMethodAsync(String language) { + return oCRMethodWithServiceResponseAsync(language).map(new Func1, OCR>() { @Override public OCR call(ServiceResponse response) { return response.body(); @@ -305,21 +295,84 @@ public OCR call(ServiceResponse response) { * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. - * @param oCRMethodOptionalParameter 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 OCR object */ - public Observable> oCRMethodWithServiceResponseAsync(String language, OCRMethodOptionalParameter oCRMethodOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> oCRMethodWithServiceResponseAsync(String language) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - final Boolean cacheImage = oCRMethodOptionalParameter != null ? oCRMethodOptionalParameter.cacheImage() : null; - final Boolean enhanced = oCRMethodOptionalParameter != null ? oCRMethodOptionalParameter.enhanced() : null; + final Boolean cacheImage = null; + final Boolean enhanced = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.oCRMethod(language, cacheImage, enhanced, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = oCRMethodDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + public OCR oCRMethod(String language, Boolean cacheImage, Boolean enhanced) { + return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced).toBlocking().single().body(); + } - return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture oCRMethodAsync(String language, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced), serviceCallback); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + public Observable oCRMethodAsync(String language, Boolean cacheImage, Boolean enhanced) { + return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced).map(new Func1, OCR>() { + @Override + public OCR call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -334,13 +387,13 @@ public Observable> oCRMethodWithServiceResponseAsync(String * @return the observable to the OCR object */ public Observable> oCRMethodWithServiceResponseAsync(String language, Boolean cacheImage, Boolean enhanced) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.oCRMethod(language, cacheImage, enhanced, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -362,97 +415,104 @@ private ServiceResponse oCRMethodDelegate(Response response) .build(response); } - @Override - public ImageModerationsOCRMethodParameters oCRMethod() { - return new ImageModerationsOCRMethodParameters(this); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + public Evaluate evaluateMethod() { + return evaluateMethodWithServiceResponseAsync().toBlocking().single().body(); } /** - * Internal class implementing ImageModerationsOCRMethodDefinition. + * Returns probabilities of the image containing racy or adult content. + * + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object */ - class ImageModerationsOCRMethodParameters implements ImageModerationsOCRMethodDefinition { - private ImageModerationsImpl parent; - private String language; - private Boolean cacheImage; - private Boolean enhanced; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsOCRMethodParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsOCRMethodParameters withLanguage(String language) { - this.language = language; - return this; - } - - @Override - public ImageModerationsOCRMethodParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public ImageModerationsOCRMethodParameters withEnhanced(Boolean enhanced) { - this.enhanced = enhanced; - return this; - } + public ServiceFuture evaluateMethodAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateMethodWithServiceResponseAsync(), serviceCallback); + } - @Override - public OCR execute() { - return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced).toBlocking().single().body(); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + public Observable evaluateMethodAsync() { + return evaluateMethodWithServiceResponseAsync().map(new Func1, Evaluate>() { + @Override + public Evaluate call(ServiceResponse response) { + return response.body(); + } + }); } - @Override - public Observable executeAsync() { - return oCRMethodWithServiceResponseAsync(language, cacheImage, enhanced).map(new Func1, OCR>() { + /** + * Returns probabilities of the image containing racy or adult content. + * + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + public Observable> evaluateMethodWithServiceResponseAsync() { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.evaluateMethod(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { @Override - public OCR call(ServiceResponse response) { - return response.body(); + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = evaluateMethodDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } } }); - } } - /** * Returns probabilities of the image containing racy or adult content. * - * @param evaluateMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - public Evaluate evaluateMethod(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter) { - return evaluateMethodWithServiceResponseAsync(evaluateMethodOptionalParameter).toBlocking().single().body(); + public Evaluate evaluateMethod(Boolean cacheImage) { + return evaluateMethodWithServiceResponseAsync(cacheImage).toBlocking().single().body(); } /** * Returns probabilities of the image containing racy or adult content. * - * @param evaluateMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture evaluateMethodAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(evaluateMethodWithServiceResponseAsync(evaluateMethodOptionalParameter), serviceCallback); + public ServiceFuture evaluateMethodAsync(Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateMethodWithServiceResponseAsync(cacheImage), serviceCallback); } /** * Returns probabilities of the image containing racy or adult content. * - * @param evaluateMethodOptionalParameter the object representing the optional parameters to be set before calling this API + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Evaluate object */ - public Observable evaluateMethodAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter) { - return evaluateMethodWithServiceResponseAsync(evaluateMethodOptionalParameter).map(new Func1, Evaluate>() { + public Observable evaluateMethodAsync(Boolean cacheImage) { + return evaluateMethodWithServiceResponseAsync(cacheImage).map(new Func1, Evaluate>() { @Override public Evaluate call(ServiceResponse response) { return response.body(); @@ -460,22 +520,6 @@ public Evaluate call(ServiceResponse response) { }); } - /** - * Returns probabilities of the image containing racy or adult content. - * - * @param evaluateMethodOptionalParameter 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 Evaluate object - */ - public Observable> evaluateMethodWithServiceResponseAsync(EvaluateMethodOptionalParameter evaluateMethodOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); - } - final Boolean cacheImage = evaluateMethodOptionalParameter != null ? evaluateMethodOptionalParameter.cacheImage() : null; - - return evaluateMethodWithServiceResponseAsync(cacheImage); - } - /** * Returns probabilities of the image containing racy or adult content. * @@ -484,10 +528,10 @@ public Observable> evaluateMethodWithServiceResponseAs * @return the observable to the Evaluate object */ public Observable> evaluateMethodWithServiceResponseAsync(Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.evaluateMethod(cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -509,63 +553,19 @@ private ServiceResponse evaluateMethodDelegate(Response .build(response); } - @Override - public ImageModerationsEvaluateMethodParameters evaluateMethod() { - return new ImageModerationsEvaluateMethodParameters(this); - } - - /** - * Internal class implementing ImageModerationsEvaluateMethodDefinition. - */ - class ImageModerationsEvaluateMethodParameters implements ImageModerationsEvaluateMethodDefinition { - private ImageModerationsImpl parent; - private Boolean cacheImage; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsEvaluateMethodParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsEvaluateMethodParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public Evaluate execute() { - return evaluateMethodWithServiceResponseAsync(cacheImage).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return evaluateMethodWithServiceResponseAsync(cacheImage).map(new Func1, Evaluate>() { - @Override - public Evaluate call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. Returns ID and tags of matching image.<br/> <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - public MatchResponse matchMethod(MatchMethodOptionalParameter matchMethodOptionalParameter) { - return matchMethodWithServiceResponseAsync(matchMethodOptionalParameter).toBlocking().single().body(); + public MatchResponse matchMethod() { + return matchMethodWithServiceResponseAsync().toBlocking().single().body(); } /** @@ -574,13 +574,12 @@ public MatchResponse matchMethod(MatchMethodOptionalParameter matchMethodOptiona <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture matchMethodAsync(MatchMethodOptionalParameter matchMethodOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(matchMethodWithServiceResponseAsync(matchMethodOptionalParameter), serviceCallback); + public ServiceFuture matchMethodAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchMethodWithServiceResponseAsync(), serviceCallback); } /** @@ -589,12 +588,11 @@ public ServiceFuture matchMethodAsync(MatchMethodOptionalParamete <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter 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 MatchResponse object */ - public Observable matchMethodAsync(MatchMethodOptionalParameter matchMethodOptionalParameter) { - return matchMethodWithServiceResponseAsync(matchMethodOptionalParameter).map(new Func1, MatchResponse>() { + public Observable matchMethodAsync() { + return matchMethodWithServiceResponseAsync().map(new Func1, MatchResponse>() { @Override public MatchResponse call(ServiceResponse response) { return response.body(); @@ -608,36 +606,16 @@ public MatchResponse call(ServiceResponse response) { <br/> Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * - * @param matchMethodOptionalParameter 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 MatchResponse object - */ - public Observable> matchMethodWithServiceResponseAsync(MatchMethodOptionalParameter matchMethodOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); - } - final String listId = matchMethodOptionalParameter != null ? matchMethodOptionalParameter.listId() : null; - final Boolean cacheImage = matchMethodOptionalParameter != null ? matchMethodOptionalParameter.cacheImage() : null; - - return matchMethodWithServiceResponseAsync(listId, cacheImage); - } - - /** - * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. - Returns ID and tags of matching image.<br/> - <br/> - Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. - * - * @param listId The list Id. - * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MatchResponse object */ - public Observable> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> matchMethodWithServiceResponseAsync() { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + final String listId = null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -652,100 +630,130 @@ public Observable> call(Response re }); } - private ServiceResponse matchMethodDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(APIErrorException.class) - .build(response); - } - - @Override - public ImageModerationsMatchMethodParameters matchMethod() { - return new ImageModerationsMatchMethodParameters(this); - } - /** - * Internal class implementing ImageModerationsMatchMethodDefinition. + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. */ - class ImageModerationsMatchMethodParameters implements ImageModerationsMatchMethodDefinition { - private ImageModerationsImpl parent; - private String listId; - private Boolean cacheImage; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsMatchMethodParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsMatchMethodParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public ImageModerationsMatchMethodParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public MatchResponse execute() { + public MatchResponse matchMethod(String listId, Boolean cacheImage) { return matchMethodWithServiceResponseAsync(listId, cacheImage).toBlocking().single().body(); } - @Override - public Observable executeAsync() { - return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1, MatchResponse>() { - @Override - public MatchResponse call(ServiceResponse response) { - return response.body(); - } - }); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture matchMethodAsync(String listId, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchMethodWithServiceResponseAsync(listId, cacheImage), serviceCallback); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + public Observable matchMethodAsync(String listId, Boolean cacheImage) { + return matchMethodWithServiceResponseAsync(listId, cacheImage).map(new Func1, MatchResponse>() { + @Override + public MatchResponse call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + public Observable> matchMethodWithServiceResponseAsync(String listId, Boolean cacheImage) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.matchMethod(listId, cacheImage, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = matchMethodDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } + private ServiceResponse matchMethodDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(APIErrorException.class) + .build(response); + } /** * Returns the list of faces found. * * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - public FoundFaces findFacesFileInput(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter) { - return findFacesFileInputWithServiceResponseAsync(imageStream, findFacesFileInputOptionalParameter).toBlocking().single().body(); + public FoundFaces findFacesFileInput(byte[] imageStream) { + return findFacesFileInputWithServiceResponseAsync(imageStream).toBlocking().single().body(); } /** * Returns the list of faces found. * * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture findFacesFileInputAsync(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(findFacesFileInputWithServiceResponseAsync(imageStream, findFacesFileInputOptionalParameter), serviceCallback); + public ServiceFuture findFacesFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesFileInputWithServiceResponseAsync(imageStream), serviceCallback); } /** * Returns the list of faces found. * * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter 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 FoundFaces object */ - public Observable findFacesFileInputAsync(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter) { - return findFacesFileInputWithServiceResponseAsync(imageStream, findFacesFileInputOptionalParameter).map(new Func1, FoundFaces>() { + public Observable findFacesFileInputAsync(byte[] imageStream) { + return findFacesFileInputWithServiceResponseAsync(imageStream).map(new Func1, FoundFaces>() { @Override public FoundFaces call(ServiceResponse response) { return response.body(); @@ -757,20 +765,75 @@ public FoundFaces call(ServiceResponse response) { * Returns the list of faces found. * * @param imageStream The image file. - * @param findFacesFileInputOptionalParameter 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 FoundFaces object */ - public Observable> findFacesFileInputWithServiceResponseAsync(byte[] imageStream, FindFacesFileInputOptionalParameter findFacesFileInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> findFacesFileInputWithServiceResponseAsync(byte[] imageStream) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - final Boolean cacheImage = findFacesFileInputOptionalParameter != null ? findFacesFileInputOptionalParameter.cacheImage() : null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); + return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = findFacesFileInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. + */ + public FoundFaces findFacesFileInput(byte[] imageStream, Boolean cacheImage) { + return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage).toBlocking().single().body(); + } - return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage); + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage), serviceCallback); + } + + /** + * Returns the list of faces found. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + public Observable findFacesFileInputAsync(byte[] imageStream, Boolean cacheImage) { + return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1, FoundFaces>() { + @Override + public FoundFaces call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -782,13 +845,13 @@ public Observable> findFacesFileInputWithServiceResp * @return the observable to the FoundFaces object */ public Observable> findFacesFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.findFacesFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -811,69 +874,18 @@ private ServiceResponse findFacesFileInputDelegate(Response executeAsync() { - return findFacesFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1, FoundFaces>() { - @Override - public FoundFaces call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Returns the list of faces found. * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the FoundFaces object if successful. */ - public FoundFaces findFacesUrlInput(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) { - return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter).toBlocking().single().body(); + public FoundFaces findFacesUrlInput(String contentType, BodyModel imageUrl) { + return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl).toBlocking().single().body(); } /** @@ -881,13 +893,12 @@ public FoundFaces findFacesUrlInput(String contentType, BodyModelModel imageUrl, * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture findFacesUrlInputAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter), serviceCallback); + public ServiceFuture findFacesUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl), serviceCallback); } /** @@ -895,12 +906,11 @@ public ServiceFuture findFacesUrlInputAsync(String contentType, Body * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter 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 FoundFaces object */ - public Observable findFacesUrlInputAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) { - return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, findFacesUrlInputOptionalParameter).map(new Func1, FoundFaces>() { + public Observable findFacesUrlInputAsync(String contentType, BodyModel imageUrl) { + return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1, FoundFaces>() { @Override public FoundFaces call(ServiceResponse response) { return response.body(); @@ -913,13 +923,12 @@ public FoundFaces call(ServiceResponse response) { * * @param contentType The content type. * @param imageUrl The image url. - * @param findFacesUrlInputOptionalParameter 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 FoundFaces object */ - public Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, FindFacesUrlInputOptionalParameter findFacesUrlInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -928,9 +937,67 @@ public Observable> findFacesUrlInputWithServiceRespo throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - final Boolean cacheImage = findFacesUrlInputOptionalParameter != null ? findFacesUrlInputOptionalParameter.cacheImage() : null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = findFacesUrlInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } - return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage); + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the FoundFaces object if successful. + */ + public FoundFaces findFacesUrlInput(String contentType, BodyModel imageUrl, Boolean cacheImage) { + return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).toBlocking().single().body(); + } + + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture findFacesUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage), serviceCallback); + } + + /** + * Returns the list of faces found. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the FoundFaces object + */ + public Observable findFacesUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage) { + return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1, FoundFaces>() { + @Override + public FoundFaces call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -942,9 +1009,9 @@ public Observable> findFacesUrlInputWithServiceRespo * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the FoundFaces object */ - public Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> findFacesUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, Boolean cacheImage) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -953,7 +1020,7 @@ public Observable> findFacesUrlInputWithServiceRespo throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.findFacesUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -975,77 +1042,19 @@ private ServiceResponse findFacesUrlInputDelegate(Response executeAsync() { - return findFacesUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1, FoundFaces>() { - @Override - public FoundFaces call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - public OCR oCRUrlInput(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { - return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, oCRUrlInputOptionalParameter).toBlocking().single().body(); + public OCR oCRUrlInput(String language, String contentType, BodyModel imageUrl) { + return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl).toBlocking().single().body(); } /** @@ -1054,13 +1063,12 @@ public OCR oCRUrlInput(String language, String contentType, BodyModelModel image * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture oCRUrlInputAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, oCRUrlInputOptionalParameter), serviceCallback); + public ServiceFuture oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl), serviceCallback); } /** @@ -1069,12 +1077,11 @@ public ServiceFuture oCRUrlInputAsync(String language, String contentType, * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter 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 OCR object */ - public Observable oCRUrlInputAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { - return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, oCRUrlInputOptionalParameter).map(new Func1, OCR>() { + public Observable oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl) { + return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl).map(new Func1, OCR>() { @Override public OCR call(ServiceResponse response) { return response.body(); @@ -1088,13 +1095,12 @@ public OCR call(ServiceResponse response) { * @param language Language of the terms. * @param contentType The content type. * @param imageUrl The image url. - * @param oCRUrlInputOptionalParameter 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 OCR object */ - public Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModelModel imageUrl, OCRUrlInputOptionalParameter oCRUrlInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModel imageUrl) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); @@ -1106,10 +1112,58 @@ public Observable> oCRUrlInputWithServiceResponseAsync(Stri throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - final Boolean cacheImage = oCRUrlInputOptionalParameter != null ? oCRUrlInputOptionalParameter.cacheImage() : null; - final Boolean enhanced = oCRUrlInputOptionalParameter != null ? oCRUrlInputOptionalParameter.enhanced() : null; + final Boolean cacheImage = null; + final Boolean enhanced = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.oCRUrlInput(language, cacheImage, enhanced, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = oCRUrlInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + public OCR oCRUrlInput(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced) { + return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced).toBlocking().single().body(); + } - return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced), serviceCallback); } /** @@ -1125,9 +1179,31 @@ public Observable> oCRUrlInputWithServiceResponseAsync(Stri * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OCR object */ - public Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModelModel imageUrl, Boolean cacheImage, Boolean enhanced) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable oCRUrlInputAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced) { + return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced).map(new Func1, OCR>() { + @Override + public OCR call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + public Observable> oCRUrlInputWithServiceResponseAsync(String language, String contentType, BodyModel imageUrl, Boolean cacheImage, Boolean enhanced) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); @@ -1139,7 +1215,7 @@ public Observable> oCRUrlInputWithServiceResponseAsync(Stri throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.oCRUrlInput(language, cacheImage, enhanced, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1161,90 +1237,18 @@ private ServiceResponse oCRUrlInputDelegate(Response response .build(response); } - @Override - public ImageModerationsOCRUrlInputParameters oCRUrlInput() { - return new ImageModerationsOCRUrlInputParameters(this); - } - - /** - * Internal class implementing ImageModerationsOCRUrlInputDefinition. - */ - class ImageModerationsOCRUrlInputParameters implements ImageModerationsOCRUrlInputDefinition { - private ImageModerationsImpl parent; - private String language; - private String contentType; - private BodyModelModel imageUrl; - private Boolean cacheImage; - private Boolean enhanced; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsOCRUrlInputParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsOCRUrlInputParameters withLanguage(String language) { - this.language = language; - return this; - } - - @Override - public ImageModerationsOCRUrlInputParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ImageModerationsOCRUrlInputParameters withImageUrl(BodyModelModel imageUrl) { - this.imageUrl = imageUrl; - return this; - } - - @Override - public ImageModerationsOCRUrlInputParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public ImageModerationsOCRUrlInputParameters withEnhanced(Boolean enhanced) { - this.enhanced = enhanced; - return this; - } - - @Override - public OCR execute() { - return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return oCRUrlInputWithServiceResponseAsync(language, contentType, imageUrl, cacheImage, enhanced).map(new Func1, OCR>() { - @Override - public OCR call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OCR object if successful. */ - public OCR oCRFileInput(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter) { - return oCRFileInputWithServiceResponseAsync(language, imageStream, oCRFileInputOptionalParameter).toBlocking().single().body(); + public OCR oCRFileInput(String language, byte[] imageStream) { + return oCRFileInputWithServiceResponseAsync(language, imageStream).toBlocking().single().body(); } /** @@ -1252,13 +1256,12 @@ public OCR oCRFileInput(String language, byte[] imageStream, OCRFileInputOptiona * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(oCRFileInputWithServiceResponseAsync(language, imageStream, oCRFileInputOptionalParameter), serviceCallback); + public ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRFileInputWithServiceResponseAsync(language, imageStream), serviceCallback); } /** @@ -1266,12 +1269,11 @@ public ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter 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 OCR object */ - public Observable oCRFileInputAsync(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter) { - return oCRFileInputWithServiceResponseAsync(language, imageStream, oCRFileInputOptionalParameter).map(new Func1, OCR>() { + public Observable oCRFileInputAsync(String language, byte[] imageStream) { + return oCRFileInputWithServiceResponseAsync(language, imageStream).map(new Func1, OCR>() { @Override public OCR call(ServiceResponse response) { return response.body(); @@ -1284,13 +1286,12 @@ public OCR call(ServiceResponse response) { * * @param language Language of the terms. * @param imageStream The image file. - * @param oCRFileInputOptionalParameter 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 OCR object */ - public Observable> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream, OCRFileInputOptionalParameter oCRFileInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); @@ -1298,10 +1299,78 @@ public Observable> oCRFileInputWithServiceResponseAsync(Str if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - final Boolean cacheImage = oCRFileInputOptionalParameter != null ? oCRFileInputOptionalParameter.cacheImage() : null; - final Boolean enhanced = oCRFileInputOptionalParameter != null ? oCRFileInputOptionalParameter.enhanced() : null; + final Boolean cacheImage = null; + final Boolean enhanced = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); + return service.oCRFileInput(language, cacheImage, enhanced, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = oCRFileInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the OCR object if successful. + */ + public OCR oCRFileInput(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced) { + return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced).toBlocking().single().body(); + } - return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced); + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture oCRFileInputAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced), serviceCallback); + } + + /** + * Returns any text found in the image for the language specified. If no language is specified in input then the detection defaults to English. + * + * @param language Language of the terms. + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param enhanced When set to True, the image goes through additional processing to come with additional candidates. + image/tiff is not supported when enhanced is set to true + Note: This impacts the response time. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the OCR object + */ + public Observable oCRFileInputAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced) { + return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced).map(new Func1, OCR>() { + @Override + public OCR call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1317,8 +1386,8 @@ public Observable> oCRFileInputWithServiceResponseAsync(Str * @return the observable to the OCR object */ public Observable> oCRFileInputWithServiceResponseAsync(String language, byte[] imageStream, Boolean cacheImage, Boolean enhanced) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); @@ -1326,7 +1395,7 @@ public Observable> oCRFileInputWithServiceResponseAsync(Str if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.oCRFileInput(language, cacheImage, enhanced, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1349,107 +1418,40 @@ private ServiceResponse oCRFileInputDelegate(Response respons .build(response); } - @Override - public ImageModerationsOCRFileInputParameters oCRFileInput() { - return new ImageModerationsOCRFileInputParameters(this); - } - - /** - * Internal class implementing ImageModerationsOCRFileInputDefinition. - */ - class ImageModerationsOCRFileInputParameters implements ImageModerationsOCRFileInputDefinition { - private ImageModerationsImpl parent; - private String language; - private byte[] imageStream; - private Boolean cacheImage; - private Boolean enhanced; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsOCRFileInputParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsOCRFileInputParameters withLanguage(String language) { - this.language = language; - return this; - } - - @Override - public ImageModerationsOCRFileInputParameters withImageStream(byte[] imageStream) { - this.imageStream = imageStream; - return this; - } - - @Override - public ImageModerationsOCRFileInputParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public ImageModerationsOCRFileInputParameters withEnhanced(Boolean enhanced) { - this.enhanced = enhanced; - return this; - } - - @Override - public OCR execute() { - return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return oCRFileInputWithServiceResponseAsync(language, imageStream, cacheImage, enhanced).map(new Func1, OCR>() { - @Override - public OCR call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - public Evaluate evaluateFileInput(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter) { - return evaluateFileInputWithServiceResponseAsync(imageStream, evaluateFileInputOptionalParameter).toBlocking().single().body(); + public Evaluate evaluateFileInput(byte[] imageStream) { + return evaluateFileInputWithServiceResponseAsync(imageStream).toBlocking().single().body(); } /** * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture evaluateFileInputAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(evaluateFileInputWithServiceResponseAsync(imageStream, evaluateFileInputOptionalParameter), serviceCallback); + public ServiceFuture evaluateFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateFileInputWithServiceResponseAsync(imageStream), serviceCallback); } /** * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter 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 Evaluate object */ - public Observable evaluateFileInputAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter) { - return evaluateFileInputWithServiceResponseAsync(imageStream, evaluateFileInputOptionalParameter).map(new Func1, Evaluate>() { + public Observable evaluateFileInputAsync(byte[] imageStream) { + return evaluateFileInputWithServiceResponseAsync(imageStream).map(new Func1, Evaluate>() { @Override public Evaluate call(ServiceResponse response) { return response.body(); @@ -1461,20 +1463,75 @@ public Evaluate call(ServiceResponse response) { * Returns probabilities of the image containing racy or adult content. * * @param imageStream The image file. - * @param evaluateFileInputOptionalParameter 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 Evaluate object */ - public Observable> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, EvaluateFileInputOptionalParameter evaluateFileInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> evaluateFileInputWithServiceResponseAsync(byte[] imageStream) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - final Boolean cacheImage = evaluateFileInputOptionalParameter != null ? evaluateFileInputOptionalParameter.cacheImage() : null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); + return service.evaluateFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = evaluateFileInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + public Evaluate evaluateFileInput(byte[] imageStream, Boolean cacheImage) { + return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage).toBlocking().single().body(); + } - return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture evaluateFileInputAsync(byte[] imageStream, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage), serviceCallback); + } + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param imageStream The image file. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + public Observable evaluateFileInputAsync(byte[] imageStream, Boolean cacheImage) { + return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1, Evaluate>() { + @Override + public Evaluate call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1486,13 +1543,13 @@ public Observable> evaluateFileInputWithServiceRespons * @return the observable to the Evaluate object */ public Observable> evaluateFileInputWithServiceResponseAsync(byte[] imageStream, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.evaluateFileInput(cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1509,75 +1566,24 @@ public Observable> call(Response respons } private ServiceResponse evaluateFileInputDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(APIErrorException.class) - .build(response); - } - - @Override - public ImageModerationsEvaluateFileInputParameters evaluateFileInput() { - return new ImageModerationsEvaluateFileInputParameters(this); - } - - /** - * Internal class implementing ImageModerationsEvaluateFileInputDefinition. - */ - class ImageModerationsEvaluateFileInputParameters implements ImageModerationsEvaluateFileInputDefinition { - private ImageModerationsImpl parent; - private byte[] imageStream; - private Boolean cacheImage; - - /** - * Constructor. - * @param parent the parent object. - */ - ImageModerationsEvaluateFileInputParameters(ImageModerationsImpl parent) { - this.parent = parent; - } - - @Override - public ImageModerationsEvaluateFileInputParameters withImageStream(byte[] imageStream) { - this.imageStream = imageStream; - return this; - } - - @Override - public ImageModerationsEvaluateFileInputParameters withCacheImage(Boolean cacheImage) { - this.cacheImage = cacheImage; - return this; - } - - @Override - public Evaluate execute() { - return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return evaluateFileInputWithServiceResponseAsync(imageStream, cacheImage).map(new Func1, Evaluate>() { - @Override - public Evaluate call(ServiceResponse response) { - return response.body(); - } - }); - } + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(APIErrorException.class) + .build(response); } - /** * Returns probabilities of the image containing racy or adult content. * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Evaluate object if successful. */ - public Evaluate evaluateUrlInput(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter) { - return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, evaluateUrlInputOptionalParameter).toBlocking().single().body(); + public Evaluate evaluateUrlInput(String contentType, BodyModel imageUrl) { + return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl).toBlocking().single().body(); } /** @@ -1585,13 +1591,12 @@ public Evaluate evaluateUrlInput(String contentType, BodyModelModel imageUrl, Ev * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture evaluateUrlInputAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, evaluateUrlInputOptionalParameter), serviceCallback); + public ServiceFuture evaluateUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl), serviceCallback); } /** @@ -1599,12 +1604,11 @@ public ServiceFuture evaluateUrlInputAsync(String contentType, BodyMod * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter 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 Evaluate object */ - public Observable evaluateUrlInputAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter) { - return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, evaluateUrlInputOptionalParameter).map(new Func1, Evaluate>() { + public Observable evaluateUrlInputAsync(String contentType, BodyModel imageUrl) { + return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1, Evaluate>() { @Override public Evaluate call(ServiceResponse response) { return response.body(); @@ -1617,13 +1621,12 @@ public Evaluate call(ServiceResponse response) { * * @param contentType The content type. * @param imageUrl The image url. - * @param evaluateUrlInputOptionalParameter 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 Evaluate object */ - public Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, EvaluateUrlInputOptionalParameter evaluateUrlInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -1632,9 +1635,67 @@ public Observable> evaluateUrlInputWithServiceResponse throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - final Boolean cacheImage = evaluateUrlInputOptionalParameter != null ? evaluateUrlInputOptionalParameter.cacheImage() : null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.evaluateUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = evaluateUrlInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Evaluate object if successful. + */ + public Evaluate evaluateUrlInput(String contentType, BodyModel imageUrl, Boolean cacheImage) { + return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).toBlocking().single().body(); + } - return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage); + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture evaluateUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage), serviceCallback); + } + + /** + * Returns probabilities of the image containing racy or adult content. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Evaluate object + */ + public Observable evaluateUrlInputAsync(String contentType, BodyModel imageUrl, Boolean cacheImage) { + return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1, Evaluate>() { + @Override + public Evaluate call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1646,9 +1707,9 @@ public Observable> evaluateUrlInputWithServiceResponse * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Evaluate object */ - public Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> evaluateUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, Boolean cacheImage) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -1657,7 +1718,7 @@ public Observable> evaluateUrlInputWithServiceResponse throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.evaluateUrlInput(cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1679,63 +1740,6 @@ private ServiceResponse evaluateUrlInputDelegate(Response executeAsync() { - return evaluateUrlInputWithServiceResponseAsync(contentType, imageUrl, cacheImage).map(new Func1, Evaluate>() { - @Override - public Evaluate call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. Returns ID and tags of matching image.<br/> @@ -1744,14 +1748,13 @@ public Evaluate call(ServiceResponse response) { * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - public MatchResponse matchUrlInput(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter) { - return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, matchUrlInputOptionalParameter).toBlocking().single().body(); + public MatchResponse matchUrlInput(String contentType, BodyModel imageUrl) { + return matchUrlInputWithServiceResponseAsync(contentType, imageUrl).toBlocking().single().body(); } /** @@ -1762,13 +1765,12 @@ public MatchResponse matchUrlInput(String contentType, BodyModelModel imageUrl, * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture matchUrlInputAsync(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(matchUrlInputWithServiceResponseAsync(contentType, imageUrl, matchUrlInputOptionalParameter), serviceCallback); + public ServiceFuture matchUrlInputAsync(String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchUrlInputWithServiceResponseAsync(contentType, imageUrl), serviceCallback); } /** @@ -1779,12 +1781,11 @@ public ServiceFuture matchUrlInputAsync(String contentType, BodyM * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter 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 MatchResponse object */ - public Observable matchUrlInputAsync(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter) { - return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, matchUrlInputOptionalParameter).map(new Func1, MatchResponse>() { + public Observable matchUrlInputAsync(String contentType, BodyModel imageUrl) { + return matchUrlInputWithServiceResponseAsync(contentType, imageUrl).map(new Func1, MatchResponse>() { @Override public MatchResponse call(ServiceResponse response) { return response.body(); @@ -1800,13 +1801,12 @@ public MatchResponse call(ServiceResponse response) { * * @param contentType The content type. * @param imageUrl The image url. - * @param matchUrlInputOptionalParameter 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 MatchResponse object */ - public Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, MatchUrlInputOptionalParameter matchUrlInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -1815,10 +1815,80 @@ public Observable> matchUrlInputWithServiceRespon throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - final String listId = matchUrlInputOptionalParameter != null ? matchUrlInputOptionalParameter.listId() : null; - final Boolean cacheImage = matchUrlInputOptionalParameter != null ? matchUrlInputOptionalParameter.cacheImage() : null; + final String listId = null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.matchUrlInput(listId, cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = matchUrlInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. + */ + public MatchResponse matchUrlInput(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage) { + return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage).toBlocking().single().body(); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture matchUrlInputAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage), serviceCallback); + } - return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param contentType The content type. + * @param imageUrl The image url. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + public Observable matchUrlInputAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage) { + return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage).map(new Func1, MatchResponse>() { + @Override + public MatchResponse call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1834,9 +1904,9 @@ public Observable> matchUrlInputWithServiceRespon * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the MatchResponse object */ - public Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModelModel imageUrl, String listId, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> matchUrlInputWithServiceResponseAsync(String contentType, BodyModel imageUrl, String listId, Boolean cacheImage) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); @@ -1845,7 +1915,7 @@ public Observable> matchUrlInputWithServiceRespon throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.matchUrlInput(listId, cacheImage, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1867,70 +1937,6 @@ private ServiceResponse matchUrlInputDelegate(Response executeAsync() { - return matchUrlInputWithServiceResponseAsync(contentType, imageUrl, listId, cacheImage).map(new Func1, MatchResponse>() { - @Override - public MatchResponse call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. Returns ID and tags of matching image.<br/> @@ -1938,14 +1944,13 @@ public MatchResponse call(ServiceResponse response) { Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the MatchResponse object if successful. */ - public MatchResponse matchFileInput(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter) { - return matchFileInputWithServiceResponseAsync(imageStream, matchFileInputOptionalParameter).toBlocking().single().body(); + public MatchResponse matchFileInput(byte[] imageStream) { + return matchFileInputWithServiceResponseAsync(imageStream).toBlocking().single().body(); } /** @@ -1955,13 +1960,12 @@ public MatchResponse matchFileInput(byte[] imageStream, MatchFileInputOptionalPa Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture matchFileInputAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(matchFileInputWithServiceResponseAsync(imageStream, matchFileInputOptionalParameter), serviceCallback); + public ServiceFuture matchFileInputAsync(byte[] imageStream, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchFileInputWithServiceResponseAsync(imageStream), serviceCallback); } /** @@ -1971,12 +1975,11 @@ public ServiceFuture matchFileInputAsync(byte[] imageStream, Matc Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter 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 MatchResponse object */ - public Observable matchFileInputAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter) { - return matchFileInputWithServiceResponseAsync(imageStream, matchFileInputOptionalParameter).map(new Func1, MatchResponse>() { + public Observable matchFileInputAsync(byte[] imageStream) { + return matchFileInputWithServiceResponseAsync(imageStream).map(new Func1, MatchResponse>() { @Override public MatchResponse call(ServiceResponse response) { return response.body(); @@ -1991,21 +1994,88 @@ public MatchResponse call(ServiceResponse response) { Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. * * @param imageStream The image file. - * @param matchFileInputOptionalParameter 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 MatchResponse object */ - public Observable> matchFileInputWithServiceResponseAsync(byte[] imageStream, MatchFileInputOptionalParameter matchFileInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> matchFileInputWithServiceResponseAsync(byte[] imageStream) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - final String listId = matchFileInputOptionalParameter != null ? matchFileInputOptionalParameter.listId() : null; - final Boolean cacheImage = matchFileInputOptionalParameter != null ? matchFileInputOptionalParameter.cacheImage() : null; + final String listId = null; + final Boolean cacheImage = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); + return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = matchFileInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the MatchResponse object if successful. + */ + public MatchResponse matchFileInput(byte[] imageStream, String listId, Boolean cacheImage) { + return matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage).toBlocking().single().body(); + } + + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture matchFileInputAsync(byte[] imageStream, String listId, Boolean cacheImage, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage), serviceCallback); + } - return matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage); + /** + * Fuzzily match an image against one of your custom Image Lists. You can create and manage your custom image lists using <a href="/docs/services/578ff44d2703741568569ab9/operations/578ff7b12703741568569abe">this</a> API. + Returns ID and tags of matching image.<br/> + <br/> + Note: Refresh Index must be run on the corresponding Image List before additions and removals are reflected in the response. + * + * @param imageStream The image file. + * @param listId The list Id. + * @param cacheImage Whether to retain the submitted image for future use; defaults to false if omitted. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the MatchResponse object + */ + public Observable matchFileInputAsync(byte[] imageStream, String listId, Boolean cacheImage) { + return matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage).map(new Func1, MatchResponse>() { + @Override + public MatchResponse call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -2021,13 +2091,13 @@ public Observable> matchFileInputWithServiceRespo * @return the observable to the MatchResponse object */ public Observable> matchFileInputWithServiceResponseAsync(byte[] imageStream, String listId, Boolean cacheImage) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.matchFileInput(listId, cacheImage, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -2050,60 +2120,4 @@ private ServiceResponse matchFileInputDelegate(Response executeAsync() { - return matchFileInputWithServiceResponseAsync(imageStream, listId, cacheImage).map(new Func1, MatchResponse>() { - @Override - public MatchResponse call(ServiceResponse response) { - return response.body(); - } - }); - } - } - } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java index 6755640bc117..1348e452a5ef 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImageListsImpl.java @@ -13,7 +13,7 @@ import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Body; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ImageList; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex; import com.microsoft.rest.ServiceCallback; @@ -71,11 +71,11 @@ interface ListManagementImageListsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImageLists update" }) @PUT("contentmoderator/lists/v1.0/imagelists/{listId}") - Observable> update(@Path("listId") String listId, @Header("Content-Type") String contentType, @Body BodyModel bodyParameter, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> update(@Path("listId") String listId, @Header("Content-Type") String contentType, @Body Body body, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImageLists create" }) @POST("contentmoderator/lists/v1.0/imagelists") - Observable> create(@Header("Content-Type") String contentType, @Body BodyModel bodyParameter, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> create(@Header("Content-Type") String contentType, @Body Body body, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImageLists getAllImageLists" }) @GET("contentmoderator/lists/v1.0/imagelists") @@ -136,13 +136,13 @@ public ImageList call(ServiceResponse response) { * @return the observable to the ImageList object */ public Observable> getDetailsWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getDetails(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -213,13 +213,13 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.delete(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -246,14 +246,14 @@ private ServiceResponse deleteDelegate(Response response) * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ImageList object if successful. */ - public ImageList update(String listId, String contentType, BodyModel bodyParameter) { - return updateWithServiceResponseAsync(listId, contentType, bodyParameter).toBlocking().single().body(); + public ImageList update(String listId, String contentType, Body body) { + return updateWithServiceResponseAsync(listId, contentType, body).toBlocking().single().body(); } /** @@ -261,13 +261,13 @@ public ImageList update(String listId, String contentType, BodyModel bodyParamet * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String listId, String contentType, BodyModel bodyParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(listId, contentType, bodyParameter), serviceCallback); + public ServiceFuture updateAsync(String listId, String contentType, Body body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(listId, contentType, body), serviceCallback); } /** @@ -275,12 +275,12 @@ public ServiceFuture updateAsync(String listId, String contentType, B * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageList object */ - public Observable updateAsync(String listId, String contentType, BodyModel bodyParameter) { - return updateWithServiceResponseAsync(listId, contentType, bodyParameter).map(new Func1, ImageList>() { + public Observable updateAsync(String listId, String contentType, Body body) { + return updateWithServiceResponseAsync(listId, contentType, body).map(new Func1, ImageList>() { @Override public ImageList call(ServiceResponse response) { return response.body(); @@ -293,13 +293,13 @@ public ImageList call(ServiceResponse response) { * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageList object */ - public Observable> updateWithServiceResponseAsync(String listId, String contentType, BodyModel bodyParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> updateWithServiceResponseAsync(String listId, String contentType, Body body) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -307,12 +307,12 @@ public Observable> updateWithServiceResponseAsync(Str if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } - if (bodyParameter == null) { - throw new IllegalArgumentException("Parameter bodyParameter is required and cannot be null."); + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); } - Validator.validate(bodyParameter); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); - return service.update(listId, contentType, bodyParameter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + Validator.validate(body); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.update(listId, contentType, body, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -337,39 +337,39 @@ private ServiceResponse updateDelegate(Response respons * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the ImageList object if successful. */ - public ImageList create(String contentType, BodyModel bodyParameter) { - return createWithServiceResponseAsync(contentType, bodyParameter).toBlocking().single().body(); + public ImageList create(String contentType, Body body) { + return createWithServiceResponseAsync(contentType, body).toBlocking().single().body(); } /** * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createAsync(String contentType, BodyModel bodyParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(contentType, bodyParameter), serviceCallback); + public ServiceFuture createAsync(String contentType, Body body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(contentType, body), serviceCallback); } /** * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageList object */ - public Observable createAsync(String contentType, BodyModel bodyParameter) { - return createWithServiceResponseAsync(contentType, bodyParameter).map(new Func1, ImageList>() { + public Observable createAsync(String contentType, Body body) { + return createWithServiceResponseAsync(contentType, body).map(new Func1, ImageList>() { @Override public ImageList call(ServiceResponse response) { return response.body(); @@ -381,23 +381,23 @@ public ImageList call(ServiceResponse response) { * Creates an image list. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the ImageList object */ - public Observable> createWithServiceResponseAsync(String contentType, BodyModel bodyParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> createWithServiceResponseAsync(String contentType, Body body) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } - if (bodyParameter == null) { - throw new IllegalArgumentException("Parameter bodyParameter is required and cannot be null."); + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); } - Validator.validate(bodyParameter); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); - return service.create(contentType, bodyParameter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + Validator.validate(body); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.create(contentType, body, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -463,10 +463,10 @@ public List call(ServiceResponse> response) { * @return the observable to the List<ImageList> object */ public Observable>> getAllImageListsWithServiceResponseAsync() { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getAllImageLists(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -537,13 +537,13 @@ public RefreshIndex call(ServiceResponse response) { * @return the observable to the RefreshIndex object */ public Observable> refreshIndexMethodWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.refreshIndexMethod(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java index 58f2380bedc4..b4dbed9046f6 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementImagesImpl.java @@ -8,21 +8,19 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageUrlInputOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddImageFileInputOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImages; import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModelModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Image; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ImageIds; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; +import java.io.InputStream; import java.io.IOException; import okhttp3.MediaType; import okhttp3.RequestBody; @@ -83,7 +81,7 @@ interface ListManagementImagesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImages addImageUrlInput" }) @POST("contentmoderator/lists/v1.0/imagelists/{listId}/images") - Observable> addImageUrlInput(@Path("listId") String listId, @Query("tag") Integer tag, @Query("label") String label, @Header("Content-Type") String contentType, @Body BodyModelModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> addImageUrlInput(@Path("listId") String listId, @Query("tag") Integer tag, @Query("label") String label, @Header("Content-Type") String contentType, @Body BodyModel imageUrl, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: image/gif", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementImages addImageFileInput" }) @POST("contentmoderator/lists/v1.0/imagelists/{listId}/images") @@ -91,44 +89,40 @@ interface ListManagementImagesService { } - /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - public Image addImage(String listId, AddImageOptionalParameter addImageOptionalParameter) { - return addImageWithServiceResponseAsync(listId, addImageOptionalParameter).toBlocking().single().body(); + public Image addImage(String listId) { + return addImageWithServiceResponseAsync(listId).toBlocking().single().body(); } /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addImageAsync(String listId, AddImageOptionalParameter addImageOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addImageWithServiceResponseAsync(listId, addImageOptionalParameter), serviceCallback); + public ServiceFuture addImageAsync(String listId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageWithServiceResponseAsync(listId), serviceCallback); } /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter 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 Image object */ - public Observable addImageAsync(String listId, AddImageOptionalParameter addImageOptionalParameter) { - return addImageWithServiceResponseAsync(listId, addImageOptionalParameter).map(new Func1, Image>() { + public Observable addImageAsync(String listId) { + return addImageWithServiceResponseAsync(listId).map(new Func1, Image>() { @Override public Image call(ServiceResponse response) { return response.body(); @@ -140,21 +134,78 @@ public Image call(ServiceResponse response) { * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. - * @param addImageOptionalParameter 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 Image object */ - public Observable> addImageWithServiceResponseAsync(String listId, AddImageOptionalParameter addImageOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addImageWithServiceResponseAsync(String listId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - final Integer tag = addImageOptionalParameter != null ? addImageOptionalParameter.tag() : null; - final String label = addImageOptionalParameter != null ? addImageOptionalParameter.label() : null; + final Integer tag = null; + final String label = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addImage(listId, tag, label, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addImageDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } - return addImageWithServiceResponseAsync(listId, tag, label); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + public Image addImage(String listId, Integer tag, String label) { + return addImageWithServiceResponseAsync(listId, tag, label).toBlocking().single().body(); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addImageAsync(String listId, Integer tag, String label, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageWithServiceResponseAsync(listId, tag, label), serviceCallback); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + public Observable addImageAsync(String listId, Integer tag, String label) { + return addImageWithServiceResponseAsync(listId, tag, label).map(new Func1, Image>() { + @Override + public Image call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -167,13 +218,13 @@ public Observable> addImageWithServiceResponseAsync(Strin * @return the observable to the Image object */ public Observable> addImageWithServiceResponseAsync(String listId, Integer tag, String label) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addImage(listId, tag, label, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -195,62 +246,6 @@ private ServiceResponse addImageDelegate(Response response) .build(response); } - @Override - public ListManagementImagesAddImageParameters addImage() { - return new ListManagementImagesAddImageParameters(this); - } - - /** - * Internal class implementing ListManagementImagesAddImageDefinition. - */ - class ListManagementImagesAddImageParameters implements ListManagementImagesAddImageDefinition { - private ListManagementImagesImpl parent; - private String listId; - private Integer tag; - private String label; - - /** - * Constructor. - * @param parent the parent object. - */ - ListManagementImagesAddImageParameters(ListManagementImagesImpl parent) { - this.parent = parent; - } - - @Override - public ListManagementImagesAddImageParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public ListManagementImagesAddImageParameters withTag(Integer tag) { - this.tag = tag; - return this; - } - - @Override - public ListManagementImagesAddImageParameters withLabel(String label) { - this.label = label; - return this; - } - - @Override - public Image execute() { - return addImageWithServiceResponseAsync(listId, tag, label).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return addImageWithServiceResponseAsync(listId, tag, label).map(new Func1, Image>() { - @Override - public Image call(ServiceResponse response) { - return response.body(); - } - }); - } - } - /** * Deletes all images from the list with list Id equal to list Id passed. * @@ -300,13 +295,13 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteAllImagesWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.deleteAllImages(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -377,13 +372,13 @@ public ImageIds call(ServiceResponse response) { * @return the observable to the ImageIds object */ public Observable> getAllImageIdsWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getAllImageIds(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -458,8 +453,8 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteImageWithServiceResponseAsync(String listId, String imageId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -467,7 +462,7 @@ public Observable> deleteImageWithServiceResponseAsync(S if (imageId == null) { throw new IllegalArgumentException("Parameter imageId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.deleteImage(listId, imageId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -489,21 +484,19 @@ private ServiceResponse deleteImageDelegate(Response respo .build(response); } - /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - public Image addImageUrlInput(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter) { - return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, addImageUrlInputOptionalParameter).toBlocking().single().body(); + public Image addImageUrlInput(String listId, String contentType, BodyModel imageUrl) { + return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl).toBlocking().single().body(); } /** @@ -512,13 +505,12 @@ public Image addImageUrlInput(String listId, String contentType, BodyModelModel * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addImageUrlInputAsync(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, addImageUrlInputOptionalParameter), serviceCallback); + public ServiceFuture addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl), serviceCallback); } /** @@ -527,12 +519,11 @@ public ServiceFuture addImageUrlInputAsync(String listId, String contentT * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter 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 Image object */ - public Observable addImageUrlInputAsync(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter) { - return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, addImageUrlInputOptionalParameter).map(new Func1, Image>() { + public Observable addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl) { + return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl).map(new Func1, Image>() { @Override public Image call(ServiceResponse response) { return response.body(); @@ -546,13 +537,12 @@ public Image call(ServiceResponse response) { * @param listId List Id of the image list. * @param contentType The content type. * @param imageUrl The image url. - * @param addImageUrlInputOptionalParameter 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 Image object */ - public Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModelModel imageUrl, AddImageUrlInputOptionalParameter addImageUrlInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModel imageUrl) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -564,10 +554,74 @@ public Observable> addImageUrlInputWithServiceResponseAsy throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - final Integer tag = addImageUrlInputOptionalParameter != null ? addImageUrlInputOptionalParameter.tag() : null; - final String label = addImageUrlInputOptionalParameter != null ? addImageUrlInputOptionalParameter.label() : null; + final Integer tag = null; + final String label = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addImageUrlInput(listId, tag, label, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addImageUrlInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } - return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + public Image addImageUrlInput(String listId, String contentType, BodyModel imageUrl, Integer tag, String label) { + return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label).toBlocking().single().body(); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label), serviceCallback); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param contentType The content type. + * @param imageUrl The image url. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + public Observable addImageUrlInputAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label) { + return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label).map(new Func1, Image>() { + @Override + public Image call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -581,9 +635,9 @@ public Observable> addImageUrlInputWithServiceResponseAsy * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Image object */ - public Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModelModel imageUrl, Integer tag, String label) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addImageUrlInputWithServiceResponseAsync(String listId, String contentType, BodyModel imageUrl, Integer tag, String label) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -595,7 +649,7 @@ public Observable> addImageUrlInputWithServiceResponseAsy throw new IllegalArgumentException("Parameter imageUrl is required and cannot be null."); } Validator.validate(imageUrl); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addImageUrlInput(listId, tag, label, contentType, imageUrl, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -617,90 +671,18 @@ private ServiceResponse addImageUrlInputDelegate(Response r .build(response); } - @Override - public ListManagementImagesAddImageUrlInputParameters addImageUrlInput() { - return new ListManagementImagesAddImageUrlInputParameters(this); - } - - /** - * Internal class implementing ListManagementImagesAddImageUrlInputDefinition. - */ - class ListManagementImagesAddImageUrlInputParameters implements ListManagementImagesAddImageUrlInputDefinition { - private ListManagementImagesImpl parent; - private String listId; - private String contentType; - private BodyModelModel imageUrl; - private Integer tag; - private String label; - - /** - * Constructor. - * @param parent the parent object. - */ - ListManagementImagesAddImageUrlInputParameters(ListManagementImagesImpl parent) { - this.parent = parent; - } - - @Override - public ListManagementImagesAddImageUrlInputParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public ListManagementImagesAddImageUrlInputParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ListManagementImagesAddImageUrlInputParameters withImageUrl(BodyModelModel imageUrl) { - this.imageUrl = imageUrl; - return this; - } - - @Override - public ListManagementImagesAddImageUrlInputParameters withTag(Integer tag) { - this.tag = tag; - return this; - } - - @Override - public ListManagementImagesAddImageUrlInputParameters withLabel(String label) { - this.label = label; - return this; - } - - @Override - public Image execute() { - return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return addImageUrlInputWithServiceResponseAsync(listId, contentType, imageUrl, tag, label).map(new Func1, Image>() { - @Override - public Image call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Add an image to the list with list Id equal to list Id passed. * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Image object if successful. */ - public Image addImageFileInput(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter) { - return addImageFileInputWithServiceResponseAsync(listId, imageStream, addImageFileInputOptionalParameter).toBlocking().single().body(); + public Image addImageFileInput(String listId, byte[] imageStream) { + return addImageFileInputWithServiceResponseAsync(listId, imageStream).toBlocking().single().body(); } /** @@ -708,13 +690,12 @@ public Image addImageFileInput(String listId, byte[] imageStream, AddImageFileIn * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addImageFileInputAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addImageFileInputWithServiceResponseAsync(listId, imageStream, addImageFileInputOptionalParameter), serviceCallback); + public ServiceFuture addImageFileInputAsync(String listId, byte[] imageStream, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageFileInputWithServiceResponseAsync(listId, imageStream), serviceCallback); } /** @@ -722,12 +703,11 @@ public ServiceFuture addImageFileInputAsync(String listId, byte[] imageSt * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter 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 Image object */ - public Observable addImageFileInputAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter) { - return addImageFileInputWithServiceResponseAsync(listId, imageStream, addImageFileInputOptionalParameter).map(new Func1, Image>() { + public Observable addImageFileInputAsync(String listId, byte[] imageStream) { + return addImageFileInputWithServiceResponseAsync(listId, imageStream).map(new Func1, Image>() { @Override public Image call(ServiceResponse response) { return response.body(); @@ -740,13 +720,12 @@ public Image call(ServiceResponse response) { * * @param listId List Id of the image list. * @param imageStream The image file. - * @param addImageFileInputOptionalParameter 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 Image object */ - public Observable> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream, AddImageFileInputOptionalParameter addImageFileInputOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -754,10 +733,72 @@ public Observable> addImageFileInputWithServiceResponseAs if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - final Integer tag = addImageFileInputOptionalParameter != null ? addImageFileInputOptionalParameter.tag() : null; - final String label = addImageFileInputOptionalParameter != null ? addImageFileInputOptionalParameter.label() : null; + final Integer tag = null; + final String label = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); + return service.addImageFileInput(listId, tag, label, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addImageFileInputDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Image object if successful. + */ + public Image addImageFileInput(String listId, byte[] imageStream, Integer tag, String label) { + return addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label).toBlocking().single().body(); + } - return addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label); + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addImageFileInputAsync(String listId, byte[] imageStream, Integer tag, String label, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label), serviceCallback); + } + + /** + * Add an image to the list with list Id equal to list Id passed. + * + * @param listId List Id of the image list. + * @param imageStream The image file. + * @param tag Tag for the image. + * @param label The image label. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Image object + */ + public Observable addImageFileInputAsync(String listId, byte[] imageStream, Integer tag, String label) { + return addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label).map(new Func1, Image>() { + @Override + public Image call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -771,8 +812,8 @@ public Observable> addImageFileInputWithServiceResponseAs * @return the observable to the Image object */ public Observable> addImageFileInputWithServiceResponseAsync(String listId, byte[] imageStream, Integer tag, String label) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -780,7 +821,7 @@ public Observable> addImageFileInputWithServiceResponseAs if (imageStream == null) { throw new IllegalArgumentException("Parameter imageStream is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody imageStreamConverted = RequestBody.create(MediaType.parse("image/gif"), imageStream); return service.addImageFileInput(listId, tag, label, imageStreamConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -803,67 +844,4 @@ private ServiceResponse addImageFileInputDelegate(Response .build(response); } - @Override - public ListManagementImagesAddImageFileInputParameters addImageFileInput() { - return new ListManagementImagesAddImageFileInputParameters(this); - } - - /** - * Internal class implementing ListManagementImagesAddImageFileInputDefinition. - */ - class ListManagementImagesAddImageFileInputParameters implements ListManagementImagesAddImageFileInputDefinition { - private ListManagementImagesImpl parent; - private String listId; - private byte[] imageStream; - private Integer tag; - private String label; - - /** - * Constructor. - * @param parent the parent object. - */ - ListManagementImagesAddImageFileInputParameters(ListManagementImagesImpl parent) { - this.parent = parent; - } - - @Override - public ListManagementImagesAddImageFileInputParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public ListManagementImagesAddImageFileInputParameters withImageStream(byte[] imageStream) { - this.imageStream = imageStream; - return this; - } - - @Override - public ListManagementImagesAddImageFileInputParameters withTag(Integer tag) { - this.tag = tag; - return this; - } - - @Override - public ListManagementImagesAddImageFileInputParameters withLabel(String label) { - this.label = label; - return this; - } - - @Override - public Image execute() { - return addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return addImageFileInputWithServiceResponseAsync(listId, imageStream, tag, label).map(new Func1, Image>() { - @Override - public Image call(ServiceResponse response) { - return response.body(); - } - }); - } - } - } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java index 45122f31b5ec..416986027963 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermListsImpl.java @@ -13,7 +13,7 @@ import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.APIErrorException; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.BodyModel; +import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.Body; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.RefreshIndex; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.TermList; import com.microsoft.rest.ServiceCallback; @@ -72,11 +72,11 @@ interface ListManagementTermListsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTermLists update" }) @PUT("contentmoderator/lists/v1.0/termlists/{listId}") - Observable> update(@Path("listId") String listId, @Header("Content-Type") String contentType, @Body BodyModel bodyParameter, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> update(@Path("listId") String listId, @Header("Content-Type") String contentType, @Body Body body, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTermLists create" }) @POST("contentmoderator/lists/v1.0/termlists") - Observable> create(@Header("Content-Type") String contentType, @Body BodyModel bodyParameter, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); + Observable> create(@Header("Content-Type") String contentType, @Body Body body, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTermLists getAllTermLists" }) @GET("contentmoderator/lists/v1.0/termlists") @@ -137,13 +137,13 @@ public TermList call(ServiceResponse response) { * @return the observable to the TermList object */ public Observable> getDetailsWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getDetails(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -214,13 +214,13 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteWithServiceResponseAsync(String listId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.delete(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -247,14 +247,14 @@ private ServiceResponse deleteDelegate(Response response) * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TermList object if successful. */ - public TermList update(String listId, String contentType, BodyModel bodyParameter) { - return updateWithServiceResponseAsync(listId, contentType, bodyParameter).toBlocking().single().body(); + public TermList update(String listId, String contentType, Body body) { + return updateWithServiceResponseAsync(listId, contentType, body).toBlocking().single().body(); } /** @@ -262,13 +262,13 @@ public TermList update(String listId, String contentType, BodyModel bodyParamete * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture updateAsync(String listId, String contentType, BodyModel bodyParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(listId, contentType, bodyParameter), serviceCallback); + public ServiceFuture updateAsync(String listId, String contentType, Body body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(listId, contentType, body), serviceCallback); } /** @@ -276,12 +276,12 @@ public ServiceFuture updateAsync(String listId, String contentType, Bo * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TermList object */ - public Observable updateAsync(String listId, String contentType, BodyModel bodyParameter) { - return updateWithServiceResponseAsync(listId, contentType, bodyParameter).map(new Func1, TermList>() { + public Observable updateAsync(String listId, String contentType, Body body) { + return updateWithServiceResponseAsync(listId, contentType, body).map(new Func1, TermList>() { @Override public TermList call(ServiceResponse response) { return response.body(); @@ -294,13 +294,13 @@ public TermList call(ServiceResponse response) { * * @param listId List Id of the image list. * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TermList object */ - public Observable> updateWithServiceResponseAsync(String listId, String contentType, BodyModel bodyParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> updateWithServiceResponseAsync(String listId, String contentType, Body body) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -308,12 +308,12 @@ public Observable> updateWithServiceResponseAsync(Stri if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } - if (bodyParameter == null) { - throw new IllegalArgumentException("Parameter bodyParameter is required and cannot be null."); + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); } - Validator.validate(bodyParameter); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); - return service.update(listId, contentType, bodyParameter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + Validator.validate(body); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.update(listId, contentType, body, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -338,39 +338,39 @@ private ServiceResponse updateDelegate(Response response * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the TermList object if successful. */ - public TermList create(String contentType, BodyModel bodyParameter) { - return createWithServiceResponseAsync(contentType, bodyParameter).toBlocking().single().body(); + public TermList create(String contentType, Body body) { + return createWithServiceResponseAsync(contentType, body).toBlocking().single().body(); } /** * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createAsync(String contentType, BodyModel bodyParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createWithServiceResponseAsync(contentType, bodyParameter), serviceCallback); + public ServiceFuture createAsync(String contentType, Body body, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createWithServiceResponseAsync(contentType, body), serviceCallback); } /** * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TermList object */ - public Observable createAsync(String contentType, BodyModel bodyParameter) { - return createWithServiceResponseAsync(contentType, bodyParameter).map(new Func1, TermList>() { + public Observable createAsync(String contentType, Body body) { + return createWithServiceResponseAsync(contentType, body).map(new Func1, TermList>() { @Override public TermList call(ServiceResponse response) { return response.body(); @@ -382,23 +382,23 @@ public TermList call(ServiceResponse response) { * Creates a Term List. * * @param contentType The content type. - * @param bodyParameter Schema of the body. + * @param body Schema of the body. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the TermList object */ - public Observable> createWithServiceResponseAsync(String contentType, BodyModel bodyParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> createWithServiceResponseAsync(String contentType, Body body) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (contentType == null) { throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); } - if (bodyParameter == null) { - throw new IllegalArgumentException("Parameter bodyParameter is required and cannot be null."); + if (body == null) { + throw new IllegalArgumentException("Parameter body is required and cannot be null."); } - Validator.validate(bodyParameter); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); - return service.create(contentType, bodyParameter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + Validator.validate(body); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.create(contentType, body, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -464,10 +464,10 @@ public List call(ServiceResponse> response) { * @return the observable to the List<TermList> object */ public Observable>> getAllTermListsWithServiceResponseAsync() { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getAllTermLists(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -542,8 +542,8 @@ public RefreshIndex call(ServiceResponse response) { * @return the observable to the RefreshIndex object */ public Observable> refreshIndexMethodWithServiceResponseAsync(String listId, String language) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -551,7 +551,7 @@ public Observable> refreshIndexMethodWithServiceRe if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.refreshIndexMethod(listId, language, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java index 5340a2f6bd03..2d041b119e37 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ListManagementTermsImpl.java @@ -8,7 +8,6 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.GetAllTermsOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.ListManagementTerms; import com.google.common.base.Joiner; @@ -132,8 +131,8 @@ public Object call(ServiceResponse response) { * @return the observable to the Object object */ public Observable> addTermWithServiceResponseAsync(String listId, String term, String language) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -144,7 +143,7 @@ public Observable> addTermWithServiceResponseAsync(Strin if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addTerm(listId, term, language, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -223,8 +222,8 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteTermWithServiceResponseAsync(String listId, String term, String language) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -235,7 +234,7 @@ public Observable> deleteTermWithServiceResponseAsync(St if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.deleteTerm(listId, term, language, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -257,20 +256,18 @@ private ServiceResponse deleteTermDelegate(Response respon .build(response); } - /** * Gets all terms from the list with list Id equal to the list Id passed. * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Terms object if successful. */ - public Terms getAllTerms(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter) { - return getAllTermsWithServiceResponseAsync(listId, language, getAllTermsOptionalParameter).toBlocking().single().body(); + public Terms getAllTerms(String listId, String language) { + return getAllTermsWithServiceResponseAsync(listId, language).toBlocking().single().body(); } /** @@ -278,13 +275,12 @@ public Terms getAllTerms(String listId, String language, GetAllTermsOptionalPara * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getAllTermsAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getAllTermsWithServiceResponseAsync(listId, language, getAllTermsOptionalParameter), serviceCallback); + public ServiceFuture getAllTermsAsync(String listId, String language, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAllTermsWithServiceResponseAsync(listId, language), serviceCallback); } /** @@ -292,12 +288,11 @@ public ServiceFuture getAllTermsAsync(String listId, String language, Get * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter 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 Terms object */ - public Observable getAllTermsAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter) { - return getAllTermsWithServiceResponseAsync(listId, language, getAllTermsOptionalParameter).map(new Func1, Terms>() { + public Observable getAllTermsAsync(String listId, String language) { + return getAllTermsWithServiceResponseAsync(listId, language).map(new Func1, Terms>() { @Override public Terms call(ServiceResponse response) { return response.body(); @@ -310,13 +305,12 @@ public Terms call(ServiceResponse response) { * * @param listId List Id of the image list. * @param language Language of the terms. - * @param getAllTermsOptionalParameter 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 Terms object */ - public Observable> getAllTermsWithServiceResponseAsync(String listId, String language, GetAllTermsOptionalParameter getAllTermsOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> getAllTermsWithServiceResponseAsync(String listId, String language) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -324,10 +318,71 @@ public Observable> getAllTermsWithServiceResponseAsync(St if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - final Integer offset = getAllTermsOptionalParameter != null ? getAllTermsOptionalParameter.offset() : null; - final Integer limit = getAllTermsOptionalParameter != null ? getAllTermsOptionalParameter.limit() : null; + final Integer offset = null; + final Integer limit = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getAllTerms(listId, language, offset, limit, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getAllTermsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Terms object if successful. + */ + public Terms getAllTerms(String listId, String language, Integer offset, Integer limit) { + return getAllTermsWithServiceResponseAsync(listId, language, offset, limit).toBlocking().single().body(); + } + + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture getAllTermsAsync(String listId, String language, Integer offset, Integer limit, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getAllTermsWithServiceResponseAsync(listId, language, offset, limit), serviceCallback); + } - return getAllTermsWithServiceResponseAsync(listId, language, offset, limit); + /** + * Gets all terms from the list with list Id equal to the list Id passed. + * + * @param listId List Id of the image list. + * @param language Language of the terms. + * @param offset The pagination start index. + * @param limit The max limit. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Terms object + */ + public Observable getAllTermsAsync(String listId, String language, Integer offset, Integer limit) { + return getAllTermsWithServiceResponseAsync(listId, language, offset, limit).map(new Func1, Terms>() { + @Override + public Terms call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -341,8 +396,8 @@ public Observable> getAllTermsWithServiceResponseAsync(St * @return the observable to the Terms object */ public Observable> getAllTermsWithServiceResponseAsync(String listId, String language, Integer offset, Integer limit) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -350,7 +405,7 @@ public Observable> getAllTermsWithServiceResponseAsync(St if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getAllTerms(listId, language, offset, limit, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -372,69 +427,6 @@ private ServiceResponse getAllTermsDelegate(Response respon .build(response); } - @Override - public ListManagementTermsGetAllTermsParameters getAllTerms() { - return new ListManagementTermsGetAllTermsParameters(this); - } - - /** - * Internal class implementing ListManagementTermsGetAllTermsDefinition. - */ - class ListManagementTermsGetAllTermsParameters implements ListManagementTermsGetAllTermsDefinition { - private ListManagementTermsImpl parent; - private String listId; - private String language; - private Integer offset; - private Integer limit; - - /** - * Constructor. - * @param parent the parent object. - */ - ListManagementTermsGetAllTermsParameters(ListManagementTermsImpl parent) { - this.parent = parent; - } - - @Override - public ListManagementTermsGetAllTermsParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public ListManagementTermsGetAllTermsParameters withLanguage(String language) { - this.language = language; - return this; - } - - @Override - public ListManagementTermsGetAllTermsParameters withOffset(Integer offset) { - this.offset = offset; - return this; - } - - @Override - public ListManagementTermsGetAllTermsParameters withLimit(Integer limit) { - this.limit = limit; - return this; - } - - @Override - public Terms execute() { - return getAllTermsWithServiceResponseAsync(listId, language, offset, limit).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return getAllTermsWithServiceResponseAsync(listId, language, offset, limit).map(new Func1, Terms>() { - @Override - public Terms call(ServiceResponse response) { - return response.body(); - } - }); - } - } - /** * Deletes all terms from the list with list Id equal to the list Id passed. * @@ -488,8 +480,8 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> deleteAllTermsWithServiceResponseAsync(String listId, String language) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); @@ -497,7 +489,7 @@ public Observable> deleteAllTermsWithServiceResponseAsyn if (language == null) { throw new IllegalArgumentException("Parameter language is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.deleteAllTerms(listId, language, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java index be5eebd43ab9..57d679fc96b7 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java @@ -8,13 +8,6 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateReviewsOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateJobOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.GetVideoFramesOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.CreateVideoReviewsOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameUrlOptionalParameter; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.AddVideoFrameStreamOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.Reviews; import com.google.common.base.Joiner; @@ -33,6 +26,7 @@ import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; +import java.io.InputStream; import java.io.IOException; import java.util.List; import okhttp3.MediaType; @@ -181,8 +175,8 @@ public Review call(ServiceResponse response) { * @return the observable to the Review object */ public Observable> getReviewWithServiceResponseAsync(String teamName, String reviewId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -190,7 +184,7 @@ public Observable> getReviewWithServiceResponseAsync(Str if (reviewId == null) { throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getReview(teamName, reviewId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -265,8 +259,8 @@ public Job call(ServiceResponse response) { * @return the observable to the Job object */ public Observable> getJobDetailsWithServiceResponseAsync(String teamName, String jobId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -274,7 +268,7 @@ public Observable> getJobDetailsWithServiceResponseAsync(St if (jobId == null) { throw new IllegalArgumentException("Parameter jobId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getJobDetails(teamName, jobId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -296,7 +290,6 @@ private ServiceResponse getJobDetailsDelegate(Response respon .build(response); } - /** * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. <h3>CallBack Schemas </h3> @@ -324,14 +317,13 @@ private ServiceResponse getJobDetailsDelegate(Response respon * @param teamName Your team name. * @param urlContentType The content type. * @param createReviewBody Body for create reviews API - * @param createReviewsOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<String> object if successful. */ - public List createReviews(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter) { - return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, createReviewsOptionalParameter).toBlocking().single().body(); + public List createReviews(String teamName, String urlContentType, List createReviewBody) { + return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody).toBlocking().single().body(); } /** @@ -361,13 +353,12 @@ public List createReviews(String teamName, String urlContentType, List> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, createReviewsOptionalParameter), serviceCallback); + public ServiceFuture> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody), serviceCallback); } /** @@ -397,12 +388,11 @@ public ServiceFuture> createReviewsAsync(String teamName, String ur * @param teamName Your team name. * @param urlContentType The content type. * @param createReviewBody Body for create reviews API - * @param createReviewsOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<String> object */ - public Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter) { - return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, createReviewsOptionalParameter).map(new Func1>, List>() { + public Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody) { + return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.body(); @@ -437,13 +427,12 @@ public List call(ServiceResponse> response) { * @param teamName Your team name. * @param urlContentType The content type. * @param createReviewBody Body for create reviews API - * @param createReviewsOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<String> object */ - public Observable>> createReviewsWithServiceResponseAsync(String teamName, String urlContentType, List createReviewBody, CreateReviewsOptionalParameter createReviewsOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable>> createReviewsWithServiceResponseAsync(String teamName, String urlContentType, List createReviewBody) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -455,9 +444,133 @@ public Observable>> createReviewsWithServiceRespons throw new IllegalArgumentException("Parameter createReviewBody is required and cannot be null."); } Validator.validate(createReviewBody); - final String subTeam = createReviewsOptionalParameter != null ? createReviewsOptionalParameter.subTeam() : null; + final String subTeam = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createReviews(teamName, urlContentType, subTeam, createReviewBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = createReviewsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + public List createReviews(String teamName, String urlContentType, List createReviewBody, String subTeam) { + return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam).toBlocking().single().body(); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, String subTeam, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam), serviceCallback); + } - return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param urlContentType The content type. + * @param createReviewBody Body for create reviews API + * @param subTeam SubTeam of your team, you want to assign the created review to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable> createReviewsAsync(String teamName, String urlContentType, List createReviewBody, String subTeam) { + return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); } /** @@ -492,8 +605,8 @@ public Observable>> createReviewsWithServiceRespons * @return the observable to the List<String> object */ public Observable>> createReviewsWithServiceResponseAsync(String teamName, String urlContentType, List createReviewBody, String subTeam) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -505,7 +618,7 @@ public Observable>> createReviewsWithServiceRespons throw new IllegalArgumentException("Parameter createReviewBody is required and cannot be null."); } Validator.validate(createReviewBody); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.createReviews(teamName, urlContentType, subTeam, createReviewBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -527,70 +640,6 @@ private ServiceResponse> createReviewsDelegate(Response createReviewBody; - private String subTeam; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsCreateReviewsParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsCreateReviewsParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsCreateReviewsParameters withUrlContentType(String urlContentType) { - this.urlContentType = urlContentType; - return this; - } - - @Override - public ReviewsCreateReviewsParameters withCreateReviewBody(List createReviewBody) { - this.createReviewBody = createReviewBody; - return this; - } - - @Override - public ReviewsCreateReviewsParameters withSubTeam(String subTeam) { - this.subTeam = subTeam; - return this; - } - - @Override - public List execute() { - return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam).toBlocking().single().body(); - } - - @Override - public Observable> executeAsync() { - return createReviewsWithServiceResponseAsync(teamName, urlContentType, createReviewBody, subTeam).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - } - - /** * A job Id will be returned for the content posted on this endpoint. Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. @@ -640,14 +689,13 @@ public List call(ServiceResponse> response) { * @param workflowName Workflow Name that you want to invoke. * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the JobId object if successful. */ - public JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter) { - return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, createJobOptionalParameter).toBlocking().single().body(); + public JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue) { + return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue).toBlocking().single().body(); } /** @@ -699,13 +747,12 @@ public JobId createJob(String teamName, String contentType, String contentId, St * @param workflowName Workflow Name that you want to invoke. * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, createJobOptionalParameter), serviceCallback); + public ServiceFuture createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue), serviceCallback); } /** @@ -757,12 +804,11 @@ public ServiceFuture createJobAsync(String teamName, String contentType, * @param workflowName Workflow Name that you want to invoke. * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter 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 JobId object */ - public Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter) { - return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, createJobOptionalParameter).map(new Func1, JobId>() { + public Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue) { + return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue).map(new Func1, JobId>() { @Override public JobId call(ServiceResponse response) { return response.body(); @@ -819,13 +865,12 @@ public JobId call(ServiceResponse response) { * @param workflowName Workflow Name that you want to invoke. * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' * @param contentValue Content to evaluate for a job. - * @param createJobOptionalParameter 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 JobId object */ - public Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, CreateJobOptionalParameter createJobOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -845,9 +890,22 @@ public Observable> createJobWithServiceResponseAsync(Stri if (contentValue == null) { throw new IllegalArgumentException("Parameter contentValue is required and cannot be null."); } - final String callBackEndpoint = createJobOptionalParameter != null ? createJobOptionalParameter.callBackEndpoint() : null; - - return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, callBackEndpoint); + final String callBackEndpoint = null; + Content content = new Content(); + content.withContentValue(contentValue); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createJob(teamName, contentType, contentId, workflowName, callBackEndpoint, jobContentType, this.client.acceptLanguage(), content, parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } /** @@ -901,172 +959,265 @@ public Observable> createJobWithServiceResponseAsync(Stri * @param contentValue Content to evaluate for a job. * @param callBackEndpoint Callback endpoint for posting the create job result. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the JobId object - */ - public Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); - } - if (teamName == null) { - throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); - } - if (contentType == null) { - throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); - } - if (contentId == null) { - throw new IllegalArgumentException("Parameter contentId is required and cannot be null."); - } - if (workflowName == null) { - throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); - } - if (jobContentType == null) { - throw new IllegalArgumentException("Parameter jobContentType is required and cannot be null."); - } - if (contentValue == null) { - throw new IllegalArgumentException("Parameter contentValue is required and cannot be null."); - } - Content content = new Content(); - content.withContentValue(contentValue); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); - return service.createJob(teamName, contentType, contentId, workflowName, callBackEndpoint, jobContentType, this.client.acceptLanguage(), content, parameterizedHost, this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createJobDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createJobDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(APIErrorException.class) - .build(response); - } - - @Override - public ReviewsCreateJobParameters createJob() { - return new ReviewsCreateJobParameters(this); - } - - /** - * Internal class implementing ReviewsCreateJobDefinition. + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the JobId object if successful. */ - class ReviewsCreateJobParameters implements ReviewsCreateJobDefinition { - private ReviewsImpl parent; - private String teamName; - private String contentType; - private String contentId; - private String workflowName; - private String jobContentType; - private String contentValue; - private String callBackEndpoint; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsCreateJobParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsCreateJobParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsCreateJobParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ReviewsCreateJobParameters withContentId(String contentId) { - this.contentId = contentId; - return this; - } - - @Override - public ReviewsCreateJobParameters withWorkflowName(String workflowName) { - this.workflowName = workflowName; - return this; - } - - @Override - public ReviewsCreateJobParameters withJobContentType(String jobContentType) { - this.jobContentType = jobContentType; - return this; - } - - @Override - public ReviewsCreateJobParameters withContentValue(String contentValue) { - this.contentValue = contentValue; - return this; - } - - @Override - public ReviewsCreateJobParameters withCallBackEndpoint(String callBackEndpoint) { - this.callBackEndpoint = callBackEndpoint; - return this; - } - - @Override - public JobId execute() { + public JobId createJob(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint) { return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, callBackEndpoint).toBlocking().single().body(); } - @Override - public Observable executeAsync() { - return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, callBackEndpoint).map(new Func1, JobId>() { - @Override - public JobId call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. <h3>CallBack Schemas </h3> - <h4>Review Completion CallBack Sample</h4> <p> + <h4>Job Completion CallBack Sample</h4><br/> {<br/> - "ReviewId": "<Review Id>",<br/> - "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - "ModifiedBy": "<Name of the Reviewer>",<br/> - "CallBackType": "Review",<br/> - "ContentId": "<The ContentId that was specified input>",<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> "Metadata": {<br/> "adultscore": "0.xxx",<br/> "a": "False",<br/> "racyscore": "0.xxx",<br/> "r": "True"<br/> - },<br/> - "ReviewerResultTags": {<br/> - "a": "False",<br/> - "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, callBackEndpoint), serviceCallback); + } + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobId object + */ + public Observable createJobAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint) { + return createJobWithServiceResponseAsync(teamName, contentType, contentId, workflowName, jobContentType, contentValue, callBackEndpoint).map(new Func1, JobId>() { + @Override + public JobId call(ServiceResponse response) { + return response.body(); + } + }); + } + + /** + * A job Id will be returned for the content posted on this endpoint. + Once the content is evaluated against the Workflow provided the review will be created or ignored based on the workflow expression. + <h3>CallBack Schemas </h3> + <p> + <h4>Job Completion CallBack Sample</h4><br/> + {<br/> + "JobId": "<Job Id>,<br/> + "ReviewId": "<Review Id, if the Job resulted in a Review to be created>",<br/> + "WorkFlowId": "default",<br/> + "Status": "<This will be one of Complete, InProgress, Error>",<br/> + "ContentType": "Image",<br/> + "ContentId": "<This is the ContentId that was specified on input>",<br/> + "CallBackType": "Job",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p> + <p> + <h4>Review Completion CallBack Sample</h4><br/> + { + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx", + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType Image, Text or Video. Possible values include: 'Image', 'Text', 'Video' + * @param contentId Id/Name to identify the content submitted. + * @param workflowName Workflow Name that you want to invoke. + * @param jobContentType The content type. Possible values include: 'application/json', 'image/jpeg' + * @param contentValue Content to evaluate for a job. + * @param callBackEndpoint Callback endpoint for posting the create job result. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the JobId object + */ + public Observable> createJobWithServiceResponseAsync(String teamName, String contentType, String contentId, String workflowName, String jobContentType, String contentValue, String callBackEndpoint) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + if (teamName == null) { + throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); + } + if (contentType == null) { + throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); + } + if (contentId == null) { + throw new IllegalArgumentException("Parameter contentId is required and cannot be null."); + } + if (workflowName == null) { + throw new IllegalArgumentException("Parameter workflowName is required and cannot be null."); + } + if (jobContentType == null) { + throw new IllegalArgumentException("Parameter jobContentType is required and cannot be null."); + } + if (contentValue == null) { + throw new IllegalArgumentException("Parameter contentValue is required and cannot be null."); + } + Content content = new Content(); + content.withContentValue(contentValue); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createJob(teamName, contentType, contentId, workflowName, callBackEndpoint, jobContentType, this.client.acceptLanguage(), content, parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = createJobDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse createJobDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(APIErrorException.class) + .build(response); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> }<br/> }<br/> </p>. * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void addVideoFrame(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter) { - addVideoFrameWithServiceResponseAsync(teamName, reviewId, addVideoFrameOptionalParameter).toBlocking().single().body(); + public void addVideoFrame(String teamName, String reviewId) { + addVideoFrameWithServiceResponseAsync(teamName, reviewId).toBlocking().single().body(); } /** @@ -1095,13 +1246,12 @@ public void addVideoFrame(String teamName, String reviewId, AddVideoFrameOptiona * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addVideoFrameAsync(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addVideoFrameWithServiceResponseAsync(teamName, reviewId, addVideoFrameOptionalParameter), serviceCallback); + public ServiceFuture addVideoFrameAsync(String teamName, String reviewId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameWithServiceResponseAsync(teamName, reviewId), serviceCallback); } /** @@ -1130,12 +1280,11 @@ public ServiceFuture addVideoFrameAsync(String teamName, String reviewId, * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable addVideoFrameAsync(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter) { - return addVideoFrameWithServiceResponseAsync(teamName, reviewId, addVideoFrameOptionalParameter).map(new Func1, Void>() { + public Observable addVideoFrameAsync(String teamName, String reviewId) { + return addVideoFrameWithServiceResponseAsync(teamName, reviewId).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -1169,13 +1318,12 @@ public Void call(ServiceResponse response) { * * @param teamName Your team name. * @param reviewId Id of the review. - * @param addVideoFrameOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> addVideoFrameWithServiceResponseAsync(String teamName, String reviewId, AddVideoFrameOptionalParameter addVideoFrameOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addVideoFrameWithServiceResponseAsync(String teamName, String reviewId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1183,9 +1331,129 @@ public Observable> addVideoFrameWithServiceResponseAsync(S if (reviewId == null) { throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); } - final Integer timescale = addVideoFrameOptionalParameter != null ? addVideoFrameOptionalParameter.timescale() : null; + final Integer timescale = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addVideoFrame(teamName, reviewId, timescale, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addVideoFrameDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void addVideoFrame(String teamName, String reviewId, Integer timescale) { + addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale).toBlocking().single().body(); + } - return addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addVideoFrameAsync(String teamName, String reviewId, Integer timescale, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale), serviceCallback); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param timescale Timescale of the video you are adding frames to. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addVideoFrameAsync(String teamName, String reviewId, Integer timescale) { + return addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1219,8 +1487,8 @@ public Observable> addVideoFrameWithServiceResponseAsync(S * @return the {@link ServiceResponse} object if successful. */ public Observable> addVideoFrameWithServiceResponseAsync(String teamName, String reviewId, Integer timescale) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1228,7 +1496,7 @@ public Observable> addVideoFrameWithServiceResponseAsync(S if (reviewId == null) { throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addVideoFrame(teamName, reviewId, timescale, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1250,63 +1518,113 @@ private ServiceResponse addVideoFrameDelegate(Response respo .build(response); } - @Override - public ReviewsAddVideoFrameParameters addVideoFrame() { - return new ReviewsAddVideoFrameParameters(this); + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Frames object if successful. + */ + public Frames getVideoFrames(String teamName, String reviewId) { + return getVideoFramesWithServiceResponseAsync(teamName, reviewId).toBlocking().single().body(); } /** - * Internal class implementing ReviewsAddVideoFrameDefinition. + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object */ - class ReviewsAddVideoFrameParameters implements ReviewsAddVideoFrameDefinition { - private ReviewsImpl parent; - private String teamName; - private String reviewId; - private Integer timescale; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsAddVideoFrameParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsAddVideoFrameParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsAddVideoFrameParameters withReviewId(String reviewId) { - this.reviewId = reviewId; - return this; - } - - @Override - public ReviewsAddVideoFrameParameters withTimescale(Integer timescale) { - this.timescale = timescale; - return this; - } - - @Override - public void execute() { - addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale).toBlocking().single().body(); + public ServiceFuture getVideoFramesAsync(String teamName, String reviewId, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVideoFramesWithServiceResponseAsync(teamName, reviewId), serviceCallback); } - @Override - public Observable executeAsync() { - return addVideoFrameWithServiceResponseAsync(teamName, reviewId, timescale).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Frames object + */ + public Observable getVideoFramesAsync(String teamName, String reviewId) { + return getVideoFramesWithServiceResponseAsync(teamName, reviewId).map(new Func1, Frames>() { + @Override + public Frames call(ServiceResponse response) { + return response.body(); + } + }); } - /** * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. <h3>CallBack Schemas </h3> @@ -1333,14 +1651,35 @@ public Void call(ServiceResponse response) { * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws APIErrorException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the Frames object if successful. + * @return the observable to the Frames object */ - public Frames getVideoFrames(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter) { - return getVideoFramesWithServiceResponseAsync(teamName, reviewId, getVideoFramesOptionalParameter).toBlocking().single().body(); + public Observable> getVideoFramesWithServiceResponseAsync(String teamName, String reviewId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + if (teamName == null) { + throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); + } + if (reviewId == null) { + throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); + } + final Integer startSeed = null; + final Integer noOfRecords = null; + final String filter = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getVideoFrames(teamName, reviewId, startSeed, noOfRecords, filter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = getVideoFramesDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); } /** @@ -1369,13 +1708,16 @@ public Frames getVideoFrames(String teamName, String reviewId, GetVideoFramesOpt * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Frames object if successful. */ - public ServiceFuture getVideoFramesAsync(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getVideoFramesWithServiceResponseAsync(teamName, reviewId, getVideoFramesOptionalParameter), serviceCallback); + public Frames getVideoFrames(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter) { + return getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter).toBlocking().single().body(); } /** @@ -1404,17 +1746,15 @@ public ServiceFuture getVideoFramesAsync(String teamName, String reviewI * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the Frames object + * @return the {@link ServiceFuture} object */ - public Observable getVideoFramesAsync(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter) { - return getVideoFramesWithServiceResponseAsync(teamName, reviewId, getVideoFramesOptionalParameter).map(new Func1, Frames>() { - @Override - public Frames call(ServiceResponse response) { - return response.body(); - } - }); + public ServiceFuture getVideoFramesAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter), serviceCallback); } /** @@ -1443,25 +1783,19 @@ public Frames call(ServiceResponse response) { * * @param teamName Your team name. * @param reviewId Id of the review. - * @param getVideoFramesOptionalParameter the object representing the optional parameters to be set before calling this API + * @param startSeed Time stamp of the frame from where you want to start fetching the frames. + * @param noOfRecords Number of frames to fetch. + * @param filter Get frames filtered by tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the Frames object */ - public Observable> getVideoFramesWithServiceResponseAsync(String teamName, String reviewId, GetVideoFramesOptionalParameter getVideoFramesOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); - } - if (teamName == null) { - throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); - } - if (reviewId == null) { - throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); - } - final Integer startSeed = getVideoFramesOptionalParameter != null ? getVideoFramesOptionalParameter.startSeed() : null; - final Integer noOfRecords = getVideoFramesOptionalParameter != null ? getVideoFramesOptionalParameter.noOfRecords() : null; - final String filter = getVideoFramesOptionalParameter != null ? getVideoFramesOptionalParameter.filter() : null; - - return getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter); + public Observable getVideoFramesAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter) { + return getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter).map(new Func1, Frames>() { + @Override + public Frames call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -1497,8 +1831,8 @@ public Observable> getVideoFramesWithServiceResponseAsyn * @return the observable to the Frames object */ public Observable> getVideoFramesWithServiceResponseAsync(String teamName, String reviewId, Integer startSeed, Integer noOfRecords, String filter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1506,7 +1840,7 @@ public Observable> getVideoFramesWithServiceResponseAsyn if (reviewId == null) { throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.getVideoFrames(teamName, reviewId, startSeed, noOfRecords, filter, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1528,76 +1862,6 @@ private ServiceResponse getVideoFramesDelegate(Response re .build(response); } - @Override - public ReviewsGetVideoFramesParameters getVideoFrames() { - return new ReviewsGetVideoFramesParameters(this); - } - - /** - * Internal class implementing ReviewsGetVideoFramesDefinition. - */ - class ReviewsGetVideoFramesParameters implements ReviewsGetVideoFramesDefinition { - private ReviewsImpl parent; - private String teamName; - private String reviewId; - private Integer startSeed; - private Integer noOfRecords; - private String filter; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsGetVideoFramesParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsGetVideoFramesParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsGetVideoFramesParameters withReviewId(String reviewId) { - this.reviewId = reviewId; - return this; - } - - @Override - public ReviewsGetVideoFramesParameters withStartSeed(Integer startSeed) { - this.startSeed = startSeed; - return this; - } - - @Override - public ReviewsGetVideoFramesParameters withNoOfRecords(Integer noOfRecords) { - this.noOfRecords = noOfRecords; - return this; - } - - @Override - public ReviewsGetVideoFramesParameters withFilter(String filter) { - this.filter = filter; - return this; - } - - @Override - public Frames execute() { - return getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return getVideoFramesWithServiceResponseAsync(teamName, reviewId, startSeed, noOfRecords, filter).map(new Func1, Frames>() { - @Override - public Frames call(ServiceResponse response) { - return response.body(); - } - }); - } - } - /** * Publish video review to make it available for review. * @@ -1650,8 +1914,8 @@ public Void call(ServiceResponse response) { * @return the {@link ServiceResponse} object if successful. */ public Observable> publishVideoReviewWithServiceResponseAsync(String teamName, String reviewId) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1659,7 +1923,7 @@ public Observable> publishVideoReviewWithServiceResponseAs if (reviewId == null) { throw new IllegalArgumentException("Parameter reviewId is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.publishVideoReview(teamName, reviewId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1741,8 +2005,8 @@ public Void call(ServiceResponse response) { * @return the {@link ServiceResponse} object if successful. */ public Observable> addVideoTranscriptModerationResultWithServiceResponseAsync(String teamName, String reviewId, String contentType, List transcriptModerationBody) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1757,7 +2021,7 @@ public Observable> addVideoTranscriptModerationResultWithS throw new IllegalArgumentException("Parameter transcriptModerationBody is required and cannot be null."); } Validator.validate(transcriptModerationBody); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addVideoTranscriptModerationResult(teamName, reviewId, contentType, transcriptModerationBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1835,8 +2099,8 @@ public Void call(ServiceResponse response) { * @return the {@link ServiceResponse} object if successful. */ public Observable> addVideoTranscriptWithServiceResponseAsync(String teamName, String reviewId, byte[] vTTfile) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -1848,7 +2112,7 @@ public Observable> addVideoTranscriptWithServiceResponseAs throw new IllegalArgumentException("Parameter vTTfile is required and cannot be null."); } final String contentType = "text/plain"; - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody vTTfileConverted = RequestBody.create(MediaType.parse("text/plain"), vTTfile); return service.addVideoTranscript(teamName, reviewId, contentType, vTTfileConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1864,14 +2128,183 @@ public Observable> call(Response response) { }); } - private ServiceResponse addVideoTranscriptDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(204, new TypeToken() { }.getType()) - .registerError(APIErrorException.class) - .build(response); - } - - + private ServiceResponse addVideoTranscriptDelegate(Response response) throws APIErrorException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) + .register(204, new TypeToken() { }.getType()) + .registerError(APIErrorException.class) + .build(response); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the List<String> object if successful. + */ + public List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody) { + return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody).toBlocking().single().body(); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody), serviceCallback); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody) { + return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody).map(new Func1>, List>() { + @Override + public List call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. + <h3>CallBack Schemas </h3> + <h4>Review Completion CallBack Sample</h4> + <p> + {<br/> + "ReviewId": "<Review Id>",<br/> + "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> + "ModifiedBy": "<Name of the Reviewer>",<br/> + "CallBackType": "Review",<br/> + "ContentId": "<The ContentId that was specified input>",<br/> + "Metadata": {<br/> + "adultscore": "0.xxx",<br/> + "a": "False",<br/> + "racyscore": "0.xxx",<br/> + "r": "True"<br/> + },<br/> + "ReviewerResultTags": {<br/> + "a": "False",<br/> + "r": "True"<br/> + }<br/> + }<br/> + </p>. + * + * @param teamName Your team name. + * @param contentType The content type. + * @param createVideoReviewsBody Body for create reviews API + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the List<String> object + */ + public Observable>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List createVideoReviewsBody) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + if (teamName == null) { + throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); + } + if (contentType == null) { + throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); + } + if (createVideoReviewsBody == null) { + throw new IllegalArgumentException("Parameter createVideoReviewsBody is required and cannot be null."); + } + Validator.validate(createVideoReviewsBody); + final String subTeam = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createVideoReviews(teamName, contentType, subTeam, createVideoReviewsBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> clientResponse = createVideoReviewsDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + /** * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. <h3>CallBack Schemas </h3> @@ -1899,14 +2332,14 @@ private ServiceResponse addVideoTranscriptDelegate(Response * @param teamName Your team name. * @param contentType The content type. * @param createVideoReviewsBody Body for create reviews API - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the List<String> object if successful. */ - public List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { - return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, createVideoReviewsOptionalParameter).toBlocking().single().body(); + public List createVideoReviews(String teamName, String contentType, List createVideoReviewsBody, String subTeam) { + return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam).toBlocking().single().body(); } /** @@ -1936,13 +2369,13 @@ public List createVideoReviews(String teamName, String contentType, List * @param teamName Your team name. * @param contentType The content type. * @param createVideoReviewsBody Body for create reviews API - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter, final ServiceCallback> serviceCallback) { - return ServiceFuture.fromResponse(createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, createVideoReviewsOptionalParameter), serviceCallback); + public ServiceFuture> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam, final ServiceCallback> serviceCallback) { + return ServiceFuture.fromResponse(createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam), serviceCallback); } /** @@ -1972,12 +2405,12 @@ public ServiceFuture> createVideoReviewsAsync(String teamName, Stri * @param teamName Your team name. * @param contentType The content type. * @param createVideoReviewsBody Body for create reviews API - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API + * @param subTeam SubTeam of your team, you want to assign the created review to. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the List<String> object */ - public Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { - return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, createVideoReviewsOptionalParameter).map(new Func1>, List>() { + public Observable> createVideoReviewsAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam) { + return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam).map(new Func1>, List>() { @Override public List call(ServiceResponse> response) { return response.body(); @@ -1985,56 +2418,6 @@ public List call(ServiceResponse> response) { }); } - /** - * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. - <h3>CallBack Schemas </h3> - <h4>Review Completion CallBack Sample</h4> - <p> - {<br/> - "ReviewId": "<Review Id>",<br/> - "ModifiedOn": "2016-10-11T22:36:32.9934851Z",<br/> - "ModifiedBy": "<Name of the Reviewer>",<br/> - "CallBackType": "Review",<br/> - "ContentId": "<The ContentId that was specified input>",<br/> - "Metadata": {<br/> - "adultscore": "0.xxx",<br/> - "a": "False",<br/> - "racyscore": "0.xxx",<br/> - "r": "True"<br/> - },<br/> - "ReviewerResultTags": {<br/> - "a": "False",<br/> - "r": "True"<br/> - }<br/> - }<br/> - </p>. - * - * @param teamName Your team name. - * @param contentType The content type. - * @param createVideoReviewsBody Body for create reviews API - * @param createVideoReviewsOptionalParameter the object representing the optional parameters to be set before calling this API - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the List<String> object - */ - public Observable>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); - } - if (teamName == null) { - throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); - } - if (contentType == null) { - throw new IllegalArgumentException("Parameter contentType is required and cannot be null."); - } - if (createVideoReviewsBody == null) { - throw new IllegalArgumentException("Parameter createVideoReviewsBody is required and cannot be null."); - } - Validator.validate(createVideoReviewsBody); - final String subTeam = createVideoReviewsOptionalParameter != null ? createVideoReviewsOptionalParameter.subTeam() : null; - - return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam); - } - /** * The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. <h3>CallBack Schemas </h3> @@ -2067,8 +2450,8 @@ public Observable>> createVideoReviewsWithServiceRe * @return the observable to the List<String> object */ public Observable>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List createVideoReviewsBody, String subTeam) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -2080,7 +2463,7 @@ public Observable>> createVideoReviewsWithServiceRe throw new IllegalArgumentException("Parameter createVideoReviewsBody is required and cannot be null."); } Validator.validate(createVideoReviewsBody); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.createVideoReviews(teamName, contentType, subTeam, createVideoReviewsBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -2102,70 +2485,6 @@ private ServiceResponse> createVideoReviewsDelegate(Response createVideoReviewsBody; - private String subTeam; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsCreateVideoReviewsParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsCreateVideoReviewsParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsCreateVideoReviewsParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ReviewsCreateVideoReviewsParameters withCreateVideoReviewsBody(List createVideoReviewsBody) { - this.createVideoReviewsBody = createVideoReviewsBody; - return this; - } - - @Override - public ReviewsCreateVideoReviewsParameters withSubTeam(String subTeam) { - this.subTeam = subTeam; - return this; - } - - @Override - public List execute() { - return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam).toBlocking().single().body(); - } - - @Override - public Observable> executeAsync() { - return createVideoReviewsWithServiceResponseAsync(teamName, contentType, createVideoReviewsBody, subTeam).map(new Func1>, List>() { - @Override - public List call(ServiceResponse> response) { - return response.body(); - } - }); - } - } - - /** * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * @@ -2173,13 +2492,12 @@ public List call(ServiceResponse> response) { * @param reviewId Id of the review. * @param contentType The content type. * @param videoFrameBody Body for add video frames API - * @param addVideoFrameUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { - addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, addVideoFrameUrlOptionalParameter).toBlocking().single().body(); + public void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody) { + addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody).toBlocking().single().body(); } /** @@ -2189,13 +2507,12 @@ public void addVideoFrameUrl(String teamName, String reviewId, String contentTyp * @param reviewId Id of the review. * @param contentType The content type. * @param videoFrameBody Body for add video frames API - * @param addVideoFrameUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, addVideoFrameUrlOptionalParameter), serviceCallback); + public ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody), serviceCallback); } /** @@ -2205,12 +2522,11 @@ public ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewI * @param reviewId Id of the review. * @param contentType The content type. * @param videoFrameBody Body for add video frames API - * @param addVideoFrameUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { - return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, addVideoFrameUrlOptionalParameter).map(new Func1, Void>() { + public Observable addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody) { + return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -2225,13 +2541,12 @@ public Void call(ServiceResponse response) { * @param reviewId Id of the review. * @param contentType The content type. * @param videoFrameBody Body for add video frames API - * @param addVideoFrameUrlOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> addVideoFrameUrlWithServiceResponseAsync(String teamName, String reviewId, String contentType, List videoFrameBody, AddVideoFrameUrlOptionalParameter addVideoFrameUrlOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addVideoFrameUrlWithServiceResponseAsync(String teamName, String reviewId, String contentType, List videoFrameBody) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -2246,9 +2561,72 @@ public Observable> addVideoFrameUrlWithServiceResponseAsyn throw new IllegalArgumentException("Parameter videoFrameBody is required and cannot be null."); } Validator.validate(videoFrameBody); - final Integer timescale = addVideoFrameUrlOptionalParameter != null ? addVideoFrameUrlOptionalParameter.timescale() : null; + final Integer timescale = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addVideoFrameUrl(teamName, reviewId, contentType, timescale, videoFrameBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addVideoFrameUrlDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void addVideoFrameUrl(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale) { + addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale).toBlocking().single().body(); + } + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale), serviceCallback); + } - return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale); + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param videoFrameBody Body for add video frames API + * @param timescale Timescale of the video. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addVideoFrameUrlAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale) { + return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -2263,8 +2641,8 @@ public Observable> addVideoFrameUrlWithServiceResponseAsyn * @return the {@link ServiceResponse} object if successful. */ public Observable> addVideoFrameUrlWithServiceResponseAsync(String teamName, String reviewId, String contentType, List videoFrameBody, Integer timescale) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -2279,7 +2657,7 @@ public Observable> addVideoFrameUrlWithServiceResponseAsyn throw new IllegalArgumentException("Parameter videoFrameBody is required and cannot be null."); } Validator.validate(videoFrameBody); - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); return service.addVideoFrameUrl(teamName, reviewId, contentType, timescale, videoFrameBody, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2301,77 +2679,6 @@ private ServiceResponse addVideoFrameUrlDelegate(Response re .build(response); } - @Override - public ReviewsAddVideoFrameUrlParameters addVideoFrameUrl() { - return new ReviewsAddVideoFrameUrlParameters(this); - } - - /** - * Internal class implementing ReviewsAddVideoFrameUrlDefinition. - */ - class ReviewsAddVideoFrameUrlParameters implements ReviewsAddVideoFrameUrlDefinition { - private ReviewsImpl parent; - private String teamName; - private String reviewId; - private String contentType; - private List videoFrameBody; - private Integer timescale; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsAddVideoFrameUrlParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsAddVideoFrameUrlParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsAddVideoFrameUrlParameters withReviewId(String reviewId) { - this.reviewId = reviewId; - return this; - } - - @Override - public ReviewsAddVideoFrameUrlParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ReviewsAddVideoFrameUrlParameters withVideoFrameBody(List videoFrameBody) { - this.videoFrameBody = videoFrameBody; - return this; - } - - @Override - public ReviewsAddVideoFrameUrlParameters withTimescale(Integer timescale) { - this.timescale = timescale; - return this; - } - - @Override - public void execute() { - addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return addVideoFrameUrlWithServiceResponseAsync(teamName, reviewId, contentType, videoFrameBody, timescale).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - } - - /** * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. * @@ -2380,13 +2687,12 @@ public Void call(ServiceResponse response) { * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent */ - public void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter) { - addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, addVideoFrameStreamOptionalParameter).toBlocking().single().body(); + public void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata) { + addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata).toBlocking().single().body(); } /** @@ -2397,13 +2703,12 @@ public void addVideoFrameStream(String teamName, String reviewId, String content * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, addVideoFrameStreamOptionalParameter), serviceCallback); + public ServiceFuture addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata), serviceCallback); } /** @@ -2414,12 +2719,11 @@ public ServiceFuture addVideoFrameStreamAsync(String teamName, String revi * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter) { - return addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, addVideoFrameStreamOptionalParameter).map(new Func1, Void>() { + public Observable addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata) { + return addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata).map(new Func1, Void>() { @Override public Void call(ServiceResponse response) { return response.body(); @@ -2435,13 +2739,12 @@ public Void call(ServiceResponse response) { * @param contentType The content type. * @param frameImageZip Zip file containing frame images. * @param frameMetadata Metadata of the frame. - * @param addVideoFrameStreamOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceResponse} object if successful. */ - public Observable> addVideoFrameStreamWithServiceResponseAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, AddVideoFrameStreamOptionalParameter addVideoFrameStreamOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> addVideoFrameStreamWithServiceResponseAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -2458,9 +2761,76 @@ public Observable> addVideoFrameStreamWithServiceResponseA if (frameMetadata == null) { throw new IllegalArgumentException("Parameter frameMetadata is required and cannot be null."); } - final Integer timescale = addVideoFrameStreamOptionalParameter != null ? addVideoFrameStreamOptionalParameter.timescale() : null; + final Integer timescale = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody frameImageZipConverted = RequestBody.create(MediaType.parse("multipart/form-data"), frameImageZip); + return service.addVideoFrameStream(teamName, reviewId, contentType, timescale, frameImageZipConverted, frameMetadata, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = addVideoFrameStreamDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + */ + public void addVideoFrameStream(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale) { + addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale).toBlocking().single().body(); + } + + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale), serviceCallback); + } - return addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale); + /** + * Use this method to add frames for a video review.Timescale: This parameter is a factor which is used to convert the timestamp on a frame into milliseconds. Timescale is provided in the output of the Content Moderator video media processor on the Azure Media Services platform.Timescale in the Video Moderation output is Ticks/Second. + * + * @param teamName Your team name. + * @param reviewId Id of the review. + * @param contentType The content type. + * @param frameImageZip Zip file containing frame images. + * @param frameMetadata Metadata of the frame. + * @param timescale Timescale of the video . + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceResponse} object if successful. + */ + public Observable addVideoFrameStreamAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale) { + return addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale).map(new Func1, Void>() { + @Override + public Void call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -2476,8 +2846,8 @@ public Observable> addVideoFrameStreamWithServiceResponseA * @return the {@link ServiceResponse} object if successful. */ public Observable> addVideoFrameStreamWithServiceResponseAsync(String teamName, String reviewId, String contentType, byte[] frameImageZip, String frameMetadata, Integer timescale) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (teamName == null) { throw new IllegalArgumentException("Parameter teamName is required and cannot be null."); @@ -2494,7 +2864,7 @@ public Observable> addVideoFrameStreamWithServiceResponseA if (frameMetadata == null) { throw new IllegalArgumentException("Parameter frameMetadata is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody frameImageZipConverted = RequestBody.create(MediaType.parse("multipart/form-data"), frameImageZip); return service.addVideoFrameStream(teamName, reviewId, contentType, timescale, frameImageZipConverted, frameMetadata, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -2517,81 +2887,4 @@ private ServiceResponse addVideoFrameStreamDelegate(Response .build(response); } - @Override - public ReviewsAddVideoFrameStreamParameters addVideoFrameStream() { - return new ReviewsAddVideoFrameStreamParameters(this); - } - - /** - * Internal class implementing ReviewsAddVideoFrameStreamDefinition. - */ - class ReviewsAddVideoFrameStreamParameters implements ReviewsAddVideoFrameStreamDefinition { - private ReviewsImpl parent; - private String teamName; - private String reviewId; - private String contentType; - private byte[] frameImageZip; - private String frameMetadata; - private Integer timescale; - - /** - * Constructor. - * @param parent the parent object. - */ - ReviewsAddVideoFrameStreamParameters(ReviewsImpl parent) { - this.parent = parent; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withTeamName(String teamName) { - this.teamName = teamName; - return this; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withReviewId(String reviewId) { - this.reviewId = reviewId; - return this; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withContentType(String contentType) { - this.contentType = contentType; - return this; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withFrameImageZip(byte[] frameImageZip) { - this.frameImageZip = frameImageZip; - return this; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withFrameMetadata(String frameMetadata) { - this.frameMetadata = frameMetadata; - return this; - } - - @Override - public ReviewsAddVideoFrameStreamParameters withTimescale(Integer timescale) { - this.timescale = timescale; - return this; - } - - @Override - public void execute() { - addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return addVideoFrameStreamWithServiceResponseAsync(teamName, reviewId, contentType, frameImageZip, frameMetadata, timescale).map(new Func1, Void>() { - @Override - public Void call(ServiceResponse response) { - return response.body(); - } - }); - } - } - } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/TextModerationsImpl.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/TextModerationsImpl.java index 02ae77112fa5..81504687a9eb 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/TextModerationsImpl.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/TextModerationsImpl.java @@ -8,7 +8,6 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; -import com.microsoft.azure.cognitiveservices.vision.contentmoderator.models.ScreenTextOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.vision.contentmoderator.TextModerations; import com.google.common.base.Joiner; @@ -19,6 +18,7 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import com.microsoft.rest.ServiceResponse; +import java.io.InputStream; import java.io.IOException; import okhttp3.MediaType; import okhttp3.RequestBody; @@ -68,21 +68,19 @@ interface TextModerationsService { } - /** * Detect profanity and match against custom and shared blacklists. * Detects profanity in more than 100 languages and match against custom and shared blacklists. * * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter the object representing the optional parameters to be set before calling this API * @throws IllegalArgumentException thrown if parameters fail the validation * @throws APIErrorException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the Screen object if successful. */ - public Screen screenText(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter) { - return screenTextWithServiceResponseAsync(textContentType, textContent, screenTextOptionalParameter).toBlocking().single().body(); + public Screen screenText(String textContentType, byte[] textContent) { + return screenTextWithServiceResponseAsync(textContentType, textContent).toBlocking().single().body(); } /** @@ -91,13 +89,12 @@ public Screen screenText(String textContentType, byte[] textContent, ScreenTextO * * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter the object representing the optional parameters to be set before calling this API * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture screenTextAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(screenTextWithServiceResponseAsync(textContentType, textContent, screenTextOptionalParameter), serviceCallback); + public ServiceFuture screenTextAsync(String textContentType, byte[] textContent, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(screenTextWithServiceResponseAsync(textContentType, textContent), serviceCallback); } /** @@ -106,12 +103,11 @@ public ServiceFuture screenTextAsync(String textContentType, byte[] text * * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter 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 Screen object */ - public Observable screenTextAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter) { - return screenTextWithServiceResponseAsync(textContentType, textContent, screenTextOptionalParameter).map(new Func1, Screen>() { + public Observable screenTextAsync(String textContentType, byte[] textContent) { + return screenTextWithServiceResponseAsync(textContentType, textContent).map(new Func1, Screen>() { @Override public Screen call(ServiceResponse response) { return response.body(); @@ -125,13 +121,12 @@ public Screen call(ServiceResponse response) { * * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' * @param textContent Content to screen. - * @param screenTextOptionalParameter 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 Screen object */ - public Observable> screenTextWithServiceResponseAsync(String textContentType, byte[] textContent, ScreenTextOptionalParameter screenTextOptionalParameter) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + public Observable> screenTextWithServiceResponseAsync(String textContentType, byte[] textContent) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (textContentType == null) { throw new IllegalArgumentException("Parameter textContentType is required and cannot be null."); @@ -139,13 +134,87 @@ public Observable> screenTextWithServiceResponseAsync(St if (textContent == null) { throw new IllegalArgumentException("Parameter textContent is required and cannot be null."); } - final String language = screenTextOptionalParameter != null ? screenTextOptionalParameter.language() : null; - final Boolean autocorrect = screenTextOptionalParameter != null ? screenTextOptionalParameter.autocorrect() : null; - final Boolean pII = screenTextOptionalParameter != null ? screenTextOptionalParameter.pII() : null; - final String listId = screenTextOptionalParameter != null ? screenTextOptionalParameter.listId() : null; - final Boolean classify = screenTextOptionalParameter != null ? screenTextOptionalParameter.classify() : null; + final String language = null; + final Boolean autocorrect = null; + final Boolean pII = null; + final String listId = null; + final Boolean classify = null; + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + RequestBody textContentConverted = RequestBody.create(MediaType.parse("text/plain"), textContent); + return service.screenText(language, autocorrect, pII, listId, classify, textContentType, textContentConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) + .flatMap(new Func1, Observable>>() { + @Override + public Observable> call(Response response) { + try { + ServiceResponse clientResponse = screenTextDelegate(response); + return Observable.just(clientResponse); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws APIErrorException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the Screen object if successful. + */ + public Screen screenText(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify) { + return screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify).toBlocking().single().body(); + } + + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture screenTextAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify), serviceCallback); + } - return screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify); + /** + * Detect profanity and match against custom and shared blacklists. + * Detects profanity in more than 100 languages and match against custom and shared blacklists. + * + * @param textContentType The content type. Possible values include: 'text/plain', 'text/html', 'text/xml', 'text/markdown' + * @param textContent Content to screen. + * @param language Language of the text. + * @param autocorrect Autocorrect text. + * @param pII Detect personal identifiable information. + * @param listId The list Id. + * @param classify Classify input. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the Screen object + */ + public Observable screenTextAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify) { + return screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify).map(new Func1, Screen>() { + @Override + public Screen call(ServiceResponse response) { + return response.body(); + } + }); } /** @@ -163,8 +232,8 @@ public Observable> screenTextWithServiceResponseAsync(St * @return the observable to the Screen object */ public Observable> screenTextWithServiceResponseAsync(String textContentType, byte[] textContent, String language, Boolean autocorrect, Boolean pII, String listId, Boolean classify) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (textContentType == null) { throw new IllegalArgumentException("Parameter textContentType is required and cannot be null."); @@ -172,7 +241,7 @@ public Observable> screenTextWithServiceResponseAsync(St if (textContent == null) { throw new IllegalArgumentException("Parameter textContent is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody textContentConverted = RequestBody.create(MediaType.parse("text/plain"), textContent); return service.screenText(language, autocorrect, pII, listId, classify, textContentType, textContentConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -195,90 +264,6 @@ private ServiceResponse screenTextDelegate(Response respon .build(response); } - @Override - public TextModerationsScreenTextParameters screenText() { - return new TextModerationsScreenTextParameters(this); - } - - /** - * Internal class implementing TextModerationsScreenTextDefinition. - */ - class TextModerationsScreenTextParameters implements TextModerationsScreenTextDefinition { - private TextModerationsImpl parent; - private String textContentType; - private byte[] textContent; - private String language; - private Boolean autocorrect; - private Boolean pII; - private String listId; - private Boolean classify; - - /** - * Constructor. - * @param parent the parent object. - */ - TextModerationsScreenTextParameters(TextModerationsImpl parent) { - this.parent = parent; - } - - @Override - public TextModerationsScreenTextParameters withTextContentType(String textContentType) { - this.textContentType = textContentType; - return this; - } - - @Override - public TextModerationsScreenTextParameters withTextContent(byte[] textContent) { - this.textContent = textContent; - return this; - } - - @Override - public TextModerationsScreenTextParameters withLanguage(String language) { - this.language = language; - return this; - } - - @Override - public TextModerationsScreenTextParameters withAutocorrect(Boolean autocorrect) { - this.autocorrect = autocorrect; - return this; - } - - @Override - public TextModerationsScreenTextParameters withPII(Boolean pII) { - this.pII = pII; - return this; - } - - @Override - public TextModerationsScreenTextParameters withListId(String listId) { - this.listId = listId; - return this; - } - - @Override - public TextModerationsScreenTextParameters withClassify(Boolean classify) { - this.classify = classify; - return this; - } - - @Override - public Screen execute() { - return screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify).toBlocking().single().body(); - } - - @Override - public Observable executeAsync() { - return screenTextWithServiceResponseAsync(textContentType, textContent, language, autocorrect, pII, listId, classify).map(new Func1, Screen>() { - @Override - public Screen call(ServiceResponse response) { - return response.body(); - } - }); - } - } - /** * This operation will detect the language of given input content. Returns the <a href="http://www-01.sil.org/iso639-3/codes.asp">ISO 639-3 code</a> for the predominant language comprising the submitted text. Over 110 languages supported. * @@ -332,8 +317,8 @@ public DetectedLanguage call(ServiceResponse response) { * @return the observable to the DetectedLanguage object */ public Observable> detectLanguageWithServiceResponseAsync(String textContentType, byte[] textContent) { - if (this.client.baseUrl() == null) { - throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); } if (textContentType == null) { throw new IllegalArgumentException("Parameter textContentType is required and cannot be null."); @@ -341,7 +326,7 @@ public Observable> detectLanguageWithServiceRe if (textContent == null) { throw new IllegalArgumentException("Parameter textContent is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); RequestBody textContentConverted = RequestBody.create(MediaType.parse("text/plain"), textContent); return service.detectLanguage(textContentType, textContentConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/package-info.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/package-info.java index 41079676c30d..d831d3d38286 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/package-info.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/package-info.java @@ -10,11 +10,5 @@ When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue. - This API is currently available in: - * West US - westus.api.cognitive.microsoft.com - * East US 2 - eastus2.api.cognitive.microsoft.com - * West Central US - westcentralus.api.cognitive.microsoft.com - * West Europe - westeurope.api.cognitive.microsoft.com - * Southeast Asia - southeastasia.api.cognitive.microsoft.com . */ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.implementation; diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Address.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Address.java index 53d100c2aab4..9b6fe74bb44b 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Address.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Address.java @@ -27,7 +27,7 @@ public class Address { private Integer index; /** - * Get the text value. + * Get detected Address. * * @return the text value */ @@ -36,7 +36,7 @@ public String text() { } /** - * Set the text value. + * Set detected Address. * * @param text the text value to set * @return the Address object itself. @@ -47,7 +47,7 @@ public Address withText(String text) { } /** - * Get the index value. + * Get index(Location) of the Address in the input text content. * * @return the index value */ @@ -56,7 +56,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the Address in the input text content. * * @param index the index value to set * @return the Address object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Body.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Body.java new file mode 100644 index 000000000000..359d45a7e4df --- /dev/null +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Body.java @@ -0,0 +1,96 @@ +/** + * 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.contentmoderator.models; + +import java.util.Map; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The Body model. + */ +public class Body { + /** + * Name of the list. + */ + @JsonProperty(value = "Name") + private String name; + + /** + * Description of the list. + */ + @JsonProperty(value = "Description") + private String description; + + /** + * Metadata of the list. + */ + @JsonProperty(value = "Metadata") + private Map metadata; + + /** + * Get name of the list. + * + * @return the name value + */ + public String name() { + return this.name; + } + + /** + * Set name of the list. + * + * @param name the name value to set + * @return the Body object itself. + */ + public Body withName(String name) { + this.name = name; + return this; + } + + /** + * Get description of the list. + * + * @return the description value + */ + public String description() { + return this.description; + } + + /** + * Set description of the list. + * + * @param description the description value to set + * @return the Body object itself. + */ + public Body withDescription(String description) { + this.description = description; + return this; + } + + /** + * Get metadata of the list. + * + * @return the metadata value + */ + public Map metadata() { + return this.metadata; + } + + /** + * Set metadata of the list. + * + * @param metadata the metadata value to set + * @return the Body object itself. + */ + public Body withMetadata(Map metadata) { + this.metadata = metadata; + return this; + } + +} diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyMetadata.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyMetadata.java index 94146b468413..78214eb92f81 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyMetadata.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyMetadata.java @@ -27,7 +27,7 @@ public class BodyMetadata { private String keyTwo; /** - * Get the keyOne value. + * Get optional key value pair to describe your list. * * @return the keyOne value */ @@ -36,7 +36,7 @@ public String keyOne() { } /** - * Set the keyOne value. + * Set optional key value pair to describe your list. * * @param keyOne the keyOne value to set * @return the BodyMetadata object itself. @@ -47,7 +47,7 @@ public BodyMetadata withKeyOne(String keyOne) { } /** - * Get the keyTwo value. + * Get optional key value pair to describe your list. * * @return the keyTwo value */ @@ -56,7 +56,7 @@ public String keyTwo() { } /** - * Set the keyTwo value. + * Set optional key value pair to describe your list. * * @param keyTwo the keyTwo value to set * @return the BodyMetadata object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyModel.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyModel.java index 4cda911aa41d..663cb620b35c 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyModel.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/BodyModel.java @@ -15,80 +15,54 @@ */ public class BodyModel { /** - * Name of the list. + * The dataRepresentation property. */ - @JsonProperty(value = "Name") - private String name; + @JsonProperty(value = "DataRepresentation") + private String dataRepresentation; /** - * Description of the list. + * The value property. */ - @JsonProperty(value = "Description") - private String description; + @JsonProperty(value = "Value") + private String value; /** - * Metadata of the list. - */ - @JsonProperty(value = "Metadata") - private BodyMetadata metadata; - - /** - * Get the name value. - * - * @return the name value - */ - public String name() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - * @return the BodyModel object itself. - */ - public BodyModel withName(String name) { - this.name = name; - return this; - } - - /** - * Get the description value. + * Get the dataRepresentation value. * - * @return the description value + * @return the dataRepresentation value */ - public String description() { - return this.description; + public String dataRepresentation() { + return this.dataRepresentation; } /** - * Set the description value. + * Set the dataRepresentation value. * - * @param description the description value to set + * @param dataRepresentation the dataRepresentation value to set * @return the BodyModel object itself. */ - public BodyModel withDescription(String description) { - this.description = description; + public BodyModel withDataRepresentation(String dataRepresentation) { + this.dataRepresentation = dataRepresentation; return this; } /** - * Get the metadata value. + * Get the value value. * - * @return the metadata value + * @return the value value */ - public BodyMetadata metadata() { - return this.metadata; + public String value() { + return this.value; } /** - * Set the metadata value. + * Set the value value. * - * @param metadata the metadata value to set + * @param value the value value to set * @return the BodyModel object itself. */ - public BodyModel withMetadata(BodyMetadata metadata) { - this.metadata = metadata; + public BodyModel withValue(String value) { + this.value = value; return this; } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Candidate.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Candidate.java index 34f90951a5bc..93870c11b4f3 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Candidate.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Candidate.java @@ -27,7 +27,7 @@ public class Candidate { private Double confidence; /** - * Get the text value. + * Get the text found. * * @return the text value */ @@ -36,7 +36,7 @@ public String text() { } /** - * Set the text value. + * Set the text found. * * @param text the text value to set * @return the Candidate object itself. @@ -47,7 +47,7 @@ public Candidate withText(String text) { } /** - * Get the confidence value. + * Get the confidence level. * * @return the confidence value */ @@ -56,7 +56,7 @@ public Double confidence() { } /** - * Set the confidence value. + * Set the confidence level. * * @param confidence the confidence value to set * @return the Candidate object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Classification.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Classification.java index c4f5c6fd8cd7..b33238a1220d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Classification.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Classification.java @@ -45,7 +45,7 @@ public class Classification { private Boolean reviewRecommended; /** - * Get the category1 value. + * Get the category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @return the category1 value */ @@ -54,7 +54,7 @@ public ClassificationCategory1 category1() { } /** - * Set the category1 value. + * Set the category1 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @param category1 the category1 value to set * @return the Classification object itself. @@ -65,7 +65,7 @@ public Classification withCategory1(ClassificationCategory1 category1) { } /** - * Get the category2 value. + * Get the category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @return the category2 value */ @@ -74,7 +74,7 @@ public ClassificationCategory2 category2() { } /** - * Set the category2 value. + * Set the category2 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @param category2 the category2 value to set * @return the Classification object itself. @@ -85,7 +85,7 @@ public Classification withCategory2(ClassificationCategory2 category2) { } /** - * Get the category3 value. + * Get the category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @return the category3 value */ @@ -94,7 +94,7 @@ public ClassificationCategory3 category3() { } /** - * Set the category3 value. + * Set the category3 score details of the text. <a href="https://aka.ms/textClassifyCategories">Click here</a> for more details on category classification. * * @param category3 the category3 value to set * @return the Classification object itself. @@ -105,7 +105,7 @@ public Classification withCategory3(ClassificationCategory3 category3) { } /** - * Get the reviewRecommended value. + * Get the review recommended flag. * * @return the reviewRecommended value */ @@ -114,7 +114,7 @@ public Boolean reviewRecommended() { } /** - * Set the reviewRecommended value. + * Set the review recommended flag. * * @param reviewRecommended the reviewRecommended value to set * @return the Classification object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory1.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory1.java index 698eec7949c0..ed1300b7f355 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory1.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory1.java @@ -23,7 +23,7 @@ public class ClassificationCategory1 { private Double score; /** - * Get the score value. + * Get the category1 score. * * @return the score value */ @@ -32,7 +32,7 @@ public Double score() { } /** - * Set the score value. + * Set the category1 score. * * @param score the score value to set * @return the ClassificationCategory1 object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory2.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory2.java index 2fdb3197344a..a31646ef0643 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory2.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory2.java @@ -23,7 +23,7 @@ public class ClassificationCategory2 { private Double score; /** - * Get the score value. + * Get the category2 score. * * @return the score value */ @@ -32,7 +32,7 @@ public Double score() { } /** - * Set the score value. + * Set the category2 score. * * @param score the score value to set * @return the ClassificationCategory2 object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory3.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory3.java index e866fa994053..f4c911404152 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory3.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ClassificationCategory3.java @@ -23,7 +23,7 @@ public class ClassificationCategory3 { private Double score; /** - * Get the score value. + * Get the category3 score. * * @return the score value */ @@ -32,7 +32,7 @@ public Double score() { } /** - * Set the score value. + * Set the category3 score. * * @param score the score value to set * @return the ClassificationCategory3 object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Content.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Content.java index acc0c1a6041b..f6f9e4faae22 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Content.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Content.java @@ -21,7 +21,7 @@ public class Content { private String contentValue; /** - * Get the contentValue value. + * Get content to evaluate for a job. * * @return the contentValue value */ @@ -30,7 +30,7 @@ public String contentValue() { } /** - * Set the contentValue value. + * Set content to evaluate for a job. * * @param contentValue the contentValue value to set * @return the Content object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItem.java index c3bcae7f52db..999bbdb27c0d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItem.java @@ -46,7 +46,7 @@ public class CreateReviewBodyItem { private List metadata; /** - * Get the type value. + * Get type of the content. Possible values include: 'Image', 'Text'. * * @return the type value */ @@ -55,7 +55,7 @@ public String type() { } /** - * Set the type value. + * Set type of the content. Possible values include: 'Image', 'Text'. * * @param type the type value to set * @return the CreateReviewBodyItem object itself. @@ -66,7 +66,7 @@ public CreateReviewBodyItem withType(String type) { } /** - * Get the content value. + * Get content to review. * * @return the content value */ @@ -75,7 +75,7 @@ public String content() { } /** - * Set the content value. + * Set content to review. * * @param content the content value to set * @return the CreateReviewBodyItem object itself. @@ -86,7 +86,7 @@ public CreateReviewBodyItem withContent(String content) { } /** - * Get the contentId value. + * Get content Identifier. * * @return the contentId value */ @@ -95,7 +95,7 @@ public String contentId() { } /** - * Set the contentId value. + * Set content Identifier. * * @param contentId the contentId value to set * @return the CreateReviewBodyItem object itself. @@ -106,7 +106,7 @@ public CreateReviewBodyItem withContentId(String contentId) { } /** - * Get the callbackEndpoint value. + * Get optional CallbackEndpoint. * * @return the callbackEndpoint value */ @@ -115,7 +115,7 @@ public String callbackEndpoint() { } /** - * Set the callbackEndpoint value. + * Set optional CallbackEndpoint. * * @param callbackEndpoint the callbackEndpoint value to set * @return the CreateReviewBodyItem object itself. @@ -126,7 +126,7 @@ public CreateReviewBodyItem withCallbackEndpoint(String callbackEndpoint) { } /** - * Get the metadata value. + * Get optional metadata details. * * @return the metadata value */ @@ -135,7 +135,7 @@ public List metadata() { } /** - * Set the metadata value. + * Set optional metadata details. * * @param metadata the metadata value to set * @return the CreateReviewBodyItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItemMetadataItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItemMetadataItem.java index 65b703c8c2d3..392603d01859 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItemMetadataItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateReviewBodyItemMetadataItem.java @@ -27,7 +27,7 @@ public class CreateReviewBodyItemMetadataItem { private String value; /** - * Get the key value. + * Get your key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set your key parameter. * * @param key the key value to set * @return the CreateReviewBodyItemMetadataItem object itself. @@ -47,7 +47,7 @@ public CreateReviewBodyItemMetadataItem withKey(String key) { } /** - * Get the value value. + * Get your value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set your value parameter. * * @param value the value value to set * @return the CreateReviewBodyItemMetadataItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItem.java index cd4347b3d4b8..367c18216dcd 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItem.java @@ -66,13 +66,16 @@ public class CreateVideoReviewsBodyItem { /** * Creates an instance of CreateVideoReviewsBodyItem class. + * @param content video content url to review. + * @param contentId content Identifier. + * @param status status of the video(Complete,Unpublished,Pending). Possible values include: 'Complete', 'Unpublished', 'Pending'. */ public CreateVideoReviewsBodyItem() { type = "Video"; } /** - * Get the videoFrames value. + * Get optional metadata details. * * @return the videoFrames value */ @@ -81,7 +84,7 @@ public List videoFrames() { } /** - * Set the videoFrames value. + * Set optional metadata details. * * @param videoFrames the videoFrames value to set * @return the CreateVideoReviewsBodyItem object itself. @@ -92,7 +95,7 @@ public CreateVideoReviewsBodyItem withVideoFrames(List metadata() { } /** - * Set the metadata value. + * Set optional metadata details. * * @param metadata the metadata value to set * @return the CreateVideoReviewsBodyItem object itself. @@ -112,7 +115,7 @@ public CreateVideoReviewsBodyItem withMetadata(List metadata; /** - * Get the id value. + * Get id of the frame. * * @return the id value */ @@ -55,7 +55,7 @@ public String id() { } /** - * Set the id value. + * Set id of the frame. * * @param id the id value to set * @return the CreateVideoReviewsBodyItemVideoFramesItem object itself. @@ -66,7 +66,7 @@ public CreateVideoReviewsBodyItemVideoFramesItem withId(String id) { } /** - * Get the timestamp value. + * Get timestamp of the frame. * * @return the timestamp value */ @@ -75,7 +75,7 @@ public int timestamp() { } /** - * Set the timestamp value. + * Set timestamp of the frame. * * @param timestamp the timestamp value to set * @return the CreateVideoReviewsBodyItemVideoFramesItem object itself. @@ -86,7 +86,7 @@ public CreateVideoReviewsBodyItemVideoFramesItem withTimestamp(int timestamp) { } /** - * Get the frameImage value. + * Get frame image Url. * * @return the frameImage value */ @@ -95,7 +95,7 @@ public String frameImage() { } /** - * Set the frameImage value. + * Set frame image Url. * * @param frameImage the frameImage value to set * @return the CreateVideoReviewsBodyItemVideoFramesItem object itself. @@ -126,7 +126,7 @@ public CreateVideoReviewsBodyItemVideoFramesItem withReviewerResultTags(List metadata() { } /** - * Set the metadata value. + * Set optional metadata details. * * @param metadata the metadata value to set * @return the CreateVideoReviewsBodyItemVideoFramesItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.java index a0b2e354202c..facb5dbc870b 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemMetadataItem.java @@ -27,7 +27,7 @@ public class CreateVideoReviewsBodyItemVideoFramesItemMetadataItem { private String value; /** - * Get the key value. + * Get your key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set your key parameter. * * @param key the key value to set * @return the CreateVideoReviewsBodyItemVideoFramesItemMetadataItem object itself. @@ -47,7 +47,7 @@ public CreateVideoReviewsBodyItemVideoFramesItemMetadataItem withKey(String key) } /** - * Get the value value. + * Get your value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set your value parameter. * * @param value the value value to set * @return the CreateVideoReviewsBodyItemVideoFramesItemMetadataItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.java index 5c2bb237db56..288e8ba2839b 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem.java @@ -27,7 +27,7 @@ public class CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem { private String value; /** - * Get the key value. + * Get your key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set your key parameter. * * @param key the key value to set * @return the CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem object itself. @@ -47,7 +47,7 @@ public CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem withKey(S } /** - * Get the value value. + * Get your value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set your value parameter. * * @param value the value value to set * @return the CreateVideoReviewsBodyItemVideoFramesItemReviewerResultTagsItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedLanguage.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedLanguage.java index 3460afd8dfa8..6e6c46eb7f72 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedLanguage.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedLanguage.java @@ -33,7 +33,7 @@ public class DetectedLanguage { private String trackingId; /** - * Get the detectedLanguage value. + * Get the detected language. * * @return the detectedLanguage value */ @@ -42,7 +42,7 @@ public String detectedLanguage() { } /** - * Set the detectedLanguage value. + * Set the detected language. * * @param detectedLanguage the detectedLanguage value to set * @return the DetectedLanguage object itself. @@ -53,7 +53,7 @@ public DetectedLanguage withDetectedLanguage(String detectedLanguage) { } /** - * Get the status value. + * Get the detect language status. * * @return the status value */ @@ -62,7 +62,7 @@ public Status status() { } /** - * Set the status value. + * Set the detect language status. * * @param status the status value to set * @return the DetectedLanguage object itself. @@ -73,7 +73,7 @@ public DetectedLanguage withStatus(Status status) { } /** - * Get the trackingId value. + * Get the tracking id. * * @return the trackingId value */ @@ -82,7 +82,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set the tracking id. * * @param trackingId the trackingId value to set * @return the DetectedLanguage object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedTerms.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedTerms.java index c567dd81a108..b0bf64a34129 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedTerms.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/DetectedTerms.java @@ -41,7 +41,7 @@ public class DetectedTerms { private String term; /** - * Get the index value. + * Get index(Location) of the detected profanity term in the input text content. * * @return the index value */ @@ -50,7 +50,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the detected profanity term in the input text content. * * @param index the index value to set * @return the DetectedTerms object itself. @@ -61,7 +61,7 @@ public DetectedTerms withIndex(Integer index) { } /** - * Get the originalIndex value. + * Get original Index(Location) of the detected profanity term in the input text content. * * @return the originalIndex value */ @@ -70,7 +70,7 @@ public Integer originalIndex() { } /** - * Set the originalIndex value. + * Set original Index(Location) of the detected profanity term in the input text content. * * @param originalIndex the originalIndex value to set * @return the DetectedTerms object itself. @@ -81,7 +81,7 @@ public DetectedTerms withOriginalIndex(Integer originalIndex) { } /** - * Get the listId value. + * Get matched Terms list Id. * * @return the listId value */ @@ -90,7 +90,7 @@ public Integer listId() { } /** - * Set the listId value. + * Set matched Terms list Id. * * @param listId the listId value to set * @return the DetectedTerms object itself. @@ -101,7 +101,7 @@ public DetectedTerms withListId(Integer listId) { } /** - * Get the term value. + * Get detected profanity term. * * @return the term value */ @@ -110,7 +110,7 @@ public String term() { } /** - * Set the term value. + * Set detected profanity term. * * @param term the term value to set * @return the DetectedTerms object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Email.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Email.java index f22d032ddbd3..615a7e4bd023 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Email.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Email.java @@ -39,7 +39,7 @@ public class Email { private Integer index; /** - * Get the detected value. + * Get detected Email Address from the input text content. * * @return the detected value */ @@ -48,7 +48,7 @@ public String detected() { } /** - * Set the detected value. + * Set detected Email Address from the input text content. * * @param detected the detected value to set * @return the Email object itself. @@ -59,7 +59,7 @@ public Email withDetected(String detected) { } /** - * Get the subType value. + * Get subtype of the detected Email Address. * * @return the subType value */ @@ -68,7 +68,7 @@ public String subType() { } /** - * Set the subType value. + * Set subtype of the detected Email Address. * * @param subType the subType value to set * @return the Email object itself. @@ -79,7 +79,7 @@ public Email withSubType(String subType) { } /** - * Get the text value. + * Get email Address in the input text content. * * @return the text value */ @@ -88,7 +88,7 @@ public String text() { } /** - * Set the text value. + * Set email Address in the input text content. * * @param text the text value to set * @return the Email object itself. @@ -99,7 +99,7 @@ public Email withText(String text) { } /** - * Get the index value. + * Get index(Location) of the Email address in the input text content. * * @return the index value */ @@ -108,7 +108,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the Email address in the input text content. * * @param index the index value to set * @return the Email object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Evaluate.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Evaluate.java index 7e90ad5cd9be..31995ab6b1b1 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Evaluate.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Evaluate.java @@ -46,7 +46,7 @@ public class Evaluate { private Boolean isImageAdultClassified; /** - * The racy classication score. + * The racy classification score. */ @JsonProperty(value = "RacyClassificationScore") private Double racyClassificationScore; @@ -70,7 +70,7 @@ public class Evaluate { private Status status; /** - * Get the cacheID value. + * Get the cache id. * * @return the cacheID value */ @@ -79,7 +79,7 @@ public String cacheID() { } /** - * Set the cacheID value. + * Set the cache id. * * @param cacheID the cacheID value to set * @return the Evaluate object itself. @@ -90,7 +90,7 @@ public Evaluate withCacheID(String cacheID) { } /** - * Get the result value. + * Get evaluate result. * * @return the result value */ @@ -99,7 +99,7 @@ public Boolean result() { } /** - * Set the result value. + * Set evaluate result. * * @param result the result value to set * @return the Evaluate object itself. @@ -110,7 +110,7 @@ public Evaluate withResult(Boolean result) { } /** - * Get the trackingId value. + * Get the tracking id. * * @return the trackingId value */ @@ -119,7 +119,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set the tracking id. * * @param trackingId the trackingId value to set * @return the Evaluate object itself. @@ -130,7 +130,7 @@ public Evaluate withTrackingId(String trackingId) { } /** - * Get the adultClassificationScore value. + * Get the adult classification score. * * @return the adultClassificationScore value */ @@ -139,7 +139,7 @@ public Double adultClassificationScore() { } /** - * Set the adultClassificationScore value. + * Set the adult classification score. * * @param adultClassificationScore the adultClassificationScore value to set * @return the Evaluate object itself. @@ -150,7 +150,7 @@ public Evaluate withAdultClassificationScore(Double adultClassificationScore) { } /** - * Get the isImageAdultClassified value. + * Get indicates if an image is classified as adult. * * @return the isImageAdultClassified value */ @@ -159,7 +159,7 @@ public Boolean isImageAdultClassified() { } /** - * Set the isImageAdultClassified value. + * Set indicates if an image is classified as adult. * * @param isImageAdultClassified the isImageAdultClassified value to set * @return the Evaluate object itself. @@ -170,7 +170,7 @@ public Evaluate withIsImageAdultClassified(Boolean isImageAdultClassified) { } /** - * Get the racyClassificationScore value. + * Get the racy classification score. * * @return the racyClassificationScore value */ @@ -179,7 +179,7 @@ public Double racyClassificationScore() { } /** - * Set the racyClassificationScore value. + * Set the racy classification score. * * @param racyClassificationScore the racyClassificationScore value to set * @return the Evaluate object itself. @@ -190,7 +190,7 @@ public Evaluate withRacyClassificationScore(Double racyClassificationScore) { } /** - * Get the isImageRacyClassified value. + * Get indicates if the image is classified as racy. * * @return the isImageRacyClassified value */ @@ -199,7 +199,7 @@ public Boolean isImageRacyClassified() { } /** - * Set the isImageRacyClassified value. + * Set indicates if the image is classified as racy. * * @param isImageRacyClassified the isImageRacyClassified value to set * @return the Evaluate object itself. @@ -210,7 +210,7 @@ public Evaluate withIsImageRacyClassified(Boolean isImageRacyClassified) { } /** - * Get the advancedInfo value. + * Get the advanced info. * * @return the advancedInfo value */ @@ -219,7 +219,7 @@ public List advancedInfo() { } /** - * Set the advancedInfo value. + * Set the advanced info. * * @param advancedInfo the advancedInfo value to set * @return the Evaluate object itself. @@ -230,7 +230,7 @@ public Evaluate withAdvancedInfo(List advancedInfo) { } /** - * Get the status value. + * Get the evaluate status. * * @return the status value */ @@ -239,7 +239,7 @@ public Status status() { } /** - * Set the status value. + * Set the evaluate status. * * @param status the status value to set * @return the Evaluate object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Face.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Face.java index 7502966d0534..7357ae1d619a 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Face.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Face.java @@ -39,7 +39,7 @@ public class Face { private Integer top; /** - * Get the bottom value. + * Get the bottom coordinate. * * @return the bottom value */ @@ -48,7 +48,7 @@ public Integer bottom() { } /** - * Set the bottom value. + * Set the bottom coordinate. * * @param bottom the bottom value to set * @return the Face object itself. @@ -59,7 +59,7 @@ public Face withBottom(Integer bottom) { } /** - * Get the left value. + * Get the left coordinate. * * @return the left value */ @@ -68,7 +68,7 @@ public Integer left() { } /** - * Set the left value. + * Set the left coordinate. * * @param left the left value to set * @return the Face object itself. @@ -79,7 +79,7 @@ public Face withLeft(Integer left) { } /** - * Get the right value. + * Get the right coordinate. * * @return the right value */ @@ -88,7 +88,7 @@ public Integer right() { } /** - * Set the right value. + * Set the right coordinate. * * @param right the right value to set * @return the Face object itself. @@ -99,7 +99,7 @@ public Face withRight(Integer right) { } /** - * Get the top value. + * Get the top coordinate. * * @return the top value */ @@ -108,7 +108,7 @@ public Integer top() { } /** - * Set the top value. + * Set the top coordinate. * * @param top the top value to set * @return the Face object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/FoundFaces.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/FoundFaces.java index 5de563a542bc..8feb5216e434 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/FoundFaces.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/FoundFaces.java @@ -58,7 +58,7 @@ public class FoundFaces { private List faces; /** - * Get the status value. + * Get the evaluate status. * * @return the status value */ @@ -67,7 +67,7 @@ public Status status() { } /** - * Set the status value. + * Set the evaluate status. * * @param status the status value to set * @return the FoundFaces object itself. @@ -78,7 +78,7 @@ public FoundFaces withStatus(Status status) { } /** - * Get the trackingId value. + * Get the tracking id. * * @return the trackingId value */ @@ -87,7 +87,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set the tracking id. * * @param trackingId the trackingId value to set * @return the FoundFaces object itself. @@ -98,7 +98,7 @@ public FoundFaces withTrackingId(String trackingId) { } /** - * Get the cacheId value. + * Get the cache id. * * @return the cacheId value */ @@ -107,7 +107,7 @@ public String cacheId() { } /** - * Set the cacheId value. + * Set the cache id. * * @param cacheId the cacheId value to set * @return the FoundFaces object itself. @@ -118,7 +118,7 @@ public FoundFaces withCacheId(String cacheId) { } /** - * Get the result value. + * Get true if result was found. * * @return the result value */ @@ -127,7 +127,7 @@ public Boolean result() { } /** - * Set the result value. + * Set true if result was found. * * @param result the result value to set * @return the FoundFaces object itself. @@ -138,7 +138,7 @@ public FoundFaces withResult(Boolean result) { } /** - * Get the count value. + * Get number of faces found. * * @return the count value */ @@ -147,7 +147,7 @@ public Integer count() { } /** - * Set the count value. + * Set number of faces found. * * @param count the count value to set * @return the FoundFaces object itself. @@ -158,7 +158,7 @@ public FoundFaces withCount(Integer count) { } /** - * Get the advancedInfo value. + * Get the advanced info. * * @return the advancedInfo value */ @@ -167,7 +167,7 @@ public List advancedInfo() { } /** - * Set the advancedInfo value. + * Set the advanced info. * * @param advancedInfo the advancedInfo value to set * @return the FoundFaces object itself. @@ -178,7 +178,7 @@ public FoundFaces withAdvancedInfo(List advancedInfo) { } /** - * Get the faces value. + * Get the list of faces. * * @return the faces value */ @@ -187,7 +187,7 @@ public List faces() { } /** - * Set the faces value. + * Set the list of faces. * * @param faces the faces value to set * @return the FoundFaces object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frame.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frame.java index fe8fbd0e9be1..09b4c49a1fcf 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frame.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frame.java @@ -40,7 +40,7 @@ public class Frame { private List reviewerResultTags; /** - * Get the timestamp value. + * Get timestamp of the frame. * * @return the timestamp value */ @@ -49,7 +49,7 @@ public String timestamp() { } /** - * Set the timestamp value. + * Set timestamp of the frame. * * @param timestamp the timestamp value to set * @return the Frame object itself. @@ -60,7 +60,7 @@ public Frame withTimestamp(String timestamp) { } /** - * Get the frameImage value. + * Get frame image. * * @return the frameImage value */ @@ -69,7 +69,7 @@ public String frameImage() { } /** - * Set the frameImage value. + * Set frame image. * * @param frameImage the frameImage value to set * @return the Frame object itself. @@ -80,7 +80,7 @@ public Frame withFrameImage(String frameImage) { } /** - * Get the metadata value. + * Get array of KeyValue. * * @return the metadata value */ @@ -89,7 +89,7 @@ public List metadata() { } /** - * Set the metadata value. + * Set array of KeyValue. * * @param metadata the metadata value to set * @return the Frame object itself. @@ -100,7 +100,7 @@ public Frame withMetadata(List metadata) { } /** - * Get the reviewerResultTags value. + * Get reviewer result tags. * * @return the reviewerResultTags value */ @@ -109,7 +109,7 @@ public List reviewerResultTags() { } /** - * Set the reviewerResultTags value. + * Set reviewer result tags. * * @param reviewerResultTags the reviewerResultTags value to set * @return the Frame object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frames.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frames.java index c8fad1936016..5e267d51ae66 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frames.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Frames.java @@ -28,7 +28,7 @@ public class Frames { private List videoFrames; /** - * Get the reviewId value. + * Get id of the review. * * @return the reviewId value */ @@ -37,7 +37,7 @@ public String reviewId() { } /** - * Set the reviewId value. + * Set id of the review. * * @param reviewId the reviewId value to set * @return the Frames object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/IPA.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/IPA.java index 86d30fecc3d1..d80db43b728e 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/IPA.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/IPA.java @@ -33,7 +33,7 @@ public class IPA { private Integer index; /** - * Get the subType value. + * Get subtype of the detected IP Address. * * @return the subType value */ @@ -42,7 +42,7 @@ public String subType() { } /** - * Set the subType value. + * Set subtype of the detected IP Address. * * @param subType the subType value to set * @return the IPA object itself. @@ -53,7 +53,7 @@ public IPA withSubType(String subType) { } /** - * Get the text value. + * Get detected IP Address. * * @return the text value */ @@ -62,7 +62,7 @@ public String text() { } /** - * Set the text value. + * Set detected IP Address. * * @param text the text value to set * @return the IPA object itself. @@ -73,7 +73,7 @@ public IPA withText(String text) { } /** - * Get the index value. + * Get index(Location) of the IP Address in the input text content. * * @return the index value */ @@ -82,7 +82,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the IP Address in the input text content. * * @param index the index value to set * @return the IPA object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Image.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Image.java index bef2226467be..c296f882c5ce 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Image.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Image.java @@ -40,7 +40,7 @@ public class Image { private String trackingId; /** - * Get the contentId value. + * Get content Id. * * @return the contentId value */ @@ -49,7 +49,7 @@ public String contentId() { } /** - * Set the contentId value. + * Set content Id. * * @param contentId the contentId value to set * @return the Image object itself. @@ -60,7 +60,7 @@ public Image withContentId(String contentId) { } /** - * Get the additionalInfo value. + * Get advanced info list. * * @return the additionalInfo value */ @@ -69,7 +69,7 @@ public List additionalInfo() { } /** - * Set the additionalInfo value. + * Set advanced info list. * * @param additionalInfo the additionalInfo value to set * @return the Image object itself. @@ -80,7 +80,7 @@ public Image withAdditionalInfo(List additionalInfo) { } /** - * Get the status value. + * Get status details. * * @return the status value */ @@ -89,7 +89,7 @@ public Status status() { } /** - * Set the status value. + * Set status details. * * @param status the status value to set * @return the Image object itself. @@ -100,7 +100,7 @@ public Image withStatus(Status status) { } /** - * Get the trackingId value. + * Get tracking Id. * * @return the trackingId value */ @@ -109,7 +109,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set tracking Id. * * @param trackingId the trackingId value to set * @return the Image object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageAdditionalInfoItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageAdditionalInfoItem.java index 5756db4574f2..831c478bfeb4 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageAdditionalInfoItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageAdditionalInfoItem.java @@ -27,7 +27,7 @@ public class ImageAdditionalInfoItem { private String value; /** - * Get the key value. + * Get key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set key parameter. * * @param key the key value to set * @return the ImageAdditionalInfoItem object itself. @@ -47,7 +47,7 @@ public ImageAdditionalInfoItem withKey(String key) { } /** - * Get the value value. + * Get value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set value parameter. * * @param value the value value to set * @return the ImageAdditionalInfoItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageIds.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageIds.java index 4e4e1ed7f793..722e5a6f9083 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageIds.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageIds.java @@ -40,7 +40,7 @@ public class ImageIds { private String trackingId; /** - * Get the contentSource value. + * Get source of the content. * * @return the contentSource value */ @@ -49,7 +49,7 @@ public String contentSource() { } /** - * Set the contentSource value. + * Set source of the content. * * @param contentSource the contentSource value to set * @return the ImageIds object itself. @@ -60,7 +60,7 @@ public ImageIds withContentSource(String contentSource) { } /** - * Get the contentIds value. + * Get id of the contents. * * @return the contentIds value */ @@ -69,7 +69,7 @@ public List contentIds() { } /** - * Set the contentIds value. + * Set id of the contents. * * @param contentIds the contentIds value to set * @return the ImageIds object itself. @@ -80,7 +80,7 @@ public ImageIds withContentIds(List contentIds) { } /** - * Get the status value. + * Get get Image status. * * @return the status value */ @@ -89,7 +89,7 @@ public Status status() { } /** - * Set the status value. + * Set get Image status. * * @param status the status value to set * @return the ImageIds object itself. @@ -100,7 +100,7 @@ public ImageIds withStatus(Status status) { } /** - * Get the trackingId value. + * Get tracking Id. * * @return the trackingId value */ @@ -109,7 +109,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set tracking Id. * * @param trackingId the trackingId value to set * @return the ImageIds object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageList.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageList.java index 0a58f05b725a..2e608be6122a 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageList.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageList.java @@ -8,6 +8,7 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -36,10 +37,10 @@ public class ImageList { * Image List Metadata. */ @JsonProperty(value = "Metadata") - private ImageListMetadata metadata; + private Map metadata; /** - * Get the id value. + * Get image List Id. * * @return the id value */ @@ -48,7 +49,7 @@ public Integer id() { } /** - * Set the id value. + * Set image List Id. * * @param id the id value to set * @return the ImageList object itself. @@ -59,7 +60,7 @@ public ImageList withId(Integer id) { } /** - * Get the name value. + * Get image List Name. * * @return the name value */ @@ -68,7 +69,7 @@ public String name() { } /** - * Set the name value. + * Set image List Name. * * @param name the name value to set * @return the ImageList object itself. @@ -79,7 +80,7 @@ public ImageList withName(String name) { } /** - * Get the description value. + * Get description for image list. * * @return the description value */ @@ -88,7 +89,7 @@ public String description() { } /** - * Set the description value. + * Set description for image list. * * @param description the description value to set * @return the ImageList object itself. @@ -99,21 +100,21 @@ public ImageList withDescription(String description) { } /** - * Get the metadata value. + * Get image List Metadata. * * @return the metadata value */ - public ImageListMetadata metadata() { + public Map metadata() { return this.metadata; } /** - * Set the metadata value. + * Set image List Metadata. * * @param metadata the metadata value to set * @return the ImageList object itself. */ - public ImageList withMetadata(ImageListMetadata metadata) { + public ImageList withMetadata(Map metadata) { this.metadata = metadata; return this; } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageListMetadata.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageListMetadata.java index 6015649e1816..38baa9c37d35 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageListMetadata.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/ImageListMetadata.java @@ -8,12 +8,19 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** * Image List Metadata. */ public class ImageListMetadata { + /** + * Unmatched properties from the message are deserialized this collection. + */ + @JsonProperty(value = "") + private Map additionalProperties; + /** * Optional Key value pair to describe your list. */ @@ -27,7 +34,27 @@ public class ImageListMetadata { private String keyTwo; /** - * Get the keyOne value. + * Get unmatched properties from the message are deserialized this collection. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set unmatched properties from the message are deserialized this collection. + * + * @param additionalProperties the additionalProperties value to set + * @return the ImageListMetadata object itself. + */ + public ImageListMetadata withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get optional Key value pair to describe your list. * * @return the keyOne value */ @@ -36,7 +63,7 @@ public String keyOne() { } /** - * Set the keyOne value. + * Set optional Key value pair to describe your list. * * @param keyOne the keyOne value to set * @return the ImageListMetadata object itself. @@ -47,7 +74,7 @@ public ImageListMetadata withKeyOne(String keyOne) { } /** - * Get the keyTwo value. + * Get optional Key value pair to describe your list. * * @return the keyTwo value */ @@ -56,7 +83,7 @@ public String keyTwo() { } /** - * Set the keyTwo value. + * Set optional Key value pair to describe your list. * * @param keyTwo the keyTwo value to set * @return the ImageListMetadata object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Job.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Job.java index d40c7827126e..9dbced3cd3e1 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Job.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Job.java @@ -70,7 +70,7 @@ public class Job { private List jobExecutionReport; /** - * Get the id value. + * Get the job id. * * @return the id value */ @@ -79,7 +79,7 @@ public String id() { } /** - * Set the id value. + * Set the job id. * * @param id the id value to set * @return the Job object itself. @@ -90,7 +90,7 @@ public Job withId(String id) { } /** - * Get the teamName value. + * Get the team name associated with the job. * * @return the teamName value */ @@ -99,7 +99,7 @@ public String teamName() { } /** - * Set the teamName value. + * Set the team name associated with the job. * * @param teamName the teamName value to set * @return the Job object itself. @@ -110,7 +110,7 @@ public Job withTeamName(String teamName) { } /** - * Get the status value. + * Get the status string (<Pending, Failed, Completed>). * * @return the status value */ @@ -119,7 +119,7 @@ public String status() { } /** - * Set the status value. + * Set the status string (<Pending, Failed, Completed>). * * @param status the status value to set * @return the Job object itself. @@ -130,7 +130,7 @@ public Job withStatus(String status) { } /** - * Get the workflowId value. + * Get the Id of the workflow. * * @return the workflowId value */ @@ -139,7 +139,7 @@ public String workflowId() { } /** - * Set the workflowId value. + * Set the Id of the workflow. * * @param workflowId the workflowId value to set * @return the Job object itself. @@ -150,7 +150,7 @@ public Job withWorkflowId(String workflowId) { } /** - * Get the type value. + * Get type of the content. * * @return the type value */ @@ -159,7 +159,7 @@ public String type() { } /** - * Set the type value. + * Set type of the content. * * @param type the type value to set * @return the Job object itself. @@ -170,7 +170,7 @@ public Job withType(String type) { } /** - * Get the callBackEndpoint value. + * Get the callback endpoint. * * @return the callBackEndpoint value */ @@ -179,7 +179,7 @@ public String callBackEndpoint() { } /** - * Set the callBackEndpoint value. + * Set the callback endpoint. * * @param callBackEndpoint the callBackEndpoint value to set * @return the Job object itself. @@ -190,7 +190,7 @@ public Job withCallBackEndpoint(String callBackEndpoint) { } /** - * Get the reviewId value. + * Get review Id if one is created. * * @return the reviewId value */ @@ -199,7 +199,7 @@ public String reviewId() { } /** - * Set the reviewId value. + * Set review Id if one is created. * * @param reviewId the reviewId value to set * @return the Job object itself. @@ -210,7 +210,7 @@ public Job withReviewId(String reviewId) { } /** - * Get the resultMetaData value. + * Get array of KeyValue pairs. * * @return the resultMetaData value */ @@ -219,7 +219,7 @@ public List resultMetaData() { } /** - * Set the resultMetaData value. + * Set array of KeyValue pairs. * * @param resultMetaData the resultMetaData value to set * @return the Job object itself. @@ -230,7 +230,7 @@ public Job withResultMetaData(List resultMetaData) { } /** - * Get the jobExecutionReport value. + * Get job execution report- Array of KeyValue pairs object. * * @return the jobExecutionReport value */ @@ -239,7 +239,7 @@ public List jobExecutionReport() { } /** - * Set the jobExecutionReport value. + * Set job execution report- Array of KeyValue pairs object. * * @param jobExecutionReport the jobExecutionReport value to set * @return the Job object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobExecutionReportDetails.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobExecutionReportDetails.java index 36d0d3e3c0d8..1334e98c29ab 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobExecutionReportDetails.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobExecutionReportDetails.java @@ -27,7 +27,7 @@ public class JobExecutionReportDetails { private String msg; /** - * Get the ts value. + * Get time details. * * @return the ts value */ @@ -36,7 +36,7 @@ public String ts() { } /** - * Set the ts value. + * Set time details. * * @param ts the ts value to set * @return the JobExecutionReportDetails object itself. @@ -47,7 +47,7 @@ public JobExecutionReportDetails withTs(String ts) { } /** - * Get the msg value. + * Get message details. * * @return the msg value */ @@ -56,7 +56,7 @@ public String msg() { } /** - * Set the msg value. + * Set message details. * * @param msg the msg value to set * @return the JobExecutionReportDetails object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobId.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobId.java index 34b333856e17..6a8ed374a5cb 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobId.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobId.java @@ -21,7 +21,7 @@ public class JobId { private String jobId; /** - * Get the jobId value. + * Get id of the created job. * * @return the jobId value */ @@ -30,7 +30,7 @@ public String jobId() { } /** - * Set the jobId value. + * Set id of the created job. * * @param jobId the jobId value to set * @return the JobId object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobListResult.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobListResult.java index bc2ee0de4005..5e055523858d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobListResult.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/JobListResult.java @@ -22,7 +22,7 @@ public class JobListResult { private List value; /** - * Get the value value. + * Get the job id. * * @return the value value */ @@ -31,7 +31,7 @@ public List value() { } /** - * Set the value value. + * Set the job id. * * @param value the value value to set * @return the JobListResult object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/KeyValuePair.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/KeyValuePair.java index 9992ea27891e..e637b5a1967d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/KeyValuePair.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/KeyValuePair.java @@ -27,7 +27,7 @@ public class KeyValuePair { private String value; /** - * Get the key value. + * Get the key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set the key parameter. * * @param key the key value to set * @return the KeyValuePair object itself. @@ -47,7 +47,7 @@ public KeyValuePair withKey(String key) { } /** - * Get the value value. + * Get the value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set the value parameter. * * @param value the value value to set * @return the KeyValuePair object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Match.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Match.java index ff14a2b3e7a2..c93b6232f4d6 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Match.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Match.java @@ -46,7 +46,7 @@ public class Match { private String label; /** - * Get the score value. + * Get confidence score of the image match. * * @return the score value */ @@ -55,7 +55,7 @@ public Double score() { } /** - * Set the score value. + * Set confidence score of the image match. * * @param score the score value to set * @return the Match object itself. @@ -66,7 +66,7 @@ public Match withScore(Double score) { } /** - * Get the matchId value. + * Get the match id. * * @return the matchId value */ @@ -75,7 +75,7 @@ public Integer matchId() { } /** - * Set the matchId value. + * Set the match id. * * @param matchId the matchId value to set * @return the Match object itself. @@ -86,7 +86,7 @@ public Match withMatchId(Integer matchId) { } /** - * Get the source value. + * Get the source. * * @return the source value */ @@ -95,7 +95,7 @@ public String source() { } /** - * Set the source value. + * Set the source. * * @param source the source value to set * @return the Match object itself. @@ -106,7 +106,7 @@ public Match withSource(String source) { } /** - * Get the tags value. + * Get the tags for match details. * * @return the tags value */ @@ -115,7 +115,7 @@ public List tags() { } /** - * Set the tags value. + * Set the tags for match details. * * @param tags the tags value to set * @return the Match object itself. @@ -126,7 +126,7 @@ public Match withTags(List tags) { } /** - * Get the label value. + * Get the label. * * @return the label value */ @@ -135,7 +135,7 @@ public String label() { } /** - * Set the label value. + * Set the label. * * @param label the label value to set * @return the Match object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/MatchResponse.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/MatchResponse.java index 2e007175bcb0..d1151b7661e2 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/MatchResponse.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/MatchResponse.java @@ -46,7 +46,7 @@ public class MatchResponse { private Status status; /** - * Get the trackingId value. + * Get the tracking id. * * @return the trackingId value */ @@ -55,7 +55,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set the tracking id. * * @param trackingId the trackingId value to set * @return the MatchResponse object itself. @@ -66,7 +66,7 @@ public MatchResponse withTrackingId(String trackingId) { } /** - * Get the cacheID value. + * Get the cache id. * * @return the cacheID value */ @@ -75,7 +75,7 @@ public String cacheID() { } /** - * Set the cacheID value. + * Set the cache id. * * @param cacheID the cacheID value to set * @return the MatchResponse object itself. @@ -86,7 +86,7 @@ public MatchResponse withCacheID(String cacheID) { } /** - * Get the isMatch value. + * Get indicates if there is a match. * * @return the isMatch value */ @@ -95,7 +95,7 @@ public Boolean isMatch() { } /** - * Set the isMatch value. + * Set indicates if there is a match. * * @param isMatch the isMatch value to set * @return the MatchResponse object itself. @@ -106,7 +106,7 @@ public MatchResponse withIsMatch(Boolean isMatch) { } /** - * Get the matches value. + * Get the match details. * * @return the matches value */ @@ -115,7 +115,7 @@ public List matches() { } /** - * Set the matches value. + * Set the match details. * * @param matches the matches value to set * @return the MatchResponse object itself. @@ -126,7 +126,7 @@ public MatchResponse withMatches(List matches) { } /** - * Get the status value. + * Get the evaluate status. * * @return the status value */ @@ -135,7 +135,7 @@ public Status status() { } /** - * Set the status value. + * Set the evaluate status. * * @param status the status value to set * @return the MatchResponse object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/OCR.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/OCR.java index 8e0d46e3434b..5ed5a556d234 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/OCR.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/OCR.java @@ -58,7 +58,7 @@ public class OCR { private List candidates; /** - * Get the status value. + * Get the evaluate status. * * @return the status value */ @@ -67,7 +67,7 @@ public Status status() { } /** - * Set the status value. + * Set the evaluate status. * * @param status the status value to set * @return the OCR object itself. @@ -78,7 +78,7 @@ public OCR withStatus(Status status) { } /** - * Get the metadata value. + * Get array of KeyValue. * * @return the metadata value */ @@ -87,7 +87,7 @@ public List metadata() { } /** - * Set the metadata value. + * Set array of KeyValue. * * @param metadata the metadata value to set * @return the OCR object itself. @@ -98,7 +98,7 @@ public OCR withMetadata(List metadata) { } /** - * Get the trackingId value. + * Get the tracking id. * * @return the trackingId value */ @@ -107,7 +107,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set the tracking id. * * @param trackingId the trackingId value to set * @return the OCR object itself. @@ -118,7 +118,7 @@ public OCR withTrackingId(String trackingId) { } /** - * Get the cacheId value. + * Get the cache id. * * @return the cacheId value */ @@ -127,7 +127,7 @@ public String cacheId() { } /** - * Set the cacheId value. + * Set the cache id. * * @param cacheId the cacheId value to set * @return the OCR object itself. @@ -138,7 +138,7 @@ public OCR withCacheId(String cacheId) { } /** - * Get the language value. + * Get the ISO 639-3 code. * * @return the language value */ @@ -147,7 +147,7 @@ public String language() { } /** - * Set the language value. + * Set the ISO 639-3 code. * * @param language the language value to set * @return the OCR object itself. @@ -158,7 +158,7 @@ public OCR withLanguage(String language) { } /** - * Get the text value. + * Get the found text. * * @return the text value */ @@ -167,7 +167,7 @@ public String text() { } /** - * Set the text value. + * Set the found text. * * @param text the text value to set * @return the OCR object itself. @@ -178,7 +178,7 @@ public OCR withText(String text) { } /** - * Get the candidates value. + * Get the list of candidate text. * * @return the candidates value */ @@ -187,7 +187,7 @@ public List candidates() { } /** - * Set the candidates value. + * Set the list of candidate text. * * @param candidates the candidates value to set * @return the OCR object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Phone.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Phone.java index 13d7e7d69067..5506cd3ffee4 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Phone.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Phone.java @@ -33,7 +33,7 @@ public class Phone { private Integer index; /** - * Get the countryCode value. + * Get countryCode of the detected Phone number. * * @return the countryCode value */ @@ -42,7 +42,7 @@ public String countryCode() { } /** - * Set the countryCode value. + * Set countryCode of the detected Phone number. * * @param countryCode the countryCode value to set * @return the Phone object itself. @@ -53,7 +53,7 @@ public Phone withCountryCode(String countryCode) { } /** - * Get the text value. + * Get detected Phone number. * * @return the text value */ @@ -62,7 +62,7 @@ public String text() { } /** - * Set the text value. + * Set detected Phone number. * * @param text the text value to set * @return the Phone object itself. @@ -73,7 +73,7 @@ public Phone withText(String text) { } /** - * Get the index value. + * Get index(Location) of the Phone number in the input text content. * * @return the index value */ @@ -82,7 +82,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the Phone number in the input text content. * * @param index the index value to set * @return the Phone object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndex.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndex.java index 39c595403ecc..ce9936e8301a 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndex.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndex.java @@ -9,6 +9,7 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; import java.util.List; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -31,7 +32,7 @@ public class RefreshIndex { * Advanced info list. */ @JsonProperty(value = "AdvancedInfo") - private List advancedInfo; + private List> advancedInfo; /** * Refresh index status. @@ -46,7 +47,7 @@ public class RefreshIndex { private String trackingId; /** - * Get the contentSourceId value. + * Get content source Id. * * @return the contentSourceId value */ @@ -55,7 +56,7 @@ public String contentSourceId() { } /** - * Set the contentSourceId value. + * Set content source Id. * * @param contentSourceId the contentSourceId value to set * @return the RefreshIndex object itself. @@ -66,7 +67,7 @@ public RefreshIndex withContentSourceId(String contentSourceId) { } /** - * Get the isUpdateSuccess value. + * Get update success status. * * @return the isUpdateSuccess value */ @@ -75,7 +76,7 @@ public Boolean isUpdateSuccess() { } /** - * Set the isUpdateSuccess value. + * Set update success status. * * @param isUpdateSuccess the isUpdateSuccess value to set * @return the RefreshIndex object itself. @@ -86,27 +87,27 @@ public RefreshIndex withIsUpdateSuccess(Boolean isUpdateSuccess) { } /** - * Get the advancedInfo value. + * Get advanced info list. * * @return the advancedInfo value */ - public List advancedInfo() { + public List> advancedInfo() { return this.advancedInfo; } /** - * Set the advancedInfo value. + * Set advanced info list. * * @param advancedInfo the advancedInfo value to set * @return the RefreshIndex object itself. */ - public RefreshIndex withAdvancedInfo(List advancedInfo) { + public RefreshIndex withAdvancedInfo(List> advancedInfo) { this.advancedInfo = advancedInfo; return this; } /** - * Get the status value. + * Get refresh index status. * * @return the status value */ @@ -115,7 +116,7 @@ public Status status() { } /** - * Set the status value. + * Set refresh index status. * * @param status the status value to set * @return the RefreshIndex object itself. @@ -126,7 +127,7 @@ public RefreshIndex withStatus(Status status) { } /** - * Get the trackingId value. + * Get tracking Id. * * @return the trackingId value */ @@ -135,7 +136,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set tracking Id. * * @param trackingId the trackingId value to set * @return the RefreshIndex object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndexAdvancedInfoItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndexAdvancedInfoItem.java index a7cacac86a5c..e5e3e7d09dbd 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndexAdvancedInfoItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/RefreshIndexAdvancedInfoItem.java @@ -27,7 +27,7 @@ public class RefreshIndexAdvancedInfoItem { private String keyTwo; /** - * Get the keyOne value. + * Get key parameter to describe advanced info. * * @return the keyOne value */ @@ -36,7 +36,7 @@ public String keyOne() { } /** - * Set the keyOne value. + * Set key parameter to describe advanced info. * * @param keyOne the keyOne value to set * @return the RefreshIndexAdvancedInfoItem object itself. @@ -47,7 +47,7 @@ public RefreshIndexAdvancedInfoItem withKeyOne(String keyOne) { } /** - * Get the keyTwo value. + * Get key parameter to describe advanced info. * * @return the keyTwo value */ @@ -56,7 +56,7 @@ public String keyTwo() { } /** - * Set the keyTwo value. + * Set key parameter to describe advanced info. * * @param keyTwo the keyTwo value to set * @return the RefreshIndexAdvancedInfoItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Review.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Review.java index ca2b9f5cb142..b0fbbae14acd 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Review.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Review.java @@ -76,7 +76,7 @@ public class Review { private String callbackEndpoint; /** - * Get the reviewId value. + * Get id of the review. * * @return the reviewId value */ @@ -85,7 +85,7 @@ public String reviewId() { } /** - * Set the reviewId value. + * Set id of the review. * * @param reviewId the reviewId value to set * @return the Review object itself. @@ -96,7 +96,7 @@ public Review withReviewId(String reviewId) { } /** - * Get the subTeam value. + * Get name of the subteam. * * @return the subTeam value */ @@ -105,7 +105,7 @@ public String subTeam() { } /** - * Set the subTeam value. + * Set name of the subteam. * * @param subTeam the subTeam value to set * @return the Review object itself. @@ -116,7 +116,7 @@ public Review withSubTeam(String subTeam) { } /** - * Get the status value. + * Get the status string (<Pending, Complete>). * * @return the status value */ @@ -125,7 +125,7 @@ public String status() { } /** - * Set the status value. + * Set the status string (<Pending, Complete>). * * @param status the status value to set * @return the Review object itself. @@ -136,7 +136,7 @@ public Review withStatus(String status) { } /** - * Get the reviewerResultTags value. + * Get array of KeyValue with Reviewer set Tags. * * @return the reviewerResultTags value */ @@ -145,7 +145,7 @@ public List reviewerResultTags() { } /** - * Set the reviewerResultTags value. + * Set array of KeyValue with Reviewer set Tags. * * @param reviewerResultTags the reviewerResultTags value to set * @return the Review object itself. @@ -156,7 +156,7 @@ public Review withReviewerResultTags(List reviewerResultTags) { } /** - * Get the createdBy value. + * Get the reviewer name. * * @return the createdBy value */ @@ -165,7 +165,7 @@ public String createdBy() { } /** - * Set the createdBy value. + * Set the reviewer name. * * @param createdBy the createdBy value to set * @return the Review object itself. @@ -176,7 +176,7 @@ public Review withCreatedBy(String createdBy) { } /** - * Get the metadata value. + * Get array of KeyValue. * * @return the metadata value */ @@ -185,7 +185,7 @@ public List metadata() { } /** - * Set the metadata value. + * Set array of KeyValue. * * @param metadata the metadata value to set * @return the Review object itself. @@ -196,7 +196,7 @@ public Review withMetadata(List metadata) { } /** - * Get the type value. + * Get the type of content. * * @return the type value */ @@ -205,7 +205,7 @@ public String type() { } /** - * Set the type value. + * Set the type of content. * * @param type the type value to set * @return the Review object itself. @@ -236,7 +236,7 @@ public Review withContent(String content) { } /** - * Get the contentId value. + * Get id of the content. * * @return the contentId value */ @@ -245,7 +245,7 @@ public String contentId() { } /** - * Set the contentId value. + * Set id of the content. * * @param contentId the contentId value to set * @return the Review object itself. @@ -256,7 +256,7 @@ public Review withContentId(String contentId) { } /** - * Get the callbackEndpoint value. + * Get the callback endpoint. * * @return the callbackEndpoint value */ @@ -265,7 +265,7 @@ public String callbackEndpoint() { } /** - * Set the callbackEndpoint value. + * Set the callback endpoint. * * @param callbackEndpoint the callbackEndpoint value to set * @return the Review object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/SSN.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/SSN.java index 9d21d13a56ea..2957887635bf 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/SSN.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/SSN.java @@ -27,7 +27,7 @@ public class SSN { private Integer index; /** - * Get the text value. + * Get detected SSN in the input text content. * * @return the text value */ @@ -36,7 +36,7 @@ public String text() { } /** - * Set the text value. + * Set detected SSN in the input text content. * * @param text the text value to set * @return the SSN object itself. @@ -47,7 +47,7 @@ public SSN withText(String text) { } /** - * Get the index value. + * Get index(Location) of the SSN in the input text content. * * @return the index value */ @@ -56,7 +56,7 @@ public Integer index() { } /** - * Set the index value. + * Set index(Location) of the SSN in the input text content. * * @param index the index value to set * @return the SSN object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Screen.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Screen.java index 43e5383dd651..09a7612a1319 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Screen.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Screen.java @@ -76,7 +76,7 @@ public class Screen { private String trackingId; /** - * Get the originalText value. + * Get the original text. * * @return the originalText value */ @@ -85,7 +85,7 @@ public String originalText() { } /** - * Set the originalText value. + * Set the original text. * * @param originalText the originalText value to set * @return the Screen object itself. @@ -96,7 +96,7 @@ public Screen withOriginalText(String originalText) { } /** - * Get the normalizedText value. + * Get the normalized text. * * @return the normalizedText value */ @@ -105,7 +105,7 @@ public String normalizedText() { } /** - * Set the normalizedText value. + * Set the normalized text. * * @param normalizedText the normalizedText value to set * @return the Screen object itself. @@ -116,7 +116,7 @@ public Screen withNormalizedText(String normalizedText) { } /** - * Get the autoCorrectedText value. + * Get the autocorrected text. * * @return the autoCorrectedText value */ @@ -125,7 +125,7 @@ public String autoCorrectedText() { } /** - * Set the autoCorrectedText value. + * Set the autocorrected text. * * @param autoCorrectedText the autoCorrectedText value to set * @return the Screen object itself. @@ -136,7 +136,7 @@ public Screen withAutoCorrectedText(String autoCorrectedText) { } /** - * Get the misrepresentation value. + * Get the misrepresentation text. * * @return the misrepresentation value */ @@ -145,7 +145,7 @@ public List misrepresentation() { } /** - * Set the misrepresentation value. + * Set the misrepresentation text. * * @param misrepresentation the misrepresentation value to set * @return the Screen object itself. @@ -156,7 +156,7 @@ public Screen withMisrepresentation(List misrepresentation) { } /** - * Get the classification value. + * Get the classification details of the text. * * @return the classification value */ @@ -165,7 +165,7 @@ public Classification classification() { } /** - * Set the classification value. + * Set the classification details of the text. * * @param classification the classification value to set * @return the Screen object itself. @@ -176,7 +176,7 @@ public Screen withClassification(Classification classification) { } /** - * Get the status value. + * Get the evaluate status. * * @return the status value */ @@ -185,7 +185,7 @@ public Status status() { } /** - * Set the status value. + * Set the evaluate status. * * @param status the status value to set * @return the Screen object itself. @@ -196,7 +196,7 @@ public Screen withStatus(Status status) { } /** - * Get the pII value. + * Get personal Identifier Information details. * * @return the pII value */ @@ -205,7 +205,7 @@ public PII pII() { } /** - * Set the pII value. + * Set personal Identifier Information details. * * @param pII the pII value to set * @return the Screen object itself. @@ -216,7 +216,7 @@ public Screen withPII(PII pII) { } /** - * Get the language value. + * Get language of the input text content. * * @return the language value */ @@ -225,7 +225,7 @@ public String language() { } /** - * Set the language value. + * Set language of the input text content. * * @param language the language value to set * @return the Screen object itself. @@ -256,7 +256,7 @@ public Screen withTerms(List terms) { } /** - * Get the trackingId value. + * Get unique Content Moderator transaction Id. * * @return the trackingId value */ @@ -265,7 +265,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set unique Content Moderator transaction Id. * * @param trackingId the trackingId value to set * @return the Screen object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Status.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Status.java index bc3646e8ea0c..f11fd61c0f6e 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Status.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Status.java @@ -33,7 +33,7 @@ public class Status { private String exception; /** - * Get the code value. + * Get status code. * * @return the code value */ @@ -42,7 +42,7 @@ public Integer code() { } /** - * Set the code value. + * Set status code. * * @param code the code value to set * @return the Status object itself. @@ -53,7 +53,7 @@ public Status withCode(Integer code) { } /** - * Get the description value. + * Get status description. * * @return the description value */ @@ -62,7 +62,7 @@ public String description() { } /** - * Set the description value. + * Set status description. * * @param description the description value to set * @return the Status object itself. @@ -73,7 +73,7 @@ public Status withDescription(String description) { } /** - * Get the exception value. + * Get exception status. * * @return the exception value */ @@ -82,7 +82,7 @@ public String exception() { } /** - * Set the exception value. + * Set exception status. * * @param exception the exception value to set * @return the Status object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Tag.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Tag.java index 642f80d03612..98e352363ee6 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Tag.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Tag.java @@ -27,7 +27,7 @@ public class Tag { private String value; /** - * Get the key value. + * Get the key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set the key parameter. * * @param key the key value to set * @return the Tag object itself. @@ -47,7 +47,7 @@ public Tag withKey(String key) { } /** - * Get the value value. + * Get the value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set the value parameter. * * @param value the value value to set * @return the Tag object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermList.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermList.java index bf54de5650c2..a84b993a8ae9 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermList.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermList.java @@ -8,6 +8,7 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** @@ -36,10 +37,10 @@ public class TermList { * Term list metadata. */ @JsonProperty(value = "Metadata") - private TermListMetadata metadata; + private Map metadata; /** - * Get the id value. + * Get term list Id. * * @return the id value */ @@ -48,7 +49,7 @@ public Integer id() { } /** - * Set the id value. + * Set term list Id. * * @param id the id value to set * @return the TermList object itself. @@ -59,7 +60,7 @@ public TermList withId(Integer id) { } /** - * Get the name value. + * Get term list name. * * @return the name value */ @@ -68,7 +69,7 @@ public String name() { } /** - * Set the name value. + * Set term list name. * * @param name the name value to set * @return the TermList object itself. @@ -79,7 +80,7 @@ public TermList withName(String name) { } /** - * Get the description value. + * Get description for term list. * * @return the description value */ @@ -88,7 +89,7 @@ public String description() { } /** - * Set the description value. + * Set description for term list. * * @param description the description value to set * @return the TermList object itself. @@ -99,21 +100,21 @@ public TermList withDescription(String description) { } /** - * Get the metadata value. + * Get term list metadata. * * @return the metadata value */ - public TermListMetadata metadata() { + public Map metadata() { return this.metadata; } /** - * Set the metadata value. + * Set term list metadata. * * @param metadata the metadata value to set * @return the TermList object itself. */ - public TermList withMetadata(TermListMetadata metadata) { + public TermList withMetadata(Map metadata) { this.metadata = metadata; return this; } diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermListMetadata.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermListMetadata.java index 775db2acfe52..f710e8518596 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermListMetadata.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermListMetadata.java @@ -8,12 +8,19 @@ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; +import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; /** * Term list metadata. */ public class TermListMetadata { + /** + * Unmatched properties from the message are deserialized this collection. + */ + @JsonProperty(value = "") + private Map additionalProperties; + /** * Optional Key value pair to describe your list. */ @@ -27,7 +34,27 @@ public class TermListMetadata { private String keyTwo; /** - * Get the keyOne value. + * Get unmatched properties from the message are deserialized this collection. + * + * @return the additionalProperties value + */ + public Map additionalProperties() { + return this.additionalProperties; + } + + /** + * Set unmatched properties from the message are deserialized this collection. + * + * @param additionalProperties the additionalProperties value to set + * @return the TermListMetadata object itself. + */ + public TermListMetadata withAdditionalProperties(Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + /** + * Get optional Key value pair to describe your list. * * @return the keyOne value */ @@ -36,7 +63,7 @@ public String keyOne() { } /** - * Set the keyOne value. + * Set optional Key value pair to describe your list. * * @param keyOne the keyOne value to set * @return the TermListMetadata object itself. @@ -47,7 +74,7 @@ public TermListMetadata withKeyOne(String keyOne) { } /** - * Get the keyTwo value. + * Get optional Key value pair to describe your list. * * @return the keyTwo value */ @@ -56,7 +83,7 @@ public String keyTwo() { } /** - * Set the keyTwo value. + * Set optional Key value pair to describe your list. * * @param keyTwo the keyTwo value to set * @return the TermListMetadata object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Terms.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Terms.java index 3b411a3eeca7..dce17e6b2f11 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Terms.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/Terms.java @@ -27,7 +27,7 @@ public class Terms { private TermsPaging paging; /** - * Get the data value. + * Get term data details. * * @return the data value */ @@ -36,7 +36,7 @@ public TermsData data() { } /** - * Set the data value. + * Set term data details. * * @param data the data value to set * @return the Terms object itself. @@ -47,7 +47,7 @@ public Terms withData(TermsData data) { } /** - * Get the paging value. + * Get paging details. * * @return the paging value */ @@ -56,7 +56,7 @@ public TermsPaging paging() { } /** - * Set the paging value. + * Set paging details. * * @param paging the paging value to set * @return the Terms object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsData.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsData.java index 02c77578293e..6248380fe424 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsData.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsData.java @@ -40,7 +40,7 @@ public class TermsData { private String trackingId; /** - * Get the language value. + * Get language of the terms. * * @return the language value */ @@ -49,7 +49,7 @@ public String language() { } /** - * Set the language value. + * Set language of the terms. * * @param language the language value to set * @return the TermsData object itself. @@ -60,7 +60,7 @@ public TermsData withLanguage(String language) { } /** - * Get the terms value. + * Get list of terms. * * @return the terms value */ @@ -69,7 +69,7 @@ public List terms() { } /** - * Set the terms value. + * Set list of terms. * * @param terms the terms value to set * @return the TermsData object itself. @@ -80,7 +80,7 @@ public TermsData withTerms(List terms) { } /** - * Get the status value. + * Get term Status. * * @return the status value */ @@ -89,7 +89,7 @@ public Status status() { } /** - * Set the status value. + * Set term Status. * * @param status the status value to set * @return the TermsData object itself. @@ -100,7 +100,7 @@ public TermsData withStatus(Status status) { } /** - * Get the trackingId value. + * Get tracking Id. * * @return the trackingId value */ @@ -109,7 +109,7 @@ public String trackingId() { } /** - * Set the trackingId value. + * Set tracking Id. * * @param trackingId the trackingId value to set * @return the TermsData object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsInList.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsInList.java index d6e1798022fa..b31f44e0c506 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsInList.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsInList.java @@ -21,7 +21,7 @@ public class TermsInList { private String term; /** - * Get the term value. + * Get added term details. * * @return the term value */ @@ -30,7 +30,7 @@ public String term() { } /** - * Set the term value. + * Set added term details. * * @param term the term value to set * @return the TermsInList object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsPaging.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsPaging.java index 6004f52be3b7..d8377fc8c49d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsPaging.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TermsPaging.java @@ -39,7 +39,7 @@ public class TermsPaging { private Integer returned; /** - * Get the total value. + * Get total details. * * @return the total value */ @@ -48,7 +48,7 @@ public Integer total() { } /** - * Set the total value. + * Set total details. * * @param total the total value to set * @return the TermsPaging object itself. @@ -59,7 +59,7 @@ public TermsPaging withTotal(Integer total) { } /** - * Get the limit value. + * Get limit details. * * @return the limit value */ @@ -68,7 +68,7 @@ public Integer limit() { } /** - * Set the limit value. + * Set limit details. * * @param limit the limit value to set * @return the TermsPaging object itself. @@ -79,7 +79,7 @@ public TermsPaging withLimit(Integer limit) { } /** - * Get the offset value. + * Get offset details. * * @return the offset value */ @@ -88,7 +88,7 @@ public Integer offset() { } /** - * Set the offset value. + * Set offset details. * * @param offset the offset value to set * @return the TermsPaging object itself. @@ -99,7 +99,7 @@ public TermsPaging withOffset(Integer offset) { } /** - * Get the returned value. + * Get returned text details. * * @return the returned value */ @@ -108,7 +108,7 @@ public Integer returned() { } /** - * Set the returned value. + * Set returned text details. * * @param returned the returned value to set * @return the TermsPaging object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItem.java index ecf7c9f59c2f..b8a1ee40d83b 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItem.java @@ -28,7 +28,7 @@ public class TranscriptModerationBodyItem { private List terms; /** - * Get the timestamp value. + * Get timestamp of the image. * * @return the timestamp value */ @@ -37,7 +37,7 @@ public String timestamp() { } /** - * Set the timestamp value. + * Set timestamp of the image. * * @param timestamp the timestamp value to set * @return the TranscriptModerationBodyItem object itself. @@ -48,7 +48,7 @@ public TranscriptModerationBodyItem withTimestamp(String timestamp) { } /** - * Get the terms value. + * Get optional metadata details. * * @return the terms value */ @@ -57,7 +57,7 @@ public List terms() { } /** - * Set the terms value. + * Set optional metadata details. * * @param terms the terms value to set * @return the TranscriptModerationBodyItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItemTermsItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItemTermsItem.java index 13c938f6fd9f..25f08ec64b8f 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItemTermsItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/TranscriptModerationBodyItemTermsItem.java @@ -27,7 +27,7 @@ public class TranscriptModerationBodyItemTermsItem { private String term; /** - * Get the index value. + * Get index of the word. * * @return the index value */ @@ -36,7 +36,7 @@ public int index() { } /** - * Set the index value. + * Set index of the word. * * @param index the index value to set * @return the TranscriptModerationBodyItemTermsItem object itself. @@ -47,7 +47,7 @@ public TranscriptModerationBodyItemTermsItem withIndex(int index) { } /** - * Get the term value. + * Get detected word. * * @return the term value */ @@ -56,7 +56,7 @@ public String term() { } /** - * Set the term value. + * Set detected word. * * @param term the term value to set * @return the TranscriptModerationBodyItemTermsItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItem.java index 72a358f59be6..eb0f12610cfb 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItem.java @@ -40,7 +40,7 @@ public class VideoFrameBodyItem { private List metadata; /** - * Get the timestamp value. + * Get timestamp of the frame. * * @return the timestamp value */ @@ -49,7 +49,7 @@ public String timestamp() { } /** - * Set the timestamp value. + * Set timestamp of the frame. * * @param timestamp the timestamp value to set * @return the VideoFrameBodyItem object itself. @@ -60,7 +60,7 @@ public VideoFrameBodyItem withTimestamp(String timestamp) { } /** - * Get the frameImage value. + * Get content to review. * * @return the frameImage value */ @@ -69,7 +69,7 @@ public String frameImage() { } /** - * Set the frameImage value. + * Set content to review. * * @param frameImage the frameImage value to set * @return the VideoFrameBodyItem object itself. @@ -100,7 +100,7 @@ public VideoFrameBodyItem withReviewerResultTags(List metadata() { } /** - * Set the metadata value. + * Set optional metadata details. * * @param metadata the metadata value to set * @return the VideoFrameBodyItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemMetadataItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemMetadataItem.java index c7e154c7604b..c295161763dd 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemMetadataItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemMetadataItem.java @@ -27,7 +27,7 @@ public class VideoFrameBodyItemMetadataItem { private String value; /** - * Get the key value. + * Get your key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set your key parameter. * * @param key the key value to set * @return the VideoFrameBodyItemMetadataItem object itself. @@ -47,7 +47,7 @@ public VideoFrameBodyItemMetadataItem withKey(String key) { } /** - * Get the value value. + * Get your value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set your value parameter. * * @param value the value value to set * @return the VideoFrameBodyItemMetadataItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemReviewerResultTagsItem.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemReviewerResultTagsItem.java index fabc4b54c388..41912d0d5e6d 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemReviewerResultTagsItem.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/VideoFrameBodyItemReviewerResultTagsItem.java @@ -27,7 +27,7 @@ public class VideoFrameBodyItemReviewerResultTagsItem { private String value; /** - * Get the key value. + * Get your key parameter. * * @return the key value */ @@ -36,7 +36,7 @@ public String key() { } /** - * Set the key value. + * Set your key parameter. * * @param key the key value to set * @return the VideoFrameBodyItemReviewerResultTagsItem object itself. @@ -47,7 +47,7 @@ public VideoFrameBodyItemReviewerResultTagsItem withKey(String key) { } /** - * Get the value value. + * Get your value parameter. * * @return the value value */ @@ -56,7 +56,7 @@ public String value() { } /** - * Set the value value. + * Set your value parameter. * * @param value the value value to set * @return the VideoFrameBodyItemReviewerResultTagsItem object itself. diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/package-info.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/package-info.java index 63badd6a0fb1..acc9f98c5665 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/package-info.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/models/package-info.java @@ -10,11 +10,5 @@ When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue. - This API is currently available in: - * West US - westus.api.cognitive.microsoft.com - * East US 2 - eastus2.api.cognitive.microsoft.com - * West Central US - westcentralus.api.cognitive.microsoft.com - * West Europe - westeurope.api.cognitive.microsoft.com - * Southeast Asia - southeastasia.api.cognitive.microsoft.com . */ package com.microsoft.azure.cognitiveservices.vision.contentmoderator.models; diff --git a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/package-info.java b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/package-info.java index 71e6caa69c41..4e1af89432bc 100644 --- a/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/package-info.java +++ b/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/package-info.java @@ -10,11 +10,5 @@ When using the API, images need to have a minimum of 128 pixels and a maximum file size of 4MB. Text can be at most 1024 characters long. If the content passed to the text API or the image API exceeds the size limits, the API will return an error code that informs about the issue. - This API is currently available in: - * West US - westus.api.cognitive.microsoft.com - * East US 2 - eastus2.api.cognitive.microsoft.com - * West Central US - westcentralus.api.cognitive.microsoft.com - * West Europe - westeurope.api.cognitive.microsoft.com - * Southeast Asia - southeastasia.api.cognitive.microsoft.com . */ package com.microsoft.azure.cognitiveservices.vision.contentmoderator;