diff --git a/cognitiveservices/data-plane/language/bingspellcheck/pom.xml b/cognitiveservices/data-plane/language/bingspellcheck/pom.xml
index 11852af03000..a175bc04e384 100755
--- a/cognitiveservices/data-plane/language/bingspellcheck/pom.xml
+++ b/cognitiveservices/data-plane/language/bingspellcheck/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
- 1.0.1
+ 1.0.2
azure-cognitiveservices-spellcheck
jar
Microsoft Azure SDK for Cognitive Service Spell Check
This package contains Microsoft Cognitive Service Spell Check SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/language/bingspellcheck
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/language/bingspellcheck
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/language/luis/authoring/pom.xml b/cognitiveservices/data-plane/language/luis/authoring/pom.xml
index 095807a44801..878d915c0ed1 100644
--- a/cognitiveservices/data-plane/language/luis/authoring/pom.xml
+++ b/cognitiveservices/data-plane/language/luis/authoring/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../../pom.xml
- azure-cognitiveservices-languageunderstanding-authoring
- 1.0.1-beta
+ azure-cognitiveservices-luis-authoring
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Language Understanding (LUIS)
This package contains Microsoft Cognitive Service Language Understanding (LUIS).
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/language/luis/authoring
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/language/luis/authoring
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/language/luis/runtime/pom.xml b/cognitiveservices/data-plane/language/luis/runtime/pom.xml
index 0a9c466893d3..e8beb8142586 100755
--- a/cognitiveservices/data-plane/language/luis/runtime/pom.xml
+++ b/cognitiveservices/data-plane/language/luis/runtime/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../../pom.xml
azure-cognitiveservices-luis-runtime
- 1.0.1-beta
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Language Understanding (LUIS) Runtime
This package contains Microsoft Cognitive Service Language Understanding (LUIS) Runtime.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/language/luis/runtime
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/language/luis/runtime
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeAPI.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeAPI.java
index e2b302758c11..4cdc67e772bd 100644
--- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeAPI.java
+++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeAPI.java
@@ -9,7 +9,6 @@
package com.microsoft.azure.cognitiveservices.language.luis.runtime;
import com.microsoft.azure.AzureClient;
-import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.AzureRegions;
import com.microsoft.rest.RestClient;
/**
@@ -36,21 +35,6 @@ public interface LuisRuntimeAPI {
*/
String userAgent();
- /**
- * Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
- *
- * @return the azureRegion value.
- */
- AzureRegions azureRegion();
-
- /**
- * Sets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
- *
- * @param azureRegion the azureRegion value.
- * @return the service client itself
- */
- LuisRuntimeAPI withAzureRegion(AzureRegions azureRegion);
-
/**
* Gets Gets or sets the preferred language for the response..
*
diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java
index 8cdeadb8df60..a70dc9de8371 100644
--- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java
+++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/LuisRuntimeManager.java
@@ -7,7 +7,6 @@
package com.microsoft.azure.cognitiveservices.language.luis.runtime;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.implementation.LuisRuntimeAPIImpl;
-import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.AzureRegions;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import okhttp3.Interceptor;
@@ -24,13 +23,11 @@ public class LuisRuntimeManager {
/**
* Initializes an instance of Language Understanding (LUIS) Runtime API client.
*
- * @param region Supported Azure regions for Cognitive Services endpoints.
* @param subscriptionKey the Language Understanding (LUIS) Runtime API key
* @return the Language Understanding Runtime API client
*/
- public static LuisRuntimeAPI authenticate(AzureRegions region, String subscriptionKey) {
- return authenticate("https://{AzureRegion}.api.cognitive.microsoft.com/luis/v2.0/apps/", subscriptionKey)
- .withAzureRegion(region);
+ public static LuisRuntimeAPI authenticate(String subscriptionKey) {
+ return authenticate("https://api.cognitive.microsoft.com/luis/v2.0/", subscriptionKey);
}
/**
@@ -65,13 +62,11 @@ public Response intercept(Chain chain) throws IOException {
/**
* Initializes an instance of Language Understanding (LUIS) Runtime API client.
*
- * @param region Supported Azure regions for Cognitive Services endpoints.
* @param credentials the management credentials for Azure
* @return the Language Understanding (LUIS) Runtime API client
*/
- public static LuisRuntimeAPI authenticate(AzureRegions region, ServiceClientCredentials credentials) {
- return authenticate("https://{AzureRegion}.api.cognitive.microsoft.com/luis/v2.0/apps/", credentials)
- .withAzureRegion(region);
+ public static LuisRuntimeAPI authenticate(ServiceClientCredentials credentials) {
+ return authenticate("https://api.cognitive.microsoft.com/luis/v2.0/", credentials);
}
/**
diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/Predictions.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/Predictions.java
index aeb26a576e3a..76c3d6d1462d 100755
--- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/Predictions.java
+++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/Predictions.java
@@ -30,7 +30,7 @@ public interface Predictions {
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the LuisResult object if successful.
*/
-
+ @Deprecated
LuisResult resolve(String appId, String query, ResolveOptionalParameter resolveOptionalParameter);
/**
@@ -43,7 +43,7 @@ public interface Predictions {
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the LuisResult object
*/
-
+ @Deprecated
Observable resolveAsync(String appId, String query, ResolveOptionalParameter resolveOptionalParameter);
/**
diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/LuisRuntimeAPIImpl.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/LuisRuntimeAPIImpl.java
index fad2218eb896..391f1cc5d8a5 100644
--- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/LuisRuntimeAPIImpl.java
+++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/LuisRuntimeAPIImpl.java
@@ -11,7 +11,6 @@
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.LuisRuntimeAPI;
-import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.AzureRegions;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.Predictions;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
@@ -31,29 +30,6 @@ public AzureClient getAzureClient() {
return this.azureClient;
}
- /** Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'. */
- private AzureRegions azureRegion;
-
- /**
- * Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
- *
- * @return the azureRegion value.
- */
- public AzureRegions azureRegion() {
- return this.azureRegion;
- }
-
- /**
- * Sets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
- *
- * @param azureRegion the azureRegion value.
- * @return the service client itself
- */
- public LuisRuntimeAPIImpl withAzureRegion(AzureRegions azureRegion) {
- this.azureRegion = azureRegion;
- return this;
- }
-
/** Gets or sets the preferred language for the response. */
private String acceptLanguage;
@@ -142,7 +118,7 @@ public Predictions predictions() {
* @param credentials the management credentials for Azure
*/
public LuisRuntimeAPIImpl(ServiceClientCredentials credentials) {
- this("https://{AzureRegion}.api.cognitive.microsoft.com/luis/v2.0/apps", credentials);
+ this("https://api.cognitive.microsoft.com/luis/v2.0", credentials);
}
/**
@@ -181,6 +157,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "LuisRuntimeAPI", "v2.0 preview");
+ return String.format("%s (%s, %s)", super.userAgent(), "LuisRuntimeAPI", "2.0");
}
}
diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/PredictionsImpl.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/PredictionsImpl.java
index 31813ef4b6c4..bda630f0ca0d 100755
--- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/PredictionsImpl.java
+++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/PredictionsImpl.java
@@ -11,7 +11,6 @@
import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.ResolveOptionalParameter;
import retrofit2.Retrofit;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.Predictions;
-import com.google.common.base.Joiner;
import com.google.common.reflect.TypeToken;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.APIErrorException;
import com.microsoft.azure.cognitiveservices.language.luis.runtime.models.LuisResult;
@@ -57,8 +56,8 @@ public PredictionsImpl(Retrofit retrofit, LuisRuntimeAPIImpl client) {
*/
interface PredictionsService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.runtime.Predictions resolve" })
- @POST("{appId}")
- Observable> resolve(@Path("appId") String appId, @Body String query, @Query("timezoneOffset") Double timezoneOffset, @Query("verbose") Boolean verbose, @Query("staging") Boolean staging, @Query("spellCheck") Boolean spellCheck, @Query("bing-spell-check-subscription-key") String bingSpellCheckSubscriptionKey, @Query("log") Boolean log, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ @POST("apps/{appId}")
+ Observable> resolve(@Path("appId") String appId, @Body String query, @Query("timezoneOffset") Double timezoneOffset, @Query("verbose") Boolean verbose, @Query("staging") Boolean staging, @Query("spellCheck") Boolean spellCheck, @Query("bing-spell-check-subscription-key") String bingSpellCheckSubscriptionKey, @Query("log") Boolean log, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
}
@@ -120,9 +119,6 @@ public LuisResult call(ServiceResponse response) {
* @return the observable to the LuisResult object
*/
public Observable> resolveWithServiceResponseAsync(String appId, String query, ResolveOptionalParameter resolveOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
- }
if (appId == null) {
throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
}
@@ -154,17 +150,13 @@ public Observable> resolveWithServiceResponseAsync(S
* @return the observable to the LuisResult object
*/
public Observable> resolveWithServiceResponseAsync(String appId, String query, Double timezoneOffset, Boolean verbose, Boolean staging, Boolean spellCheck, String bingSpellCheckSubscriptionKey, Boolean log) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
- }
if (appId == null) {
throw new IllegalArgumentException("Parameter appId is required and cannot be null.");
}
if (query == null) {
throw new IllegalArgumentException("Parameter query is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
- return service.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
+ return service.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log, this.client.acceptLanguage(), this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
diff --git a/cognitiveservices/data-plane/language/textanalytics/pom.xml b/cognitiveservices/data-plane/language/textanalytics/pom.xml
index be225a8a9289..3f19296b1569 100755
--- a/cognitiveservices/data-plane/language/textanalytics/pom.xml
+++ b/cognitiveservices/data-plane/language/textanalytics/pom.xml
@@ -10,11 +10,11 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-textanalytics
- 1.0.1-beta
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Text Analytics
This package contains Microsoft Cognitive Service Text Analytics SDK.
diff --git a/cognitiveservices/data-plane/pom.xml b/cognitiveservices/data-plane/pom.xml
index 5d98292a6c7c..9736fb1b6ade 100755
--- a/cognitiveservices/data-plane/pom.xml
+++ b/cognitiveservices/data-plane/pom.xml
@@ -7,7 +7,7 @@
4.0.0
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
pom
Microsoft Azure Cognitive Services SDK Parent
@@ -300,6 +300,7 @@
./language/luis/authoring
./language/luis/runtime
./language/textanalytics
+ ./search/bingautosuggest
./search/bingcustomimagesearch
./search/bingcustomsearch
./search/bingentitysearch
@@ -310,6 +311,8 @@
./search/bingwebsearch
./vision/computervision
./vision/contentmoderator
+ ./vision/customvision/prediction
+ ./vision/customvision/training
./vision/faceapi
\ No newline at end of file
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/pom.xml b/cognitiveservices/data-plane/search/bingautosuggest/pom.xml
new file mode 100644
index 000000000000..115e1708562a
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/pom.xml
@@ -0,0 +1,89 @@
+
+
+ 4.0.0
+
+ com.microsoft.azure.cognitiveservices
+ azure-cognitiveservices-parent
+ 1.0.2
+ ../../pom.xml
+
+ azure-cognitiveservices-autosuggest
+ 1.0.2-beta
+ jar
+ Microsoft Azure SDK for Cognitive Services Auto Suggest
+ This package contains Microsoft Cognitive Service Auto Suggest SDK.
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingautosuggest
+
+
+ The MIT License (MIT)
+ http://opensource.org/licenses/MIT
+ repo
+
+
+
+ UTF-8
+
+
+
+
+ microsoft
+ Microsoft
+
+
+
+
+ ossrh
+ Sonatype Snapshots
+ https://oss.sonatype.org/content/repositories/snapshots/
+ true
+ default
+
+
+
+
+ com.microsoft.azure
+ azure-client-runtime
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-jar-plugin
+
+
+
+ true
+ true
+
+
+
+
+
+ org.codehaus.mojo
+ build-helper-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 2.8
+
+ *.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
+
+
+ /**
+
* Copyright (c) Microsoft Corporation. All rights reserved.
+
* Licensed under the MIT License. See License.txt in the project root for
+
* license information.
+
*/
+ ]]>
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearch.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearch.java
new file mode 100644
index 000000000000..5c6485bb8f70
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearch.java
@@ -0,0 +1,286 @@
+/**
+ * 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.search.autosuggest;
+
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.AutoSuggestOptionalParameter;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.ErrorResponseException;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.ResponseFormat;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.SafeSearch;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.Suggestions;
+import java.util.List;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in BingAutoSuggestSearch.
+ */
+public interface BingAutoSuggestSearch {
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section
+ * provides technical details about the query parameters and headers that you use to request suggestions and
+ * the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the Suggestions object if successful.
+ */
+ @Deprecated
+ Suggestions autoSuggest(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter);
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section
+ * provides technical details about the query parameters and headers that you use to request suggestions and
+ * the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter 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 Suggestions object
+ */
+ @Deprecated
+ Observable autoSuggestAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter);
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section
+ * provides technical details about the query parameters and headers that you use to request suggestions and
+ * the JSON response objects that contain them.
+ *
+ * @return the first stage of the autoSuggest call
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithQuery autoSuggest();
+
+ /**
+ * Grouping of autoSuggest definition stages.
+ */
+ interface BingAutoSuggestSearchAutoSuggestDefinitionStages {
+ /**
+ * The stage of the definition to be specify query.
+ */
+ interface WithQuery {
+ /**
+ * The user's search term.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withQuery(String query);
+ }
+
+ /**
+ * The stage of the definition which allows for any other optional settings to be specified.
+ */
+ interface WithAllOptions {
+ /**
+ * A comma-delimited list of one or more languages to use for user interface strings. The list is in decreasing
+ * order of preference. For additional information, including expected format, see
+ * [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This header and the setLang query
+ * parameter are mutually exclusive; do not specify both. If you set this header, you must also specify the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) query
+ * parameter. To determine the market to return results for, Bing uses the first supported language it finds
+ * from the list and combines it with the cc parameter value. If the list does not include a supported
+ * language, Bing finds the closest language and market that supports the request or it uses an aggregated or
+ * default market for the results. To determine the market that Bing used, see the BingAPIs-Market header. Use
+ * this header and the cc query parameter only if you specify multiple languages. Otherwise, use the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) and
+ [set* Lang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang)
+ * query parameters. A user interface string is a string that's used as a label in a user interface. There are
+ * few user interface strings in the JSON response objects. Any links to Bing.com properties in the response
+ * objects apply the specified language.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withAcceptLanguage(String acceptLanguage);
+
+ /**
+ * By default, Bing returns cached content, if available. To prevent Bing from returning cached content, set
+ * the Pragma header to no-cache (for example, Pragma: no-cache).
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withPragma(String pragma);
+
+ /**
+ * The user agent originating the request. Bing uses the user agent to provide mobile users with an optimized
+ * experience. Although optional, you are encouraged to always specify this header. The user-agent should be
+ * the same string that any commonly used browser sends. For information about user agents, see [RFC
+ * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following are examples of user-agent
+ * strings. Windows Phone: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+ * ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - I500 Build /
+ * GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla /
+ * 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142
+ * iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch;
+ * rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML,
+ * like Gecko) Version / 7.0 Mobile / 11A465 Safari / 9537.53.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withUserAgent(String userAgent);
+
+ /**
+ * Bing uses this header to provide users with consistent behavior across Bing API calls. Bing often flights
+ * new features and improvements, and it uses the client ID as a key for assigning traffic on different
+ * flights. If you do not use the same client ID for a user across multiple requests, then Bing may assign the
+ * user to multiple conflicting flights. Being assigned to multiple conflicting flights can lead to an
+ * inconsistent user experience. For example, if the second request has a different flight assignment than the
+ * first, the experience may be unexpected. Also, Bing can use the client ID to tailor web results to that
+ * client ID’s search history, providing a richer experience for the user. Bing also uses this header to help
+ * improve result rankings by analyzing the activity generated by a client ID. The relevance improvements help
+ * with better quality of results delivered by Bing APIs and in turn enables higher click-through rates for the
+ * API consumer. IMPORTANT: Although optional, you should consider this header required. Persisting the client
+ * ID across multiple requests for the same end user and device combination enables 1) the API consumer to
+ * receive a consistent user experience, and 2) higher click-through rates via better quality of results from
+ * the Bing APIs. Each user that uses your application on the device must have a unique, Bing generated client
+ * ID. If you do not include this header in the request, Bing generates an ID and returns it in the
+ * X-MSEdge-ClientID response header. The only time that you should NOT include this header in a request is the
+ * first time the user uses your app on that device. Use the client ID for each Bing API request that your app
+ * makes for this user on the device. Persist the client ID. To persist the ID in a browser app, use a
+ * persistent HTTP cookie to ensure the ID is used across all sessions. Do not use a session cookie. For other
+ * apps such as mobile apps, use the device's persistent storage to persist the ID. The next time the user uses
+ * your app on that device, get the client ID that you persisted. Bing responses may or may not include this
+ * header. If the response includes this header, capture the client ID and use it for all subsequent Bing
+ * requests for the user on that device. If you include the X-MSEdge-ClientID, you must not include cookies in
+ * the request.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withClientId(String clientId);
+
+ /**
+ * The IPv4 or IPv6 address of the client device. The IP address is used to discover the user's location. Bing
+ * uses the location information to determine safe search behavior. Although optional, you are encouraged to
+ * always specify this header and the X-Search-Location header. Do not obfuscate the address (for example, by
+ * changing the last octet to 0). Obfuscating the address results in the location not being anywhere near the
+ * device's actual location, which may result in Bing serving erroneous results.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withClientIp(String clientIp);
+
+ /**
+ * A semicolon-delimited list of key/value pairs that describe the client's geographical location. Bing uses
+ * the location information to determine safe search behavior and to return relevant local content. Specify the
+ * key/value pair as <key>:<value>. The following
+ * are the keys that you use to specify the user's location. lat (required): The latitude of the client's
+ * location, in degrees. The latitude must be greater than or equal to -90.0 and less than or equal to +90.0.
+ * Negative values indicate southern latitudes and positive values indicate northern latitudes. long
+ * (required): The longitude of the client's location, in degrees. The longitude must be greater than or equal
+ * to -180.0 and less than or equal to +180.0. Negative values indicate western longitudes and positive values
+ * indicate eastern longitudes. re (required): The radius, in meters, which specifies the horizontal accuracy
+ * of the coordinates. Pass the value returned by the device's location service. Typical values might be 22m
+ * for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP lookup. ts (optional): The UTC
+ * UNIX timestamp of when the client was at the location. (The UNIX timestamp is the number of seconds since
+ * January 1, 1970.) head (optional): The client's relative heading or direction of travel. Specify the
+ * direction of travel as degrees from 0 through 360, counting clockwise relative to true north. Specify this
+ * key only if the sp key is nonzero. sp (optional): The horizontal velocity (speed), in meters per second,
+ * that the client device is traveling. alt (optional): The altitude of the client device, in meters. are
+ * (optional): The radius, in meters, that specifies the vertical accuracy of the coordinates. Specify this key
+ * only if you specify the alt key. Although many of the keys are optional, the more information that you
+ * provide, the more accurate the location results are. Although optional, you are encouraged to always specify
+ * the user's geographical location. Providing the location is especially important if the client's IP address
+ * does not accurately reflect the user's physical location (for example, if the client uses VPN). For optimal
+ * results, you should include this header and the X-MSEdge-ClientIP header, but at a minimum, you should
+ * include this header.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withLocation(String location);
+
+ /**
+ * A 2-character country code of the country where the results come from. This API supports only the United
+ * States market. If you specify this query parameter, it must be set to us. If you set this parameter, you
+ * must also specify the Accept-Language header. Bing uses the first supported language it finds from the
+ * languages list, and combine that language with the country code that you specify to determine the market to
+ * return results for. If the languages list does not include a supported language, Bing finds the closest
+ * language and market that supports the request, or it may use an aggregated or default market for the results
+ * instead of a specified one. You should use this query parameter and the Accept-Language query parameter only
+ * if you specify multiple languages; otherwise, you should use the mkt and setLang query parameters. This
+ * parameter and the mkt query parameter are mutually exclusive—do not specify both.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withCountryCode(String countryCode);
+
+ /**
+ * The market where the results come from. You are strongly encouraged to always specify the market, if known.
+ * Specifying the market helps Bing route the request and return an appropriate and optimal response. This
+ * parameter and the cc query parameter are mutually exclusive—do not specify both.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withMarket(String market);
+
+ /**
+ * Filter suggestions for adult content. The following are the possible filter values. Off: Return suggestions
+ * with adult text, images, or videos. Moderate: Return suggestion with adult text but not adult images or
+ * videos. Strict: Do not return news articles with adult text, images, or videos. If the request comes from a
+ * market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value
+ * and uses Strict. If you use the site: query operator, there is the chance that the response may contain
+ * adult content regardless of what the safeSearch query parameter is set to. Use site: only if you are aware
+ * of the content on the site and your scenario supports the possibility of adult content. Possible values
+ * include: 'Off', 'Moderate', 'Strict'.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withSafeSearch(SafeSearch safeSearch);
+
+ /**
+ * The language to use for user interface strings. Specify the language using the ISO 639-1 2-letter language
+ * code. For example, the language code for English is EN. The default is EN (English). Although optional, you
+ * should always specify the language. Typically, you set setLang to the same language specified by mkt unless
+ * the user wants the user interface strings displayed in a different language. This parameter and the
+ * Accept-Language header are mutually exclusive; do not specify both. A user interface string is a string
+ * that's used as a label in a user interface. There are few user interface strings in the JSON response
+ * objects. Also, any links to Bing.com properties in the response objects apply the specified language.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withSetLang(String setLang);
+
+ /**
+ * The media type to use for the response. The following are the possible case-insensitive values: JSON,
+ * JSONLD. The default is JSON. If you specify JSONLD, the response body includes JSON-LD objects that contain
+ * the search results.
+ *
+ * @return next definition stage
+ */
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute withResponseFormat(List responseFormat);
+
+ }
+
+ /**
+ * The last stage of the definition which will make the operation call.
+ */
+ interface WithExecute extends BingAutoSuggestSearchAutoSuggestDefinitionStages.WithAllOptions {
+ /**
+ * Execute the request.
+ *
+ * @return the Suggestions object if successful.
+ */
+ Suggestions execute();
+
+ /**
+ * Execute the request asynchronously.
+ *
+ * @return the observable to the Suggestions object
+ */
+ Observable executeAsync();
+ }
+ }
+
+ /**
+ * The entirety of autoSuggest definition.
+ */
+ interface BingAutoSuggestSearchAutoSuggestDefinition extends
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithQuery,
+ BingAutoSuggestSearchAutoSuggestDefinitionStages.WithExecute {
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchAPI.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchAPI.java
new file mode 100644
index 000000000000..2b9d34807b2b
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchAPI.java
@@ -0,0 +1,89 @@
+/**
+ * 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.search.autosuggest;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.rest.RestClient;
+
+/**
+ * The interface for BingAutoSuggestSearchAPI class.
+ */
+public interface BingAutoSuggestSearchAPI {
+ /**
+ * Gets the REST client.
+ *
+ * @return the {@link RestClient} object.
+ */
+ RestClient restClient();
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ AzureClient getAzureClient();
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ String userAgent();
+
+ /**
+ * Gets Gets or sets the preferred language for the response..
+ *
+ * @return the acceptLanguage value.
+ */
+ String acceptLanguage();
+
+ /**
+ * Sets Gets or sets the preferred language for the response..
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ BingAutoSuggestSearchAPI withAcceptLanguage(String acceptLanguage);
+
+ /**
+ * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ int longRunningOperationRetryTimeout();
+
+ /**
+ * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ BingAutoSuggestSearchAPI withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);
+
+ /**
+ * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
+ *
+ * @return the generateClientRequestId value.
+ */
+ boolean generateClientRequestId();
+
+ /**
+ * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ BingAutoSuggestSearchAPI withGenerateClientRequestId(boolean generateClientRequestId);
+
+ /**
+ * Gets the BingAutoSuggestSearch object to access its operations.
+ * @return the BingAutoSuggestSearch object.
+ */
+ BingAutoSuggestSearch bingAutoSuggestSearch();
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchManager.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchManager.java
new file mode 100644
index 000000000000..aebe947e10ca
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/BingAutoSuggestSearchManager.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.cognitiveservices.search.autosuggest;
+
+import com.microsoft.azure.cognitiveservices.search.autosuggest.implementation.BingAutoSuggestSearchAPIImpl;
+import com.microsoft.rest.RestClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import okhttp3.Interceptor;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+
+import java.io.IOException;
+
+/**
+ * Entry point to Azure Cognitive Services Bing Auto Suggest Search manager.
+ */
+public class BingAutoSuggestSearchManager {
+ /**
+ * Initializes an instance of Bing Auto Suggest Search API client.
+ *
+ * @param subscriptionKey the Bing Search API key
+ * @return the Bing Custom Search API client
+ */
+ public static BingAutoSuggestSearchAPI authenticate(String subscriptionKey) {
+ return authenticate("https://api.cognitive.microsoft.com/bing/v7.0/", subscriptionKey);
+ }
+
+ /**
+ * Initializes an instance of Bing Auto Suggest Search API client.
+ *
+ * @param baseUrl the base URL of the service
+ * @param subscriptionKey the Bing Search API key
+ * @return the Bing Custom Search API client
+ */
+ public static BingAutoSuggestSearchAPI authenticate(String baseUrl, final String subscriptionKey) {
+ ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
+ @Override
+ public void applyCredentialsFilter(OkHttpClient.Builder builder) {
+ builder.addNetworkInterceptor(
+ new Interceptor() {
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ Request request = null;
+ Request original = chain.request();
+ // Request customization: add request headers
+ Request.Builder requestBuilder = original.newBuilder()
+ .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey);
+ request = requestBuilder.build();
+ return chain.proceed(request);
+ }
+ });
+ }
+ };
+ return authenticate(baseUrl, serviceClientCredentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Auto Suggest Search API client.
+ *
+ * @param credentials the management credentials for Azure
+ * @return the Bing Auto Suggest Search API client
+ */
+ public static BingAutoSuggestSearchAPI authenticate(ServiceClientCredentials credentials) {
+ return authenticate("https://api.cognitive.microsoft.com/bing/v7.0/", credentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Auto Suggest Search API client.
+ *
+ * @param baseUrl the base URL of the service
+ * @param credentials the management credentials for Azure
+ * @return the Bing Custom Image Search API client
+ */
+ public static BingAutoSuggestSearchAPI authenticate(String baseUrl, ServiceClientCredentials credentials) {
+ return new BingAutoSuggestSearchAPIImpl(baseUrl, credentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Auto Suggest Search API client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ * @return the Bing Custom Image Search API client
+ */
+ public static BingAutoSuggestSearchAPI authenticate(RestClient restClient) {
+ return new BingAutoSuggestSearchAPIImpl(restClient);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchAPIImpl.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchAPIImpl.java
new file mode 100644
index 000000000000..001edc324aa5
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchAPIImpl.java
@@ -0,0 +1,162 @@
+/**
+ * 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.search.autosuggest.implementation;
+
+import com.microsoft.azure.AzureClient;
+import com.microsoft.azure.AzureServiceClient;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearch;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearchAPI;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import com.microsoft.rest.RestClient;
+
+/**
+ * Initializes a new instance of the BingAutoSuggestSearchAPIImpl class.
+ */
+public class BingAutoSuggestSearchAPIImpl extends AzureServiceClient implements BingAutoSuggestSearchAPI {
+ /** the {@link AzureClient} used for long running operations. */
+ private AzureClient azureClient;
+
+ /**
+ * Gets the {@link AzureClient} used for long running operations.
+ * @return the azure client;
+ */
+ public AzureClient getAzureClient() {
+ return this.azureClient;
+ }
+
+ /** Gets or sets the preferred language for the response. */
+ private String acceptLanguage;
+
+ /**
+ * Gets Gets or sets the preferred language for the response.
+ *
+ * @return the acceptLanguage value.
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Sets Gets or sets the preferred language for the response.
+ *
+ * @param acceptLanguage the acceptLanguage value.
+ * @return the service client itself
+ */
+ public BingAutoSuggestSearchAPIImpl withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /** Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30. */
+ private int longRunningOperationRetryTimeout;
+
+ /**
+ * Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @return the longRunningOperationRetryTimeout value.
+ */
+ public int longRunningOperationRetryTimeout() {
+ return this.longRunningOperationRetryTimeout;
+ }
+
+ /**
+ * Sets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30.
+ *
+ * @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
+ * @return the service client itself
+ */
+ public BingAutoSuggestSearchAPIImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
+ return this;
+ }
+
+ /** When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true. */
+ private boolean generateClientRequestId;
+
+ /**
+ * Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @return the generateClientRequestId value.
+ */
+ public boolean generateClientRequestId() {
+ return this.generateClientRequestId;
+ }
+
+ /**
+ * Sets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true.
+ *
+ * @param generateClientRequestId the generateClientRequestId value.
+ * @return the service client itself
+ */
+ public BingAutoSuggestSearchAPIImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ this.generateClientRequestId = generateClientRequestId;
+ return this;
+ }
+
+ /**
+ * The BingAutoSuggestSearch object to access its operations.
+ */
+ private BingAutoSuggestSearch bingAutoSuggestSearch;
+
+ /**
+ * Gets the BingAutoSuggestSearch object to access its operations.
+ * @return the BingAutoSuggestSearch object.
+ */
+ public BingAutoSuggestSearch bingAutoSuggestSearch() {
+ return this.bingAutoSuggestSearch;
+ }
+
+ /**
+ * Initializes an instance of BingAutoSuggestSearchAPI client.
+ *
+ * @param credentials the management credentials for Azure
+ */
+ public BingAutoSuggestSearchAPIImpl(ServiceClientCredentials credentials) {
+ this("https://api.cognitive.microsoft.com/bing/v7.0", credentials);
+ }
+
+ /**
+ * Initializes an instance of BingAutoSuggestSearchAPI client.
+ *
+ * @param baseUrl the base URL of the host
+ * @param credentials the management credentials for Azure
+ */
+ public BingAutoSuggestSearchAPIImpl(String baseUrl, ServiceClientCredentials credentials) {
+ super(baseUrl, credentials);
+ initialize();
+ }
+
+ /**
+ * Initializes an instance of BingAutoSuggestSearchAPI client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ */
+ public BingAutoSuggestSearchAPIImpl(RestClient restClient) {
+ super(restClient);
+ initialize();
+ }
+
+ protected void initialize() {
+ this.acceptLanguage = "en-US";
+ this.longRunningOperationRetryTimeout = 30;
+ this.generateClientRequestId = true;
+ this.bingAutoSuggestSearch = new BingAutoSuggestSearchImpl(restClient().retrofit(), this);
+ this.azureClient = new AzureClient(this);
+ }
+
+ /**
+ * Gets the User-Agent header for the client.
+ *
+ * @return the user agent string.
+ */
+ @Override
+ public String userAgent() {
+ return String.format("%s (%s, %s)", super.userAgent(), "BingAutoSuggestSearchAPI", "1.0");
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchImpl.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchImpl.java
new file mode 100644
index 000000000000..01a322eaef73
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/BingAutoSuggestSearchImpl.java
@@ -0,0 +1,304 @@
+/**
+ * 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.search.autosuggest.implementation;
+
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.AutoSuggestOptionalParameter;
+import retrofit2.Retrofit;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearch;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.ErrorResponseException;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.ResponseFormat;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.SafeSearch;
+import com.microsoft.azure.cognitiveservices.search.autosuggest.models.Suggestions;
+import com.microsoft.rest.CollectionFormat;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import java.util.List;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in BingAutoSuggestSearch.
+ */
+public class BingAutoSuggestSearchImpl implements BingAutoSuggestSearch {
+ /** The Retrofit service to perform REST calls. */
+ private BingAutoSuggestSearchService service;
+ /** The service client containing this operation class. */
+ private BingAutoSuggestSearchAPIImpl client;
+
+ /**
+ * Initializes an instance of BingAutoSuggestSearchImpl.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public BingAutoSuggestSearchImpl(Retrofit retrofit, BingAutoSuggestSearchAPIImpl client) {
+ this.service = retrofit.create(BingAutoSuggestSearchService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for BingAutoSuggestSearch to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface BingAutoSuggestSearchService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.search.autosuggest.BingAutoSuggestSearch autoSuggest" })
+ @GET("Suggestions")
+ Observable> autoSuggest(@Header("X-BingApis-SDK") String xBingApisSDK, @Header("Accept-Language") String acceptLanguage, @Header("Pragma") String pragma, @Header("User-Agent") String userAgent, @Header("X-MSEdge-ClientID") String clientId, @Header("X-MSEdge-ClientIP") String clientIp, @Header("X-Search-Location") String location, @Query("cc") String countryCode, @Query("mkt") String market, @Query("q") String query, @Query("safeSearch") SafeSearch safeSearch, @Query("setLang") String setLang, @Query("ResponseFormat") String responseFormat);
+
+ }
+
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ErrorResponseException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the Suggestions object if successful.
+ */
+ public Suggestions autoSuggest(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
+ return autoSuggestWithServiceResponseAsync(query, autoSuggestOptionalParameter).toBlocking().single().body();
+ }
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter 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 autoSuggestAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(autoSuggestWithServiceResponseAsync(query, autoSuggestOptionalParameter), serviceCallback);
+ }
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter 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 Suggestions object
+ */
+ public Observable autoSuggestAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
+ return autoSuggestWithServiceResponseAsync(query, autoSuggestOptionalParameter).map(new Func1, Suggestions>() {
+ @Override
+ public Suggestions call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param autoSuggestOptionalParameter 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 Suggestions object
+ */
+ public Observable> autoSuggestWithServiceResponseAsync(String query, AutoSuggestOptionalParameter autoSuggestOptionalParameter) {
+ if (query == null) {
+ throw new IllegalArgumentException("Parameter query is required and cannot be null.");
+ }
+ final String acceptLanguage = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.acceptLanguage() : null;
+ final String pragma = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.pragma() : null;
+ final String userAgent = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.userAgent() : this.client.userAgent();
+ final String clientId = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.clientId() : null;
+ final String clientIp = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.clientIp() : null;
+ final String location = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.location() : null;
+ final String countryCode = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.countryCode() : null;
+ final String market = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.market() : null;
+ final SafeSearch safeSearch = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.safeSearch() : null;
+ final String setLang = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.setLang() : null;
+ final List responseFormat = autoSuggestOptionalParameter != null ? autoSuggestOptionalParameter.responseFormat() : null;
+
+ return autoSuggestWithServiceResponseAsync(query, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, safeSearch, setLang, responseFormat);
+ }
+
+ /**
+ * The AutoSuggest API lets you send a search query to Bing and get back a list of suggestions. This section provides technical details about the query parameters and headers that you use to request suggestions and the JSON response objects that contain them.
+ *
+ * @param query The user's search term.
+ * @param acceptLanguage A comma-delimited list of one or more languages to use for user interface strings. The list is in decreasing order of preference. For additional information, including expected format, see [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This header and the setLang query parameter are mutually exclusive; do not specify both. If you set this header, you must also specify the [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc) query parameter. To determine the market to return results for, Bing uses the first supported language it finds from the list and combines it with the cc parameter value. If the list does not include a supported language, Bing finds the closest language and market that supports the request or it uses an aggregated or default market for the results. To determine the market that Bing used, see the BingAPIs-Market header. Use this header and the cc query parameter only if you specify multiple languages. Otherwise, use the [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt) and [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang) query parameters. A user interface string is a string that's used as a label in a user interface. There are few user interface strings in the JSON response objects. Any links to Bing.com properties in the response objects apply the specified language.
+ * @param pragma By default, Bing returns cached content, if available. To prevent Bing from returning cached content, set the Pragma header to no-cache (for example, Pragma: no-cache).
+ * @param userAgent The user agent originating the request. Bing uses the user agent to provide mobile users with an optimized experience. Although optional, you are encouraged to always specify this header. The user-agent should be the same string that any commonly used browser sends. For information about user agents, see [RFC 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The following are examples of user-agent strings. Windows Phone: Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android 2.3.5; en - us; SCH - I500 Build / GINGERBREAD) AppleWebKit / 533.1 (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla / 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26 (KHTML; like Gecko) Mobile / 10B142 iPhone4; 1 BingWeb / 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident / 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0 like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version / 7.0 Mobile / 11A465 Safari / 9537.53
+ * @param clientId Bing uses this header to provide users with consistent behavior across Bing API calls. Bing often flights new features and improvements, and it uses the client ID as a key for assigning traffic on different flights. If you do not use the same client ID for a user across multiple requests, then Bing may assign the user to multiple conflicting flights. Being assigned to multiple conflicting flights can lead to an inconsistent user experience. For example, if the second request has a different flight assignment than the first, the experience may be unexpected. Also, Bing can use the client ID to tailor web results to that client ID’s search history, providing a richer experience for the user. Bing also uses this header to help improve result rankings by analyzing the activity generated by a client ID. The relevance improvements help with better quality of results delivered by Bing APIs and in turn enables higher click-through rates for the API consumer. IMPORTANT: Although optional, you should consider this header required. Persisting the client ID across multiple requests for the same end user and device combination enables 1) the API consumer to receive a consistent user experience, and 2) higher click-through rates via better quality of results from the Bing APIs. Each user that uses your application on the device must have a unique, Bing generated client ID. If you do not include this header in the request, Bing generates an ID and returns it in the X-MSEdge-ClientID response header. The only time that you should NOT include this header in a request is the first time the user uses your app on that device. Use the client ID for each Bing API request that your app makes for this user on the device. Persist the client ID. To persist the ID in a browser app, use a persistent HTTP cookie to ensure the ID is used across all sessions. Do not use a session cookie. For other apps such as mobile apps, use the device's persistent storage to persist the ID. The next time the user uses your app on that device, get the client ID that you persisted. Bing responses may or may not include this header. If the response includes this header, capture the client ID and use it for all subsequent Bing requests for the user on that device. If you include the X-MSEdge-ClientID, you must not include cookies in the request.
+ * @param clientIp The IPv4 or IPv6 address of the client device. The IP address is used to discover the user's location. Bing uses the location information to determine safe search behavior. Although optional, you are encouraged to always specify this header and the X-Search-Location header. Do not obfuscate the address (for example, by changing the last octet to 0). Obfuscating the address results in the location not being anywhere near the device's actual location, which may result in Bing serving erroneous results.
+ * @param location A semicolon-delimited list of key/value pairs that describe the client's geographical location. Bing uses the location information to determine safe search behavior and to return relevant local content. Specify the key/value pair as <key>:<value>. The following are the keys that you use to specify the user's location. lat (required): The latitude of the client's location, in degrees. The latitude must be greater than or equal to -90.0 and less than or equal to +90.0. Negative values indicate southern latitudes and positive values indicate northern latitudes. long (required): The longitude of the client's location, in degrees. The longitude must be greater than or equal to -180.0 and less than or equal to +180.0. Negative values indicate western longitudes and positive values indicate eastern longitudes. re (required): The radius, in meters, which specifies the horizontal accuracy of the coordinates. Pass the value returned by the device's location service. Typical values might be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and 18,000m for reverse IP lookup. ts (optional): The UTC UNIX timestamp of when the client was at the location. (The UNIX timestamp is the number of seconds since January 1, 1970.) head (optional): The client's relative heading or direction of travel. Specify the direction of travel as degrees from 0 through 360, counting clockwise relative to true north. Specify this key only if the sp key is nonzero. sp (optional): The horizontal velocity (speed), in meters per second, that the client device is traveling. alt (optional): The altitude of the client device, in meters. are (optional): The radius, in meters, that specifies the vertical accuracy of the coordinates. Specify this key only if you specify the alt key. Although many of the keys are optional, the more information that you provide, the more accurate the location results are. Although optional, you are encouraged to always specify the user's geographical location. Providing the location is especially important if the client's IP address does not accurately reflect the user's physical location (for example, if the client uses VPN). For optimal results, you should include this header and the X-MSEdge-ClientIP header, but at a minimum, you should include this header.
+ * @param countryCode A 2-character country code of the country where the results come from. This API supports only the United States market. If you specify this query parameter, it must be set to us. If you set this parameter, you must also specify the Accept-Language header. Bing uses the first supported language it finds from the languages list, and combine that language with the country code that you specify to determine the market to return results for. If the languages list does not include a supported language, Bing finds the closest language and market that supports the request, or it may use an aggregated or default market for the results instead of a specified one. You should use this query parameter and the Accept-Language query parameter only if you specify multiple languages; otherwise, you should use the mkt and setLang query parameters. This parameter and the mkt query parameter are mutually exclusive—do not specify both.
+ * @param market The market where the results come from. You are strongly encouraged to always specify the market, if known. Specifying the market helps Bing route the request and return an appropriate and optimal response. This parameter and the cc query parameter are mutually exclusive—do not specify both.
+ * @param safeSearch Filter suggestions for adult content. The following are the possible filter values. Off: Return suggestions with adult text, images, or videos. Moderate: Return suggestion with adult text but not adult images or videos. Strict: Do not return news articles with adult text, images, or videos. If the request comes from a market that Bing's adult policy requires that safeSearch is set to Strict, Bing ignores the safeSearch value and uses Strict. If you use the site: query operator, there is the chance that the response may contain adult content regardless of what the safeSearch query parameter is set to. Use site: only if you are aware of the content on the site and your scenario supports the possibility of adult content. Possible values include: 'Off', 'Moderate', 'Strict'
+ * @param setLang The language to use for user interface strings. Specify the language using the ISO 639-1 2-letter language code. For example, the language code for English is EN. The default is EN (English). Although optional, you should always specify the language. Typically, you set setLang to the same language specified by mkt unless the user wants the user interface strings displayed in a different language. This parameter and the Accept-Language header are mutually exclusive; do not specify both. A user interface string is a string that's used as a label in a user interface. There are few user interface strings in the JSON response objects. Also, any links to Bing.com properties in the response objects apply the specified language.
+ * @param responseFormat The media type to use for the response. The following are the possible case-insensitive values: JSON, JSONLD. The default is JSON. If you specify JSONLD, the response body includes JSON-LD objects that contain the search results.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the Suggestions object
+ */
+ public Observable> autoSuggestWithServiceResponseAsync(String query, String acceptLanguage, String pragma, String userAgent, String clientId, String clientIp, String location, String countryCode, String market, SafeSearch safeSearch, String setLang, List responseFormat) {
+ if (query == null) {
+ throw new IllegalArgumentException("Parameter query is required and cannot be null.");
+ }
+ Validator.validate(responseFormat);
+ final String xBingApisSDK = "true";
+ String responseFormatConverted = this.client.serializerAdapter().serializeList(responseFormat, CollectionFormat.CSV);
+ return service.autoSuggest(xBingApisSDK, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, query, safeSearch, setLang, responseFormatConverted)
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = autoSuggestDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse autoSuggestDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ErrorResponseException.class)
+ .build(response);
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters autoSuggest() {
+ return new BingAutoSuggestSearchAutoSuggestParameters(this);
+ }
+
+ /**
+ * Internal class implementing BingAutoSuggestSearchAutoSuggestDefinition.
+ */
+ class BingAutoSuggestSearchAutoSuggestParameters implements BingAutoSuggestSearchAutoSuggestDefinition {
+ private BingAutoSuggestSearchImpl parent;
+ private String query;
+ private String acceptLanguage;
+ private String pragma;
+ private String userAgent;
+ private String clientId;
+ private String clientIp;
+ private String location;
+ private String countryCode;
+ private String market;
+ private SafeSearch safeSearch;
+ private String setLang;
+ private List responseFormat;
+
+ /**
+ * Constructor.
+ * @param parent the parent object.
+ */
+ BingAutoSuggestSearchAutoSuggestParameters(BingAutoSuggestSearchImpl parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withQuery(String query) {
+ this.query = query;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withPragma(String pragma) {
+ this.pragma = pragma;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withClientId(String clientId) {
+ this.clientId = clientId;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withClientIp(String clientIp) {
+ this.clientIp = clientIp;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withMarket(String market) {
+ this.market = market;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withSafeSearch(SafeSearch safeSearch) {
+ this.safeSearch = safeSearch;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withSetLang(String setLang) {
+ this.setLang = setLang;
+ return this;
+ }
+
+ @Override
+ public BingAutoSuggestSearchAutoSuggestParameters withResponseFormat(List responseFormat) {
+ this.responseFormat = responseFormat;
+ return this;
+ }
+
+ @Override
+ public Suggestions execute() {
+ return autoSuggestWithServiceResponseAsync(query, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, safeSearch, setLang, responseFormat).toBlocking().single().body();
+ }
+
+ @Override
+ public Observable executeAsync() {
+ return autoSuggestWithServiceResponseAsync(query, acceptLanguage, pragma, userAgent, clientId, clientIp, location, countryCode, market, safeSearch, setLang, responseFormat).map(new Func1, Suggestions>() {
+ @Override
+ public Suggestions call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/package-info.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/package-info.java
new file mode 100644
index 000000000000..0611f6894deb
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/implementation/package-info.java
@@ -0,0 +1,11 @@
+// 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.
+
+/**
+ * This package contains the implementation classes for BingAutoSuggestSearchAPI.
+ * The AutoSuggest Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the web for AutoSuggest](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference).
+ */
+package com.microsoft.azure.cognitiveservices.search.autosuggest.implementation;
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Action.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Action.java
new file mode 100644
index 000000000000..1ecb70dce45b
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Action.java
@@ -0,0 +1,86 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * The Action model.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Action.class)
+@JsonTypeName("Action")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "SearchAction", value = SearchAction.class)
+})
+public class Action extends CreativeWork {
+ /**
+ * The result property.
+ */
+ @JsonProperty(value = "result", access = JsonProperty.Access.WRITE_ONLY)
+ private List result;
+
+ /**
+ * The displayName property.
+ */
+ @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /**
+ * The isTopAction property.
+ */
+ @JsonProperty(value = "isTopAction", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isTopAction;
+
+ /**
+ * The serviceUrl property.
+ */
+ @JsonProperty(value = "serviceUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String serviceUrl;
+
+ /**
+ * Get the result value.
+ *
+ * @return the result value
+ */
+ public List result() {
+ return this.result;
+ }
+
+ /**
+ * Get the displayName value.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the isTopAction value.
+ *
+ * @return the isTopAction value
+ */
+ public Boolean isTopAction() {
+ return this.isTopAction;
+ }
+
+ /**
+ * Get the serviceUrl value.
+ *
+ * @return the serviceUrl value
+ */
+ public String serviceUrl() {
+ return this.serviceUrl;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Answer.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Answer.java
new file mode 100644
index 000000000000..ae1eb42c3950
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Answer.java
@@ -0,0 +1,24 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Defines an answer.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Answer.class)
+@JsonTypeName("Answer")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "SearchResultsAnswer", value = SearchResultsAnswer.class)
+})
+public class Answer extends Response {
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/AutoSuggestOptionalParameter.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/AutoSuggestOptionalParameter.java
new file mode 100644
index 000000000000..89b563796edc
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/AutoSuggestOptionalParameter.java
@@ -0,0 +1,444 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+
+/**
+ * The AutoSuggestOptionalParameter model.
+ */
+public class AutoSuggestOptionalParameter {
+ /**
+ * A comma-delimited list of one or more languages to use for user
+ * interface strings. The list is in decreasing order of preference. For
+ * additional information, including expected format, see
+ * [RFC2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). This
+ * header and the setLang query parameter are mutually exclusive; do not
+ * specify both. If you set this header, you must also specify the
+ * [cc](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#cc)
+ * query parameter. To determine the market to return results for, Bing
+ * uses the first supported language it finds from the list and combines it
+ * with the cc parameter value. If the list does not include a supported
+ * language, Bing finds the closest language and market that supports the
+ * request or it uses an aggregated or default market for the results. To
+ * determine the market that Bing used, see the BingAPIs-Market header. Use
+ * this header and the cc query parameter only if you specify multiple
+ * languages. Otherwise, use the
+ * [mkt](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#mkt)
+ * and
+ * [setLang](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference#setlang)
+ * query parameters. A user interface string is a string that's used as a
+ * label in a user interface. There are few user interface strings in the
+ * JSON response objects. Any links to Bing.com properties in the response
+ * objects apply the specified language.
+ */
+ private String acceptLanguage;
+
+ /**
+ * By default, Bing returns cached content, if available. To prevent Bing
+ * from returning cached content, set the Pragma header to no-cache (for
+ * example, Pragma: no-cache).
+ */
+ private String pragma;
+
+ /**
+ * The user agent originating the request. Bing uses the user agent to
+ * provide mobile users with an optimized experience. Although optional,
+ * you are encouraged to always specify this header. The user-agent should
+ * be the same string that any commonly used browser sends. For information
+ * about user agents, see [RFC
+ * 2616](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html). The
+ * following are examples of user-agent strings. Windows Phone: Mozilla/5.0
+ * (compatible; MSIE 10.0; Windows Phone 8.0; Trident/6.0; IEMobile/10.0;
+ * ARM; Touch; NOKIA; Lumia 822). Android: Mozilla / 5.0 (Linux; U; Android
+ * 2.3.5; en - us; SCH - I500 Build / GINGERBREAD) AppleWebKit / 533.1
+ * (KHTML; like Gecko) Version / 4.0 Mobile Safari / 533.1. iPhone: Mozilla
+ * / 5.0 (iPhone; CPU iPhone OS 6_1 like Mac OS X) AppleWebKit / 536.26
+ * (KHTML; like Gecko) Mobile / 10B142 iPhone4; 1 BingWeb /
+ * 3.03.1428.20120423. PC: Mozilla / 5.0 (Windows NT 6.3; WOW64; Trident /
+ * 7.0; Touch; rv:11.0) like Gecko. iPad: Mozilla / 5.0 (iPad; CPU OS 7_0
+ * like Mac OS X) AppleWebKit / 537.51.1 (KHTML, like Gecko) Version / 7.0
+ * Mobile / 11A465 Safari / 9537.53.
+ */
+ private String userAgent;
+
+ /**
+ * Bing uses this header to provide users with consistent behavior across
+ * Bing API calls. Bing often flights new features and improvements, and it
+ * uses the client ID as a key for assigning traffic on different flights.
+ * If you do not use the same client ID for a user across multiple
+ * requests, then Bing may assign the user to multiple conflicting flights.
+ * Being assigned to multiple conflicting flights can lead to an
+ * inconsistent user experience. For example, if the second request has a
+ * different flight assignment than the first, the experience may be
+ * unexpected. Also, Bing can use the client ID to tailor web results to
+ * that client ID’s search history, providing a richer experience for the
+ * user. Bing also uses this header to help improve result rankings by
+ * analyzing the activity generated by a client ID. The relevance
+ * improvements help with better quality of results delivered by Bing APIs
+ * and in turn enables higher click-through rates for the API consumer.
+ * IMPORTANT: Although optional, you should consider this header required.
+ * Persisting the client ID across multiple requests for the same end user
+ * and device combination enables 1) the API consumer to receive a
+ * consistent user experience, and 2) higher click-through rates via better
+ * quality of results from the Bing APIs. Each user that uses your
+ * application on the device must have a unique, Bing generated client ID.
+ * If you do not include this header in the request, Bing generates an ID
+ * and returns it in the X-MSEdge-ClientID response header. The only time
+ * that you should NOT include this header in a request is the first time
+ * the user uses your app on that device. Use the client ID for each Bing
+ * API request that your app makes for this user on the device. Persist the
+ * client ID. To persist the ID in a browser app, use a persistent HTTP
+ * cookie to ensure the ID is used across all sessions. Do not use a
+ * session cookie. For other apps such as mobile apps, use the device's
+ * persistent storage to persist the ID. The next time the user uses your
+ * app on that device, get the client ID that you persisted. Bing responses
+ * may or may not include this header. If the response includes this
+ * header, capture the client ID and use it for all subsequent Bing
+ * requests for the user on that device. If you include the
+ * X-MSEdge-ClientID, you must not include cookies in the request.
+ */
+ private String clientId;
+
+ /**
+ * The IPv4 or IPv6 address of the client device. The IP address is used to
+ * discover the user's location. Bing uses the location information to
+ * determine safe search behavior. Although optional, you are encouraged to
+ * always specify this header and the X-Search-Location header. Do not
+ * obfuscate the address (for example, by changing the last octet to 0).
+ * Obfuscating the address results in the location not being anywhere near
+ * the device's actual location, which may result in Bing serving erroneous
+ * results.
+ */
+ private String clientIp;
+
+ /**
+ * A semicolon-delimited list of key/value pairs that describe the client's
+ * geographical location. Bing uses the location information to determine
+ * safe search behavior and to return relevant local content. Specify the
+ * key/value pair as <key>:<value>. The following are the keys
+ * that you use to specify the user's location. lat (required): The
+ * latitude of the client's location, in degrees. The latitude must be
+ * greater than or equal to -90.0 and less than or equal to +90.0. Negative
+ * values indicate southern latitudes and positive values indicate northern
+ * latitudes. long (required): The longitude of the client's location, in
+ * degrees. The longitude must be greater than or equal to -180.0 and less
+ * than or equal to +180.0. Negative values indicate western longitudes and
+ * positive values indicate eastern longitudes. re (required): The radius,
+ * in meters, which specifies the horizontal accuracy of the coordinates.
+ * Pass the value returned by the device's location service. Typical values
+ * might be 22m for GPS/Wi-Fi, 380m for cell tower triangulation, and
+ * 18,000m for reverse IP lookup. ts (optional): The UTC UNIX timestamp of
+ * when the client was at the location. (The UNIX timestamp is the number
+ * of seconds since January 1, 1970.) head (optional): The client's
+ * relative heading or direction of travel. Specify the direction of travel
+ * as degrees from 0 through 360, counting clockwise relative to true
+ * north. Specify this key only if the sp key is nonzero. sp (optional):
+ * The horizontal velocity (speed), in meters per second, that the client
+ * device is traveling. alt (optional): The altitude of the client device,
+ * in meters. are (optional): The radius, in meters, that specifies the
+ * vertical accuracy of the coordinates. Specify this key only if you
+ * specify the alt key. Although many of the keys are optional, the more
+ * information that you provide, the more accurate the location results
+ * are. Although optional, you are encouraged to always specify the user's
+ * geographical location. Providing the location is especially important if
+ * the client's IP address does not accurately reflect the user's physical
+ * location (for example, if the client uses VPN). For optimal results, you
+ * should include this header and the X-MSEdge-ClientIP header, but at a
+ * minimum, you should include this header.
+ */
+ private String location;
+
+ /**
+ * A 2-character country code of the country where the results come from.
+ * This API supports only the United States market. If you specify this
+ * query parameter, it must be set to us. If you set this parameter, you
+ * must also specify the Accept-Language header. Bing uses the first
+ * supported language it finds from the languages list, and combine that
+ * language with the country code that you specify to determine the market
+ * to return results for. If the languages list does not include a
+ * supported language, Bing finds the closest language and market that
+ * supports the request, or it may use an aggregated or default market for
+ * the results instead of a specified one. You should use this query
+ * parameter and the Accept-Language query parameter only if you specify
+ * multiple languages; otherwise, you should use the mkt and setLang query
+ * parameters. This parameter and the mkt query parameter are mutually
+ * exclusive—do not specify both.
+ */
+ private String countryCode;
+
+ /**
+ * The market where the results come from. You are strongly encouraged to
+ * always specify the market, if known. Specifying the market helps Bing
+ * route the request and return an appropriate and optimal response. This
+ * parameter and the cc query parameter are mutually exclusive—do not
+ * specify both.
+ */
+ private String market;
+
+ /**
+ * Filter suggestions for adult content. The following are the possible
+ * filter values. Off: Return suggestions with adult text, images, or
+ * videos. Moderate: Return suggestion with adult text but not adult images
+ * or videos. Strict: Do not return news articles with adult text, images,
+ * or videos. If the request comes from a market that Bing's adult policy
+ * requires that safeSearch is set to Strict, Bing ignores the safeSearch
+ * value and uses Strict. If you use the site: query operator, there is the
+ * chance that the response may contain adult content regardless of what
+ * the safeSearch query parameter is set to. Use site: only if you are
+ * aware of the content on the site and your scenario supports the
+ * possibility of adult content. Possible values include: 'Off',
+ * 'Moderate', 'Strict'.
+ */
+ private SafeSearch safeSearch;
+
+ /**
+ * The language to use for user interface strings. Specify the language
+ * using the ISO 639-1 2-letter language code. For example, the language
+ * code for English is EN. The default is EN (English). Although optional,
+ * you should always specify the language. Typically, you set setLang to
+ * the same language specified by mkt unless the user wants the user
+ * interface strings displayed in a different language. This parameter and
+ * the Accept-Language header are mutually exclusive; do not specify both.
+ * A user interface string is a string that's used as a label in a user
+ * interface. There are few user interface strings in the JSON response
+ * objects. Also, any links to Bing.com properties in the response objects
+ * apply the specified language.
+ */
+ private String setLang;
+
+ /**
+ * The media type to use for the response. The following are the possible
+ * case-insensitive values: JSON, JSONLD. The default is JSON. If you
+ * specify JSONLD, the response body includes JSON-LD objects that contain
+ * the search results.
+ */
+ private List responseFormat;
+
+ /**
+ * Get the acceptLanguage value.
+ *
+ * @return the acceptLanguage value
+ */
+ public String acceptLanguage() {
+ return this.acceptLanguage;
+ }
+
+ /**
+ * Set the acceptLanguage value.
+ *
+ * @param acceptLanguage the acceptLanguage value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withAcceptLanguage(String acceptLanguage) {
+ this.acceptLanguage = acceptLanguage;
+ return this;
+ }
+
+ /**
+ * Get the pragma value.
+ *
+ * @return the pragma value
+ */
+ public String pragma() {
+ return this.pragma;
+ }
+
+ /**
+ * Set the pragma value.
+ *
+ * @param pragma the pragma value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withPragma(String pragma) {
+ this.pragma = pragma;
+ return this;
+ }
+
+ /**
+ * Get the userAgent value.
+ *
+ * @return the userAgent value
+ */
+ public String userAgent() {
+ return this.userAgent;
+ }
+
+ /**
+ * Set the userAgent value.
+ *
+ * @param userAgent the userAgent value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withUserAgent(String userAgent) {
+ this.userAgent = userAgent;
+ return this;
+ }
+
+ /**
+ * Get the clientId value.
+ *
+ * @return the clientId value
+ */
+ public String clientId() {
+ return this.clientId;
+ }
+
+ /**
+ * Set the clientId value.
+ *
+ * @param clientId the clientId value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withClientId(String clientId) {
+ this.clientId = clientId;
+ return this;
+ }
+
+ /**
+ * Get the clientIp value.
+ *
+ * @return the clientIp value
+ */
+ public String clientIp() {
+ return this.clientIp;
+ }
+
+ /**
+ * Set the clientIp value.
+ *
+ * @param clientIp the clientIp value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withClientIp(String clientIp) {
+ this.clientIp = clientIp;
+ return this;
+ }
+
+ /**
+ * Get the location value.
+ *
+ * @return the location value
+ */
+ public String location() {
+ return this.location;
+ }
+
+ /**
+ * Set the location value.
+ *
+ * @param location the location value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withLocation(String location) {
+ this.location = location;
+ return this;
+ }
+
+ /**
+ * Get the countryCode value.
+ *
+ * @return the countryCode value
+ */
+ public String countryCode() {
+ return this.countryCode;
+ }
+
+ /**
+ * Set the countryCode value.
+ *
+ * @param countryCode the countryCode value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withCountryCode(String countryCode) {
+ this.countryCode = countryCode;
+ return this;
+ }
+
+ /**
+ * Get the market value.
+ *
+ * @return the market value
+ */
+ public String market() {
+ return this.market;
+ }
+
+ /**
+ * Set the market value.
+ *
+ * @param market the market value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withMarket(String market) {
+ this.market = market;
+ return this;
+ }
+
+ /**
+ * Get the safeSearch value.
+ *
+ * @return the safeSearch value
+ */
+ public SafeSearch safeSearch() {
+ return this.safeSearch;
+ }
+
+ /**
+ * Set the safeSearch value.
+ *
+ * @param safeSearch the safeSearch value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withSafeSearch(SafeSearch safeSearch) {
+ this.safeSearch = safeSearch;
+ return this;
+ }
+
+ /**
+ * Get the setLang value.
+ *
+ * @return the setLang value
+ */
+ public String setLang() {
+ return this.setLang;
+ }
+
+ /**
+ * Set the setLang value.
+ *
+ * @param setLang the setLang value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withSetLang(String setLang) {
+ this.setLang = setLang;
+ return this;
+ }
+
+ /**
+ * Get the responseFormat value.
+ *
+ * @return the responseFormat value
+ */
+ public List responseFormat() {
+ return this.responseFormat;
+ }
+
+ /**
+ * Set the responseFormat value.
+ *
+ * @param responseFormat the responseFormat value to set
+ * @return the AutoSuggestOptionalParameter object itself.
+ */
+ public AutoSuggestOptionalParameter withResponseFormat(List responseFormat) {
+ this.responseFormat = responseFormat;
+ return this;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/CreativeWork.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/CreativeWork.java
new file mode 100644
index 000000000000..7bdb0e6fae9d
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/CreativeWork.java
@@ -0,0 +1,267 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * The most generic kind of creative work, including books, movies,
+ * photographs, software programs, etc.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = CreativeWork.class)
+@JsonTypeName("CreativeWork")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Action", value = Action.class)
+})
+public class CreativeWork extends Thing {
+ /**
+ * The URL to a thumbnail of the item.
+ */
+ @JsonProperty(value = "thumbnailUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String thumbnailUrl;
+
+ /**
+ * For internal use only.
+ */
+ @JsonProperty(value = "about", access = JsonProperty.Access.WRITE_ONLY)
+ private List about;
+
+ /**
+ * For internal use only.
+ */
+ @JsonProperty(value = "mentions", access = JsonProperty.Access.WRITE_ONLY)
+ private List mentions;
+
+ /**
+ * The source of the creative work.
+ */
+ @JsonProperty(value = "provider", access = JsonProperty.Access.WRITE_ONLY)
+ private List provider;
+
+ /**
+ * The creator property.
+ */
+ @JsonProperty(value = "creator", access = JsonProperty.Access.WRITE_ONLY)
+ private Thing creator;
+
+ /**
+ * Text content of this creative work.
+ */
+ @JsonProperty(value = "text", access = JsonProperty.Access.WRITE_ONLY)
+ private String text;
+
+ /**
+ * The discussionUrl property.
+ */
+ @JsonProperty(value = "discussionUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String discussionUrl;
+
+ /**
+ * The commentCount property.
+ */
+ @JsonProperty(value = "commentCount", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer commentCount;
+
+ /**
+ * The mainEntity property.
+ */
+ @JsonProperty(value = "mainEntity", access = JsonProperty.Access.WRITE_ONLY)
+ private Thing mainEntity;
+
+ /**
+ * The headLine property.
+ */
+ @JsonProperty(value = "headLine", access = JsonProperty.Access.WRITE_ONLY)
+ private String headLine;
+
+ /**
+ * The copyrightHolder property.
+ */
+ @JsonProperty(value = "copyrightHolder", access = JsonProperty.Access.WRITE_ONLY)
+ private Thing copyrightHolder;
+
+ /**
+ * The copyrightYear property.
+ */
+ @JsonProperty(value = "copyrightYear", access = JsonProperty.Access.WRITE_ONLY)
+ private Integer copyrightYear;
+
+ /**
+ * The disclaimer property.
+ */
+ @JsonProperty(value = "disclaimer", access = JsonProperty.Access.WRITE_ONLY)
+ private String disclaimer;
+
+ /**
+ * The isAccessibleForFree property.
+ */
+ @JsonProperty(value = "isAccessibleForFree", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isAccessibleForFree;
+
+ /**
+ * The genre property.
+ */
+ @JsonProperty(value = "genre", access = JsonProperty.Access.WRITE_ONLY)
+ private List genre;
+
+ /**
+ * The isFamilyFriendly property.
+ */
+ @JsonProperty(value = "isFamilyFriendly", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isFamilyFriendly;
+
+ /**
+ * Get the thumbnailUrl value.
+ *
+ * @return the thumbnailUrl value
+ */
+ public String thumbnailUrl() {
+ return this.thumbnailUrl;
+ }
+
+ /**
+ * Get the about value.
+ *
+ * @return the about value
+ */
+ public List about() {
+ return this.about;
+ }
+
+ /**
+ * Get the mentions value.
+ *
+ * @return the mentions value
+ */
+ public List mentions() {
+ return this.mentions;
+ }
+
+ /**
+ * Get the provider value.
+ *
+ * @return the provider value
+ */
+ public List provider() {
+ return this.provider;
+ }
+
+ /**
+ * Get the creator value.
+ *
+ * @return the creator value
+ */
+ public Thing creator() {
+ return this.creator;
+ }
+
+ /**
+ * Get the text value.
+ *
+ * @return the text value
+ */
+ public String text() {
+ return this.text;
+ }
+
+ /**
+ * Get the discussionUrl value.
+ *
+ * @return the discussionUrl value
+ */
+ public String discussionUrl() {
+ return this.discussionUrl;
+ }
+
+ /**
+ * Get the commentCount value.
+ *
+ * @return the commentCount value
+ */
+ public Integer commentCount() {
+ return this.commentCount;
+ }
+
+ /**
+ * Get the mainEntity value.
+ *
+ * @return the mainEntity value
+ */
+ public Thing mainEntity() {
+ return this.mainEntity;
+ }
+
+ /**
+ * Get the headLine value.
+ *
+ * @return the headLine value
+ */
+ public String headLine() {
+ return this.headLine;
+ }
+
+ /**
+ * Get the copyrightHolder value.
+ *
+ * @return the copyrightHolder value
+ */
+ public Thing copyrightHolder() {
+ return this.copyrightHolder;
+ }
+
+ /**
+ * Get the copyrightYear value.
+ *
+ * @return the copyrightYear value
+ */
+ public Integer copyrightYear() {
+ return this.copyrightYear;
+ }
+
+ /**
+ * Get the disclaimer value.
+ *
+ * @return the disclaimer value
+ */
+ public String disclaimer() {
+ return this.disclaimer;
+ }
+
+ /**
+ * Get the isAccessibleForFree value.
+ *
+ * @return the isAccessibleForFree value
+ */
+ public Boolean isAccessibleForFree() {
+ return this.isAccessibleForFree;
+ }
+
+ /**
+ * Get the genre value.
+ *
+ * @return the genre value
+ */
+ public List genre() {
+ return this.genre;
+ }
+
+ /**
+ * Get the isFamilyFriendly value.
+ *
+ * @return the isFamilyFriendly value
+ */
+ public Boolean isFamilyFriendly() {
+ return this.isFamilyFriendly;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Error.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Error.java
new file mode 100644
index 000000000000..7fc3ea564ffc
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Error.java
@@ -0,0 +1,120 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * Defines the error that occurred.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Error.class)
+@JsonTypeName("Error")
+public class Error {
+ /**
+ * The error code that identifies the category of error. Possible values
+ * include: 'None', 'ServerError', 'InvalidRequest', 'RateLimitExceeded',
+ * 'InvalidAuthorization', 'InsufficientAuthorization'.
+ */
+ @JsonProperty(value = "code", required = true)
+ private ErrorCode code;
+
+ /**
+ * A description of the error.
+ */
+ @JsonProperty(value = "message", required = true)
+ private String message;
+
+ /**
+ * A description that provides additional information about the error.
+ */
+ @JsonProperty(value = "moreDetails", access = JsonProperty.Access.WRITE_ONLY)
+ private String moreDetails;
+
+ /**
+ * The parameter in the request that caused the error.
+ */
+ @JsonProperty(value = "parameter", access = JsonProperty.Access.WRITE_ONLY)
+ private String parameter;
+
+ /**
+ * The parameter's value in the request that was not valid.
+ */
+ @JsonProperty(value = "value", access = JsonProperty.Access.WRITE_ONLY)
+ private String value;
+
+ /**
+ * Get the code value.
+ *
+ * @return the code value
+ */
+ public ErrorCode code() {
+ return this.code;
+ }
+
+ /**
+ * Set the code value.
+ *
+ * @param code the code value to set
+ * @return the Error object itself.
+ */
+ public Error withCode(ErrorCode code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get the message value.
+ *
+ * @return the message value
+ */
+ public String message() {
+ return this.message;
+ }
+
+ /**
+ * Set the message value.
+ *
+ * @param message the message value to set
+ * @return the Error object itself.
+ */
+ public Error withMessage(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Get the moreDetails value.
+ *
+ * @return the moreDetails value
+ */
+ public String moreDetails() {
+ return this.moreDetails;
+ }
+
+ /**
+ * Get the parameter value.
+ *
+ * @return the parameter value
+ */
+ public String parameter() {
+ return this.parameter;
+ }
+
+ /**
+ * Get the value value.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorCode.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorCode.java
new file mode 100644
index 000000000000..d06c895ec29d
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorCode.java
@@ -0,0 +1,53 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ErrorCode.
+ */
+public final class ErrorCode extends ExpandableStringEnum {
+ /** Static value None for ErrorCode. */
+ public static final ErrorCode NONE = fromString("None");
+
+ /** Static value ServerError for ErrorCode. */
+ public static final ErrorCode SERVER_ERROR = fromString("ServerError");
+
+ /** Static value InvalidRequest for ErrorCode. */
+ public static final ErrorCode INVALID_REQUEST = fromString("InvalidRequest");
+
+ /** Static value RateLimitExceeded for ErrorCode. */
+ public static final ErrorCode RATE_LIMIT_EXCEEDED = fromString("RateLimitExceeded");
+
+ /** Static value InvalidAuthorization for ErrorCode. */
+ public static final ErrorCode INVALID_AUTHORIZATION = fromString("InvalidAuthorization");
+
+ /** Static value InsufficientAuthorization for ErrorCode. */
+ public static final ErrorCode INSUFFICIENT_AUTHORIZATION = fromString("InsufficientAuthorization");
+
+ /**
+ * Creates or finds a ErrorCode from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ErrorCode
+ */
+ @JsonCreator
+ public static ErrorCode fromString(String name) {
+ return fromString(name, ErrorCode.class);
+ }
+
+ /**
+ * @return known ErrorCode values
+ */
+ public static Collection values() {
+ return values(ErrorCode.class);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponse.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponse.java
new file mode 100644
index 000000000000..f5244f2167e2
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponse.java
@@ -0,0 +1,48 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * The top-level response that represents a failed request.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = ErrorResponse.class)
+@JsonTypeName("ErrorResponse")
+public class ErrorResponse extends Response {
+ /**
+ * A list of errors that describe the reasons why the request failed.
+ */
+ @JsonProperty(value = "errors", required = true)
+ private List errors;
+
+ /**
+ * Get the errors value.
+ *
+ * @return the errors value
+ */
+ public List errors() {
+ return this.errors;
+ }
+
+ /**
+ * Set the errors value.
+ *
+ * @param errors the errors value to set
+ * @return the ErrorResponse object itself.
+ */
+ public ErrorResponse withErrors(List errors) {
+ this.errors = errors;
+ return this;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponseException.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponseException.java
new file mode 100644
index 000000000000..ca666234a7fe
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ErrorResponseException.java
@@ -0,0 +1,44 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.microsoft.rest.RestException;
+import okhttp3.ResponseBody;
+import retrofit2.Response;
+
+/**
+ * Exception thrown for an invalid response with ErrorResponse information.
+ */
+public class ErrorResponseException extends RestException {
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ */
+ public ErrorResponseException(final String message, final Response response) {
+ super(message, response);
+ }
+
+ /**
+ * Initializes a new instance of the ErrorResponseException class.
+ *
+ * @param message the exception message or the response content if a message is not available
+ * @param response the HTTP response
+ * @param body the deserialized response body
+ */
+ public ErrorResponseException(final String message, final Response response, final ErrorResponse body) {
+ super(message, response, body);
+ }
+
+ @Override
+ public ErrorResponse body() {
+ return (ErrorResponse) super.body();
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Identifiable.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Identifiable.java
new file mode 100644
index 000000000000..5004a24ad0aa
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Identifiable.java
@@ -0,0 +1,40 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Defines the identity of a resource.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Identifiable.class)
+@JsonTypeName("Identifiable")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Response", value = Response.class)
+})
+public class Identifiable extends ResponseBase {
+ /**
+ * A String identifier.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Get the id value.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/QueryContext.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/QueryContext.java
new file mode 100644
index 000000000000..141547f0054a
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/QueryContext.java
@@ -0,0 +1,140 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * Defines the query context that Bing used for the request.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = QueryContext.class)
+@JsonTypeName("QueryContext")
+public class QueryContext {
+ /**
+ * The query string as specified in the request.
+ */
+ @JsonProperty(value = "originalQuery", required = true)
+ private String originalQuery;
+
+ /**
+ * The query string used by Bing to perform the query. Bing uses the
+ * altered query string if the original query string contained spelling
+ * mistakes. For example, if the query string is "saling downwind", the
+ * altered query string will be "sailing downwind". This field is included
+ * only if the original query string contains a spelling mistake.
+ */
+ @JsonProperty(value = "alteredQuery", access = JsonProperty.Access.WRITE_ONLY)
+ private String alteredQuery;
+
+ /**
+ * The query string to use to force Bing to use the original string. For
+ * example, if the query string is "saling downwind", the override query
+ * string will be "+saling downwind". Remember to encode the query string
+ * which results in "%2Bsaling+downwind". This field is included only if
+ * the original query string contains a spelling mistake.
+ */
+ @JsonProperty(value = "alterationOverrideQuery", access = JsonProperty.Access.WRITE_ONLY)
+ private String alterationOverrideQuery;
+
+ /**
+ * A Boolean value that indicates whether the specified query has adult
+ * intent. The value is true if the query has adult intent; otherwise,
+ * false.
+ */
+ @JsonProperty(value = "adultIntent", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean adultIntent;
+
+ /**
+ * A Boolean value that indicates whether Bing requires the user's location
+ * to provide accurate results. If you specified the user's location by
+ * using the X-MSEdge-ClientIP and X-Search-Location headers, you can
+ * ignore this field. For location aware queries, such as "today's weather"
+ * or "restaurants near me" that need the user's location to provide
+ * accurate results, this field is set to true. For location aware queries
+ * that include the location (for example, "Seattle weather"), this field
+ * is set to false. This field is also set to false for queries that are
+ * not location aware, such as "best sellers".
+ */
+ @JsonProperty(value = "askUserForLocation", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean askUserForLocation;
+
+ /**
+ * The isTransactional property.
+ */
+ @JsonProperty(value = "isTransactional", access = JsonProperty.Access.WRITE_ONLY)
+ private Boolean isTransactional;
+
+ /**
+ * Get the originalQuery value.
+ *
+ * @return the originalQuery value
+ */
+ public String originalQuery() {
+ return this.originalQuery;
+ }
+
+ /**
+ * Set the originalQuery value.
+ *
+ * @param originalQuery the originalQuery value to set
+ * @return the QueryContext object itself.
+ */
+ public QueryContext withOriginalQuery(String originalQuery) {
+ this.originalQuery = originalQuery;
+ return this;
+ }
+
+ /**
+ * Get the alteredQuery value.
+ *
+ * @return the alteredQuery value
+ */
+ public String alteredQuery() {
+ return this.alteredQuery;
+ }
+
+ /**
+ * Get the alterationOverrideQuery value.
+ *
+ * @return the alterationOverrideQuery value
+ */
+ public String alterationOverrideQuery() {
+ return this.alterationOverrideQuery;
+ }
+
+ /**
+ * Get the adultIntent value.
+ *
+ * @return the adultIntent value
+ */
+ public Boolean adultIntent() {
+ return this.adultIntent;
+ }
+
+ /**
+ * Get the askUserForLocation value.
+ *
+ * @return the askUserForLocation value
+ */
+ public Boolean askUserForLocation() {
+ return this.askUserForLocation;
+ }
+
+ /**
+ * Get the isTransactional value.
+ *
+ * @return the isTransactional value
+ */
+ public Boolean isTransactional() {
+ return this.isTransactional;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Response.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Response.java
new file mode 100644
index 000000000000..a6880820d88b
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Response.java
@@ -0,0 +1,119 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Defines a response. All schemas that could be returned at the root of a
+ * response should inherit from this.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Response.class)
+@JsonTypeName("Response")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Answer", value = Answer.class),
+ @JsonSubTypes.Type(name = "Thing", value = Thing.class),
+ @JsonSubTypes.Type(name = "ErrorResponse", value = ErrorResponse.class)
+})
+public class Response extends Identifiable {
+ /**
+ * The URL that returns this resource.
+ */
+ @JsonProperty(value = "readLink", access = JsonProperty.Access.WRITE_ONLY)
+ private String readLink;
+
+ /**
+ * The URL To Bing's search result for this item.
+ */
+ @JsonProperty(value = "webSearchUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String webSearchUrl;
+
+ /**
+ * The potentialAction property.
+ */
+ @JsonProperty(value = "potentialAction", access = JsonProperty.Access.WRITE_ONLY)
+ private List potentialAction;
+
+ /**
+ * The immediateAction property.
+ */
+ @JsonProperty(value = "immediateAction", access = JsonProperty.Access.WRITE_ONLY)
+ private List immediateAction;
+
+ /**
+ * The preferredClickthroughUrl property.
+ */
+ @JsonProperty(value = "preferredClickthroughUrl", access = JsonProperty.Access.WRITE_ONLY)
+ private String preferredClickthroughUrl;
+
+ /**
+ * The adaptiveCard property.
+ */
+ @JsonProperty(value = "adaptiveCard", access = JsonProperty.Access.WRITE_ONLY)
+ private String adaptiveCard;
+
+ /**
+ * Get the readLink value.
+ *
+ * @return the readLink value
+ */
+ public String readLink() {
+ return this.readLink;
+ }
+
+ /**
+ * Get the webSearchUrl value.
+ *
+ * @return the webSearchUrl value
+ */
+ public String webSearchUrl() {
+ return this.webSearchUrl;
+ }
+
+ /**
+ * Get the potentialAction value.
+ *
+ * @return the potentialAction value
+ */
+ public List potentialAction() {
+ return this.potentialAction;
+ }
+
+ /**
+ * Get the immediateAction value.
+ *
+ * @return the immediateAction value
+ */
+ public List immediateAction() {
+ return this.immediateAction;
+ }
+
+ /**
+ * Get the preferredClickthroughUrl value.
+ *
+ * @return the preferredClickthroughUrl value
+ */
+ public String preferredClickthroughUrl() {
+ return this.preferredClickthroughUrl;
+ }
+
+ /**
+ * Get the adaptiveCard value.
+ *
+ * @return the adaptiveCard value
+ */
+ public String adaptiveCard() {
+ return this.adaptiveCard;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseBase.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseBase.java
new file mode 100644
index 000000000000..1c61f3b18c88
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseBase.java
@@ -0,0 +1,24 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Response base.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = ResponseBase.class)
+@JsonTypeName("ResponseBase")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Identifiable", value = Identifiable.class)
+})
+public class ResponseBase {
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseFormat.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseFormat.java
new file mode 100644
index 000000000000..8a1ec67f9f1d
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ResponseFormat.java
@@ -0,0 +1,41 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ResponseFormat.
+ */
+public final class ResponseFormat extends ExpandableStringEnum {
+ /** Static value Json for ResponseFormat. */
+ public static final ResponseFormat JSON = fromString("Json");
+
+ /** Static value JsonLd for ResponseFormat. */
+ public static final ResponseFormat JSON_LD = fromString("JsonLd");
+
+ /**
+ * Creates or finds a ResponseFormat from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ResponseFormat
+ */
+ @JsonCreator
+ public static ResponseFormat fromString(String name) {
+ return fromString(name, ResponseFormat.class);
+ }
+
+ /**
+ * @return known ResponseFormat values
+ */
+ public static Collection values() {
+ return values(ResponseFormat.class);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SafeSearch.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SafeSearch.java
new file mode 100644
index 000000000000..409ce3aca1ff
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SafeSearch.java
@@ -0,0 +1,44 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SafeSearch.
+ */
+public final class SafeSearch extends ExpandableStringEnum {
+ /** Static value Off for SafeSearch. */
+ public static final SafeSearch OFF = fromString("Off");
+
+ /** Static value Moderate for SafeSearch. */
+ public static final SafeSearch MODERATE = fromString("Moderate");
+
+ /** Static value Strict for SafeSearch. */
+ public static final SafeSearch STRICT = fromString("Strict");
+
+ /**
+ * Creates or finds a SafeSearch from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SafeSearch
+ */
+ @JsonCreator
+ public static SafeSearch fromString(String name) {
+ return fromString(name, SafeSearch.class);
+ }
+
+ /**
+ * @return known SafeSearch values
+ */
+ public static Collection values() {
+ return values(SafeSearch.class);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ScenarioType.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ScenarioType.java
new file mode 100644
index 000000000000..cfc756eec2bd
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/ScenarioType.java
@@ -0,0 +1,56 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for ScenarioType.
+ */
+public final class ScenarioType extends ExpandableStringEnum {
+ /** Static value Unknown for ScenarioType. */
+ public static final ScenarioType UNKNOWN = fromString("Unknown");
+
+ /** Static value Web for ScenarioType. */
+ public static final ScenarioType WEB = fromString("Web");
+
+ /** Static value StoreApps for ScenarioType. */
+ public static final ScenarioType STORE_APPS = fromString("StoreApps");
+
+ /** Static value SearchHistory for ScenarioType. */
+ public static final ScenarioType SEARCH_HISTORY = fromString("SearchHistory");
+
+ /** Static value PersonalSearchDocuments for ScenarioType. */
+ public static final ScenarioType PERSONAL_SEARCH_DOCUMENTS = fromString("PersonalSearchDocuments");
+
+ /** Static value PersonalSearchTags for ScenarioType. */
+ public static final ScenarioType PERSONAL_SEARCH_TAGS = fromString("PersonalSearchTags");
+
+ /** Static value Custom for ScenarioType. */
+ public static final ScenarioType CUSTOM = fromString("Custom");
+
+ /**
+ * Creates or finds a ScenarioType from its string representation.
+ * @param name a name to look for
+ * @return the corresponding ScenarioType
+ */
+ @JsonCreator
+ public static ScenarioType fromString(String name) {
+ return fromString(name, ScenarioType.class);
+ }
+
+ /**
+ * @return known ScenarioType values
+ */
+ public static Collection values() {
+ return values(ScenarioType.class);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchAction.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchAction.java
new file mode 100644
index 000000000000..baf4b976051c
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchAction.java
@@ -0,0 +1,67 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * The SearchAction model.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = SearchAction.class)
+@JsonTypeName("SearchAction")
+public class SearchAction extends Action {
+ /**
+ * The displayText property.
+ */
+ @JsonProperty(value = "displayText", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayText;
+
+ /**
+ * The query property.
+ */
+ @JsonProperty(value = "query", access = JsonProperty.Access.WRITE_ONLY)
+ private String query;
+
+ /**
+ * Possible values include: 'WebSearch', 'HistorySearch', 'DocumentSearch',
+ * 'TagSearch', 'LocationSearch', 'CustomSearch'.
+ */
+ @JsonProperty(value = "searchKind", access = JsonProperty.Access.WRITE_ONLY)
+ private SearchKind searchKind;
+
+ /**
+ * Get the displayText value.
+ *
+ * @return the displayText value
+ */
+ public String displayText() {
+ return this.displayText;
+ }
+
+ /**
+ * Get the query value.
+ *
+ * @return the query value
+ */
+ public String query() {
+ return this.query;
+ }
+
+ /**
+ * Get the searchKind value.
+ *
+ * @return the searchKind value
+ */
+ public SearchKind searchKind() {
+ return this.searchKind;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchKind.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchKind.java
new file mode 100644
index 000000000000..1aef698621d8
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchKind.java
@@ -0,0 +1,53 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for SearchKind.
+ */
+public final class SearchKind extends ExpandableStringEnum {
+ /** Static value WebSearch for SearchKind. */
+ public static final SearchKind WEB_SEARCH = fromString("WebSearch");
+
+ /** Static value HistorySearch for SearchKind. */
+ public static final SearchKind HISTORY_SEARCH = fromString("HistorySearch");
+
+ /** Static value DocumentSearch for SearchKind. */
+ public static final SearchKind DOCUMENT_SEARCH = fromString("DocumentSearch");
+
+ /** Static value TagSearch for SearchKind. */
+ public static final SearchKind TAG_SEARCH = fromString("TagSearch");
+
+ /** Static value LocationSearch for SearchKind. */
+ public static final SearchKind LOCATION_SEARCH = fromString("LocationSearch");
+
+ /** Static value CustomSearch for SearchKind. */
+ public static final SearchKind CUSTOM_SEARCH = fromString("CustomSearch");
+
+ /**
+ * Creates or finds a SearchKind from its string representation.
+ * @param name a name to look for
+ * @return the corresponding SearchKind
+ */
+ @JsonCreator
+ public static SearchKind fromString(String name) {
+ return fromString(name, SearchKind.class);
+ }
+
+ /**
+ * @return known SearchKind values
+ */
+ public static Collection values() {
+ return values(SearchKind.class);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchResultsAnswer.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchResultsAnswer.java
new file mode 100644
index 000000000000..a07439ca03c6
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SearchResultsAnswer.java
@@ -0,0 +1,40 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Defines a search result answer.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = SearchResultsAnswer.class)
+@JsonTypeName("SearchResultsAnswer")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "Suggestions", value = Suggestions.class)
+})
+public class SearchResultsAnswer extends Answer {
+ /**
+ * The queryContext property.
+ */
+ @JsonProperty(value = "queryContext", access = JsonProperty.Access.WRITE_ONLY)
+ private QueryContext queryContext;
+
+ /**
+ * Get the queryContext value.
+ *
+ * @return the queryContext value
+ */
+ public QueryContext queryContext() {
+ return this.queryContext;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Suggestions.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Suggestions.java
new file mode 100644
index 000000000000..8bb72858ef21
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Suggestions.java
@@ -0,0 +1,48 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * The Suggestions model.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Suggestions.class)
+@JsonTypeName("Suggestions")
+public class Suggestions extends SearchResultsAnswer {
+ /**
+ * The suggestionGroups property.
+ */
+ @JsonProperty(value = "suggestionGroups", required = true)
+ private List suggestionGroups;
+
+ /**
+ * Get the suggestionGroups value.
+ *
+ * @return the suggestionGroups value
+ */
+ public List suggestionGroups() {
+ return this.suggestionGroups;
+ }
+
+ /**
+ * Set the suggestionGroups value.
+ *
+ * @param suggestionGroups the suggestionGroups value to set
+ * @return the Suggestions object itself.
+ */
+ public Suggestions withSuggestionGroups(List suggestionGroups) {
+ this.suggestionGroups = suggestionGroups;
+ return this;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SuggestionsSuggestionGroup.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SuggestionsSuggestionGroup.java
new file mode 100644
index 000000000000..cf3e184d658c
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/SuggestionsSuggestionGroup.java
@@ -0,0 +1,75 @@
+/**
+ * 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.search.autosuggest.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+
+/**
+ * The SuggestionsSuggestionGroup model.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = SuggestionsSuggestionGroup.class)
+@JsonTypeName("Suggestions/SuggestionGroup")
+public class SuggestionsSuggestionGroup {
+ /**
+ * Possible values include: 'Unknown', 'Web', 'StoreApps', 'SearchHistory',
+ * 'PersonalSearchDocuments', 'PersonalSearchTags', 'Custom'.
+ */
+ @JsonProperty(value = "name", required = true)
+ private ScenarioType name;
+
+ /**
+ * The searchSuggestions property.
+ */
+ @JsonProperty(value = "searchSuggestions", required = true)
+ private List searchSuggestions;
+
+ /**
+ * Get the name value.
+ *
+ * @return the name value
+ */
+ public ScenarioType name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name value.
+ *
+ * @param name the name value to set
+ * @return the SuggestionsSuggestionGroup object itself.
+ */
+ public SuggestionsSuggestionGroup withName(ScenarioType name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the searchSuggestions value.
+ *
+ * @return the searchSuggestions value
+ */
+ public List searchSuggestions() {
+ return this.searchSuggestions;
+ }
+
+ /**
+ * Set the searchSuggestions value.
+ *
+ * @param searchSuggestions the searchSuggestions value to set
+ * @return the SuggestionsSuggestionGroup object itself.
+ */
+ public SuggestionsSuggestionGroup withSearchSuggestions(List searchSuggestions) {
+ this.searchSuggestions = searchSuggestions;
+ return this;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Thing.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Thing.java
new file mode 100644
index 000000000000..3641d2fc062e
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/Thing.java
@@ -0,0 +1,41 @@
+/**
+ * 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.search.autosuggest.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+
+/**
+ * Defines a thing.
+ */
+@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "_type", defaultImpl = Thing.class)
+@JsonTypeName("Thing")
+@JsonSubTypes({
+ @JsonSubTypes.Type(name = "CreativeWork", value = CreativeWork.class)
+})
+public class Thing extends Response {
+ /**
+ * The URL to get more information about the thing represented by this
+ * object.
+ */
+ @JsonProperty(value = "url", access = JsonProperty.Access.WRITE_ONLY)
+ private String url;
+
+ /**
+ * Get the url value.
+ *
+ * @return the url value
+ */
+ public String url() {
+ return this.url;
+ }
+
+}
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/package-info.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/package-info.java
new file mode 100644
index 000000000000..33998dc70a68
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/models/package-info.java
@@ -0,0 +1,11 @@
+// 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.
+
+/**
+ * This package contains the models classes for BingAutoSuggestSearchAPI.
+ * The AutoSuggest Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the web for AutoSuggest](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference).
+ */
+package com.microsoft.azure.cognitiveservices.search.autosuggest.models;
diff --git a/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/package-info.java b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/package-info.java
new file mode 100644
index 000000000000..326a3f121092
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingautosuggest/src/main/java/com/microsoft/azure/cognitiveservices/search/autosuggest/package-info.java
@@ -0,0 +1,11 @@
+// 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.
+
+/**
+ * This package contains the classes for BingAutoSuggestSearchAPI.
+ * The AutoSuggest Search API lets you send a search query to Bing and get back a list of news that are relevant to the search query. This section provides technical details about the query parameters and headers that you use to request news and the JSON response objects that contain them. For examples that show how to make requests, see [Searching the web for AutoSuggest](https://docs.microsoft.com/en-us/rest/api/cognitiveservices/bing-autosuggest-api-v7-reference).
+ */
+package com.microsoft.azure.cognitiveservices.search.autosuggest;
diff --git a/cognitiveservices/data-plane/search/bingcustomimagesearch/pom.xml b/cognitiveservices/data-plane/search/bingcustomimagesearch/pom.xml
index 74c231d9ec0e..4362d9179db5 100644
--- a/cognitiveservices/data-plane/search/bingcustomimagesearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingcustomimagesearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-customimagesearch
- 1.0.1-beta
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Custom Image Search
This package contains Microsoft Cognitive Service Custom Image Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingcustomimagesearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingcustomimagesearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingcustomimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customimagesearch/BingCustomImageSearchManager.java b/cognitiveservices/data-plane/search/bingcustomimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customimagesearch/BingCustomImageSearchManager.java
new file mode 100644
index 000000000000..14368992df2b
--- /dev/null
+++ b/cognitiveservices/data-plane/search/bingcustomimagesearch/src/main/java/com/microsoft/azure/cognitiveservices/search/customimagesearch/BingCustomImageSearchManager.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ */
+
+package com.microsoft.azure.cognitiveservices.search.customimagesearch;
+
+import com.microsoft.azure.cognitiveservices.search.customimagesearch.implementation.BingCustomImageSearchAPIImpl;
+import com.microsoft.rest.RestClient;
+import com.microsoft.rest.credentials.ServiceClientCredentials;
+import okhttp3.Interceptor;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+
+import java.io.IOException;
+
+/**
+ * Entry point to Azure Cognitive Services Bing Custom Image Search manager.
+ */
+public class BingCustomImageSearchManager {
+ /**
+ * Initializes an instance of Bing Custom Image Search API client.
+ *
+ * @param subscriptionKey the Bing Search API key
+ * @return the Bing Custom Search API client
+ */
+ public static BingCustomImageSearchAPI authenticate(String subscriptionKey) {
+ return authenticate("https://api.cognitive.microsoft.com/bingcustomsearch/v7.0/", subscriptionKey);
+ }
+
+ /**
+ * Initializes an instance of Bing Custom Image Search API client.
+ *
+ * @param baseUrl the base URL of the service
+ * @param subscriptionKey the Bing Search API key
+ * @return the Bing Custom Search API client
+ */
+ public static BingCustomImageSearchAPI authenticate(String baseUrl, final String subscriptionKey) {
+ ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
+ @Override
+ public void applyCredentialsFilter(OkHttpClient.Builder builder) {
+ builder.addNetworkInterceptor(
+ new Interceptor() {
+ @Override
+ public Response intercept(Chain chain) throws IOException {
+ Request request = null;
+ Request original = chain.request();
+ // Request customization: add request headers
+ Request.Builder requestBuilder = original.newBuilder()
+ .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey);
+ request = requestBuilder.build();
+ return chain.proceed(request);
+ }
+ });
+ }
+ };
+ return authenticate(baseUrl, serviceClientCredentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Custom Image Search API client.
+ *
+ * @param credentials the management credentials for Azure
+ * @return the Bing Custom Image Search API client
+ */
+ public static BingCustomImageSearchAPI authenticate(ServiceClientCredentials credentials) {
+ return authenticate("https://api.cognitive.microsoft.com/bingcustomsearch/v7.0/", credentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Custom Image Search API client.
+ *
+ * @param baseUrl the base URL of the service
+ * @param credentials the management credentials for Azure
+ * @return the Bing Custom Image Search API client
+ */
+ public static BingCustomImageSearchAPI authenticate(String baseUrl, ServiceClientCredentials credentials) {
+ return new BingCustomImageSearchAPIImpl(baseUrl, credentials);
+ }
+
+ /**
+ * Initializes an instance of Bing Custom Image Search API client.
+ *
+ * @param restClient the REST client to connect to Azure.
+ * @return the Bing Custom Image Search API client
+ */
+ public static BingCustomImageSearchAPI authenticate(RestClient restClient) {
+ return new BingCustomImageSearchAPIImpl(restClient);
+ }
+}
diff --git a/cognitiveservices/data-plane/search/bingcustomsearch/pom.xml b/cognitiveservices/data-plane/search/bingcustomsearch/pom.xml
index be4bf0559b0d..14c184488025 100644
--- a/cognitiveservices/data-plane/search/bingcustomsearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingcustomsearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-customsearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service Custom Search
This package contains Microsoft Cognitive Service Custom Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingcustomsearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingcustomsearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingentitysearch/pom.xml b/cognitiveservices/data-plane/search/bingentitysearch/pom.xml
index 45e08e242914..58421872540f 100644
--- a/cognitiveservices/data-plane/search/bingentitysearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingentitysearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-entitysearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service Entity Search
This package contains Microsoft Cognitive Service Entity Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingentitysearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingentitysearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingimagesearch/pom.xml b/cognitiveservices/data-plane/search/bingimagesearch/pom.xml
index e3266c6cf640..6ec62a353a1e 100644
--- a/cognitiveservices/data-plane/search/bingimagesearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingimagesearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-imagesearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service Image Search
This package contains Microsoft Cognitive Service Image Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingimagesearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingimagesearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingnewssearch/pom.xml b/cognitiveservices/data-plane/search/bingnewssearch/pom.xml
index 855d383b5939..97d457b0420a 100644
--- a/cognitiveservices/data-plane/search/bingnewssearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingnewssearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-newssearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service News Search
This package contains Microsoft Cognitive Service News Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingnewssearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingnewssearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingvideosearch/pom.xml b/cognitiveservices/data-plane/search/bingvideosearch/pom.xml
index b086a0e28272..149edcf09ea9 100644
--- a/cognitiveservices/data-plane/search/bingvideosearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingvideosearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-videosearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service Video Search
This package contains Microsoft Cognitive Service Video Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingvideosearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingvideosearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingvisualsearch/pom.xml b/cognitiveservices/data-plane/search/bingvisualsearch/pom.xml
index 1415d6fc9303..bf6ba0b59e49 100644
--- a/cognitiveservices/data-plane/search/bingvisualsearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingvisualsearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-visualsearch
- 1.0.1-beta
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Visual Search
This package contains Microsoft Cognitive Service Visual Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingvisualsearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingvisualsearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/search/bingwebsearch/pom.xml b/cognitiveservices/data-plane/search/bingwebsearch/pom.xml
index 3fefc532104e..82b74ceb2e93 100644
--- a/cognitiveservices/data-plane/search/bingwebsearch/pom.xml
+++ b/cognitiveservices/data-plane/search/bingwebsearch/pom.xml
@@ -8,15 +8,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-websearch
- 1.0.1
+ 1.0.2
jar
Microsoft Azure SDK for Cognitive Service Web Search
This package contains Microsoft Cognitive Service Web Search SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/search/bingwebsearch
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/search/bingwebsearch
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/vision/computervision/pom.xml b/cognitiveservices/data-plane/vision/computervision/pom.xml
index b60fcda537b8..f585c51f9857 100755
--- a/cognitiveservices/data-plane/vision/computervision/pom.xml
+++ b/cognitiveservices/data-plane/vision/computervision/pom.xml
@@ -10,15 +10,15 @@
com.microsoft.azure.cognitiveservices
azure-cognitiveservices-parent
- 1.0.1
+ 1.0.2
../../pom.xml
azure-cognitiveservices-computervision
- 1.0.1-beta
+ 1.0.2-beta
jar
Microsoft Azure SDK for Cognitive Service Computer Vision
This package contains Microsoft Cognitive Service Computer Vision SDK.
- https://github.com/Azure/azure-sdk-for-java/azure-cognitiveservices/vision/computervision
+ https://github.com/Azure/azure-sdk-for-java/cognitiveservices/data-plane/vision/computervision
The MIT License (MIT)
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
index cddbaa3fe633..8f22f907307c 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
@@ -8,14 +8,12 @@
package com.microsoft.azure.cognitiveservices.vision.computervision;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
@@ -33,6 +31,7 @@
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextOperationResult;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextRecognitionMode;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.VisualFeatureTypes;
import java.io.InputStream;
import java.util.List;
@@ -43,98 +42,32 @@
* in ComputerVision.
*/
public interface ComputerVision {
+
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
+ * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
+ * your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
-
- void recognizeTextInStream(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter);
+ void recognizeTextInStream(byte[] image, TextRecognitionMode mode);
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
+ * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
+ * your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
-
- Observable recognizeTextInStreamAsync(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter);
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
- *
- * @return the first stage of the recognizeTextInStream call
- */
- ComputerVisionRecognizeTextInStreamDefinitionStages.WithImage recognizeTextInStream();
-
- /**
- * Grouping of recognizeTextInStream definition stages.
- */
- interface ComputerVisionRecognizeTextInStreamDefinitionStages {
- /**
- * The stage of the definition to be specify image.
- */
- interface WithImage {
- /**
- * An image stream.
- *
- * @return next definition stage
- */
- ComputerVisionRecognizeTextInStreamDefinitionStages.WithExecute withImage(byte[] image);
- }
+ Observable recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode);
- /**
- * The stage of the definition which allows for any other optional settings to be specified.
- */
- interface WithAllOptions {
- /**
- * If 'true' is specified, handwriting recognition is performed. If this parameter is set to 'false' or is not
- * specified, printed text recognition is performed.
- *
- * @return next definition stage
- */
- ComputerVisionRecognizeTextInStreamDefinitionStages.WithExecute withDetectHandwriting(Boolean detectHandwriting);
-
- }
-
- /**
- * The last stage of the definition which will make the operation call.
- */
- interface WithExecute extends ComputerVisionRecognizeTextInStreamDefinitionStages.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 recognizeTextInStream definition.
- */
- interface ComputerVisionRecognizeTextInStreamDefinition extends
- ComputerVisionRecognizeTextInStreamDefinitionStages.WithImage,
- ComputerVisionRecognizeTextInStreamDefinitionStages.WithExecute {
- }
/**
* This operation recognizes content within an image by applying a domain-specific model. The list of
@@ -152,7 +85,7 @@ interface ComputerVisionRecognizeTextInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the DomainModelResults object if successful.
*/
-
+ @Deprecated
DomainModelResults analyzeImageByDomainInStream(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter);
/**
@@ -169,7 +102,7 @@ interface ComputerVisionRecognizeTextInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DomainModelResults object
*/
-
+ @Deprecated
Observable analyzeImageByDomainInStreamAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter);
/**
@@ -217,8 +150,8 @@ interface WithImage {
interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -269,7 +202,7 @@ interface ComputerVisionAnalyzeImageByDomainInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the TagResult object if successful.
*/
-
+ @Deprecated
TagResult tagImageInStream(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter);
/**
@@ -284,7 +217,7 @@ interface ComputerVisionAnalyzeImageByDomainInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TagResult object
*/
-
+ @Deprecated
Observable tagImageInStreamAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter);
/**
@@ -320,8 +253,8 @@ interface WithImage {
interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -372,7 +305,7 @@ interface ComputerVisionTagImageInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageDescription object if successful.
*/
-
+ @Deprecated
ImageDescription describeImageInStream(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter);
/**
@@ -388,7 +321,7 @@ interface ComputerVisionTagImageInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageDescription object
*/
-
+ @Deprecated
Observable describeImageInStreamAsync(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter);
/**
@@ -432,8 +365,8 @@ interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -484,7 +417,7 @@ interface ComputerVisionDescribeImageInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the OcrResult object if successful.
*/
-
+ @Deprecated
OcrResult recognizePrintedTextInStream(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter);
/**
@@ -500,7 +433,7 @@ interface ComputerVisionDescribeImageInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OcrResult object
*/
-
+ @Deprecated
Observable recognizePrintedTextInStreamAsync(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter);
/**
@@ -601,7 +534,7 @@ interface ComputerVisionRecognizePrintedTextInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the InputStream object if successful.
*/
-
+ @Deprecated
InputStream generateThumbnailInStream(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter);
/**
@@ -618,7 +551,7 @@ interface ComputerVisionRecognizePrintedTextInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the InputStream object
*/
-
+ @Deprecated
Observable generateThumbnailInStreamAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter);
/**
@@ -723,7 +656,7 @@ interface ComputerVisionGenerateThumbnailInStreamDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageAnalysis object if successful.
*/
-
+ @Deprecated
ImageAnalysis analyzeImageInStream(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter);
/**
@@ -734,7 +667,7 @@ interface ComputerVisionGenerateThumbnailInStreamDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageAnalysis object
*/
-
+ @Deprecated
Observable analyzeImageInStreamAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter);
/**
@@ -789,8 +722,8 @@ interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -831,7 +764,7 @@ interface ComputerVisionAnalyzeImageInStreamDefinition extends
* This interface is used for getting text operation result. The URL to this interface should be
* retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'.
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@@ -843,105 +776,39 @@ interface ComputerVisionAnalyzeImageInStreamDefinition extends
* This interface is used for getting text operation result. The URL to this interface should be
* retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'.
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TextOperationResult object
*/
Observable getTextOperationResultAsync(String operationId);
+
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
+ * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
+ * your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
* @param url Publicly reachable URL of an image.
- * @param recognizeTextOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
-
- void recognizeText(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter);
+ void recognizeText(String url, TextRecognitionMode mode);
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
+ * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
+ * your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
* @param url Publicly reachable URL of an image.
- * @param recognizeTextOptionalParameter 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 recognizeTextAsync(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter);
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called
- * 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get
- * Handwritten Text Operation Result operation.
- *
- * @return the first stage of the recognizeText call
- */
- ComputerVisionRecognizeTextDefinitionStages.WithUrl recognizeText();
-
- /**
- * Grouping of recognizeText definition stages.
- */
- interface ComputerVisionRecognizeTextDefinitionStages {
- /**
- * The stage of the definition to be specify url.
- */
- interface WithUrl {
- /**
- * Publicly reachable URL of an image.
- *
- * @return next definition stage
- */
- ComputerVisionRecognizeTextDefinitionStages.WithExecute withUrl(String url);
- }
+ Observable recognizeTextAsync(String url, TextRecognitionMode mode);
- /**
- * The stage of the definition which allows for any other optional settings to be specified.
- */
- interface WithAllOptions {
- /**
- * If 'true' is specified, handwriting recognition is performed. If this parameter is set to 'false' or is not
- * specified, printed text recognition is performed.
- *
- * @return next definition stage
- */
- ComputerVisionRecognizeTextDefinitionStages.WithExecute withDetectHandwriting(Boolean detectHandwriting);
-
- }
-
- /**
- * The last stage of the definition which will make the operation call.
- */
- interface WithExecute extends ComputerVisionRecognizeTextDefinitionStages.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 recognizeText definition.
- */
- interface ComputerVisionRecognizeTextDefinition extends
- ComputerVisionRecognizeTextDefinitionStages.WithUrl,
- ComputerVisionRecognizeTextDefinitionStages.WithExecute {
- }
/**
* This operation recognizes content within an image by applying a domain-specific model. The list of
@@ -959,7 +826,7 @@ interface ComputerVisionRecognizeTextDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the DomainModelResults object if successful.
*/
-
+ @Deprecated
DomainModelResults analyzeImageByDomain(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter);
/**
@@ -976,7 +843,7 @@ interface ComputerVisionRecognizeTextDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DomainModelResults object
*/
-
+ @Deprecated
Observable analyzeImageByDomainAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter);
/**
@@ -1024,8 +891,8 @@ interface WithUrl {
interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -1076,7 +943,7 @@ interface ComputerVisionAnalyzeImageByDomainDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the TagResult object if successful.
*/
-
+ @Deprecated
TagResult tagImage(String url, TagImageOptionalParameter tagImageOptionalParameter);
/**
@@ -1091,7 +958,7 @@ interface ComputerVisionAnalyzeImageByDomainDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TagResult object
*/
-
+ @Deprecated
Observable tagImageAsync(String url, TagImageOptionalParameter tagImageOptionalParameter);
/**
@@ -1127,8 +994,8 @@ interface WithUrl {
interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -1179,7 +1046,7 @@ interface ComputerVisionTagImageDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageDescription object if successful.
*/
-
+ @Deprecated
ImageDescription describeImage(String url, DescribeImageOptionalParameter describeImageOptionalParameter);
/**
@@ -1195,7 +1062,7 @@ interface ComputerVisionTagImageDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageDescription object
*/
-
+ @Deprecated
Observable describeImageAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter);
/**
@@ -1239,8 +1106,8 @@ interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
@@ -1291,7 +1158,7 @@ interface ComputerVisionDescribeImageDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the OcrResult object if successful.
*/
-
+ @Deprecated
OcrResult recognizePrintedText(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter);
/**
@@ -1307,7 +1174,7 @@ interface ComputerVisionDescribeImageDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the OcrResult object
*/
-
+ @Deprecated
Observable recognizePrintedTextAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter);
/**
@@ -1408,7 +1275,7 @@ interface ComputerVisionRecognizePrintedTextDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the InputStream object if successful.
*/
-
+ @Deprecated
InputStream generateThumbnail(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter);
/**
@@ -1425,7 +1292,7 @@ interface ComputerVisionRecognizePrintedTextDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the InputStream object
*/
-
+ @Deprecated
Observable generateThumbnailAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter);
/**
@@ -1533,7 +1400,7 @@ interface ComputerVisionGenerateThumbnailDefinition extends
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
* @return the ImageAnalysis object if successful.
*/
-
+ @Deprecated
ImageAnalysis analyzeImage(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter);
/**
@@ -1547,7 +1414,7 @@ interface ComputerVisionGenerateThumbnailDefinition extends
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageAnalysis object
*/
-
+ @Deprecated
Observable analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter);
/**
@@ -1604,8 +1471,8 @@ interface WithAllOptions {
/**
* The desired language for output generation. If this parameter is not specified, the default value is
- * "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'.
*
* @return next definition stage
*/
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionAPI.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionClient.java
similarity index 68%
rename from cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionAPI.java
rename to cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionClient.java
index ee57c7943c78..488e17359de4 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionAPI.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionClient.java
@@ -9,13 +9,12 @@
package com.microsoft.azure.cognitiveservices.vision.computervision;
import com.microsoft.azure.AzureClient;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.AzureRegions;
import com.microsoft.rest.RestClient;
/**
- * The interface for ComputerVisionAPI class.
+ * The interface for ComputerVisionClient class.
*/
-public interface ComputerVisionAPI {
+public interface ComputerVisionClient {
/**
* Gets the REST client.
*
@@ -37,19 +36,19 @@ public interface ComputerVisionAPI {
String userAgent();
/**
- * Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
+ * Gets Supported Cognitive Services endpoints.
*
- * @return the azureRegion value.
+ * @return the endpoint value.
*/
- AzureRegions azureRegion();
+ String endpoint();
/**
- * Sets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
+ * Sets Supported Cognitive Services endpoints.
*
- * @param azureRegion the azureRegion value.
+ * @param endpoint the endpoint value.
* @return the service client itself
*/
- ComputerVisionAPI withAzureRegion(AzureRegions azureRegion);
+ ComputerVisionClient withEndpoint(String endpoint);
/**
* Gets Gets or sets the preferred language for the response..
@@ -64,7 +63,7 @@ public interface ComputerVisionAPI {
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
*/
- ComputerVisionAPI withAcceptLanguage(String acceptLanguage);
+ ComputerVisionClient withAcceptLanguage(String acceptLanguage);
/**
* Gets Gets or sets the retry timeout in seconds for Long Running Operations. Default value is 30..
@@ -79,7 +78,7 @@ public interface ComputerVisionAPI {
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
*/
- ComputerVisionAPI withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);
+ ComputerVisionClient withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout);
/**
* Gets When set to true a unique x-ms-client-request-id value is generated and included in each request. Default is true..
@@ -94,7 +93,7 @@ public interface ComputerVisionAPI {
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
*/
- ComputerVisionAPI withGenerateClientRequestId(boolean generateClientRequestId);
+ ComputerVisionClient withGenerateClientRequestId(boolean generateClientRequestId);
/**
* Gets the ComputerVision object to access its operations.
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
index 6ed80f273437..f5a339218bed 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
@@ -6,8 +6,7 @@
package com.microsoft.azure.cognitiveservices.vision.computervision;
-import com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionAPIImpl;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.AzureRegions;
+import com.microsoft.azure.cognitiveservices.vision.computervision.implementation.ComputerVisionClientImpl;
import com.microsoft.rest.RestClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import okhttp3.Interceptor;
@@ -24,13 +23,11 @@ public class ComputerVisionManager {
/**
* Initializes an instance of Computer Vision API client.
*
- * @param region Supported Azure regions for Cognitive Services endpoints.
* @param subscriptionKey the Computer Vision API key
* @return the Computer Vision API client
*/
- public static ComputerVisionAPI authenticate(AzureRegions region, String subscriptionKey) {
- return authenticate("https://{AzureRegion}.api.cognitive.microsoft.com/vision/v1.0/", subscriptionKey)
- .withAzureRegion(region);
+ public static ComputerVisionClient authenticate(String subscriptionKey) {
+ return authenticate("https://{endpoint}/vision/v2.0/", subscriptionKey);
}
/**
@@ -40,7 +37,7 @@ public static ComputerVisionAPI authenticate(AzureRegions region, String subscri
* @param subscriptionKey the Computer Vision API key
* @return the Computer Vision API client
*/
- public static ComputerVisionAPI authenticate(String baseUrl, final String subscriptionKey) {
+ public static ComputerVisionClient authenticate(String baseUrl, final String subscriptionKey) {
ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() {
@Override
public void applyCredentialsFilter(OkHttpClient.Builder builder) {
@@ -65,13 +62,13 @@ public Response intercept(Chain chain) throws IOException {
/**
* Initializes an instance of Computer Vision API client.
*
- * @param region Supported Azure regions for Cognitive Services endpoints.
* @param credentials the management credentials for Azure
+ * @param endpoint Supported Cognitive Services endpoints.
* @return the Computer Vision API client
*/
- public static ComputerVisionAPI authenticate(AzureRegions region, ServiceClientCredentials credentials) {
- return authenticate("https://{AzureRegion}.api.cognitive.microsoft.com/vision/v1.0/", credentials)
- .withAzureRegion(region);
+ public static ComputerVisionClient authenticate(ServiceClientCredentials credentials, String endpoint) {
+ return authenticate("https://{endpoint}/vision/v2.0/", credentials)
+ .withEndpoint(endpoint);
}
/**
@@ -81,8 +78,8 @@ public static ComputerVisionAPI authenticate(AzureRegions region, ServiceClientC
* @param credentials the management credentials for Azure
* @return the Computer Vision API client
*/
- public static ComputerVisionAPI authenticate(String baseUrl, ServiceClientCredentials credentials) {
- return new ComputerVisionAPIImpl(baseUrl, credentials);
+ public static ComputerVisionClient authenticate(String baseUrl, ServiceClientCredentials credentials) {
+ return new ComputerVisionClientImpl(baseUrl, credentials);
}
/**
@@ -91,7 +88,7 @@ public static ComputerVisionAPI authenticate(String baseUrl, ServiceClientCreden
* @param restClient the REST client to connect to Azure.
* @return the Computer Vision API client
*/
- public static ComputerVisionAPI authenticate(RestClient restClient) {
- return new ComputerVisionAPIImpl(restClient);
+ public static ComputerVisionClient authenticate(RestClient restClient) {
+ return new ComputerVisionClientImpl(restClient);
}
}
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionAPIImpl.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
similarity index 67%
rename from cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionAPIImpl.java
rename to cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
index 78964fdd8475..24cd15950a4d 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionAPIImpl.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
@@ -11,15 +11,14 @@
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision;
-import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVisionAPI;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.AzureRegions;
+import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVisionClient;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
/**
- * Initializes a new instance of the ComputerVisionAPIImpl class.
+ * Initializes a new instance of the ComputerVisionClientImpl class.
*/
-public class ComputerVisionAPIImpl extends AzureServiceClient implements ComputerVisionAPI {
+public class ComputerVisionClientImpl extends AzureServiceClient implements ComputerVisionClient {
/** the {@link AzureClient} used for long running operations. */
private AzureClient azureClient;
@@ -31,26 +30,26 @@ public AzureClient getAzureClient() {
return this.azureClient;
}
- /** Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'. */
- private AzureRegions azureRegion;
+ /** Supported Cognitive Services endpoints. */
+ private String endpoint;
/**
- * Gets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
+ * Gets Supported Cognitive Services endpoints.
*
- * @return the azureRegion value.
+ * @return the endpoint value.
*/
- public AzureRegions azureRegion() {
- return this.azureRegion;
+ public String endpoint() {
+ return this.endpoint;
}
/**
- * Sets Supported Azure regions for Cognitive Services endpoints. Possible values include: 'westus', 'westeurope', 'southeastasia', 'eastus2', 'westcentralus', 'westus2', 'eastus', 'southcentralus', 'northeurope', 'eastasia', 'australiaeast', 'brazilsouth'.
+ * Sets Supported Cognitive Services endpoints.
*
- * @param azureRegion the azureRegion value.
+ * @param endpoint the endpoint value.
* @return the service client itself
*/
- public ComputerVisionAPIImpl withAzureRegion(AzureRegions azureRegion) {
- this.azureRegion = azureRegion;
+ public ComputerVisionClientImpl withEndpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
@@ -72,7 +71,7 @@ public String acceptLanguage() {
* @param acceptLanguage the acceptLanguage value.
* @return the service client itself
*/
- public ComputerVisionAPIImpl withAcceptLanguage(String acceptLanguage) {
+ public ComputerVisionClientImpl withAcceptLanguage(String acceptLanguage) {
this.acceptLanguage = acceptLanguage;
return this;
}
@@ -95,7 +94,7 @@ public int longRunningOperationRetryTimeout() {
* @param longRunningOperationRetryTimeout the longRunningOperationRetryTimeout value.
* @return the service client itself
*/
- public ComputerVisionAPIImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
+ public ComputerVisionClientImpl withLongRunningOperationRetryTimeout(int longRunningOperationRetryTimeout) {
this.longRunningOperationRetryTimeout = longRunningOperationRetryTimeout;
return this;
}
@@ -118,7 +117,7 @@ public boolean generateClientRequestId() {
* @param generateClientRequestId the generateClientRequestId value.
* @return the service client itself
*/
- public ComputerVisionAPIImpl withGenerateClientRequestId(boolean generateClientRequestId) {
+ public ComputerVisionClientImpl withGenerateClientRequestId(boolean generateClientRequestId) {
this.generateClientRequestId = generateClientRequestId;
return this;
}
@@ -137,31 +136,31 @@ public ComputerVision computerVision() {
}
/**
- * Initializes an instance of ComputerVisionAPI client.
+ * Initializes an instance of ComputerVisionClient client.
*
* @param credentials the management credentials for Azure
*/
- public ComputerVisionAPIImpl(ServiceClientCredentials credentials) {
- this("https://{AzureRegion}.api.cognitive.microsoft.com/vision/v1.0", credentials);
+ public ComputerVisionClientImpl(ServiceClientCredentials credentials) {
+ this("https://{Endpoint}/vision/v2.0", credentials);
}
/**
- * Initializes an instance of ComputerVisionAPI client.
+ * Initializes an instance of ComputerVisionClient client.
*
* @param baseUrl the base URL of the host
* @param credentials the management credentials for Azure
*/
- public ComputerVisionAPIImpl(String baseUrl, ServiceClientCredentials credentials) {
+ public ComputerVisionClientImpl(String baseUrl, ServiceClientCredentials credentials) {
super(baseUrl, credentials);
initialize();
}
/**
- * Initializes an instance of ComputerVisionAPI client.
+ * Initializes an instance of ComputerVisionClient client.
*
* @param restClient the REST client to connect to Azure.
*/
- public ComputerVisionAPIImpl(RestClient restClient) {
+ public ComputerVisionClientImpl(RestClient restClient) {
super(restClient);
initialize();
}
@@ -181,6 +180,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionAPI", "1.0");
+ return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionClient", "2.0");
}
}
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
index 6b05defde602..4dac231fbe27 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
@@ -8,14 +8,12 @@
package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
@@ -40,6 +38,7 @@
import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextInStreamHeaders;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextOperationResult;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextRecognitionMode;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.VisualFeatureTypes;
import com.microsoft.rest.CollectionFormat;
import com.microsoft.rest.ServiceCallback;
@@ -73,7 +72,7 @@ public class ComputerVisionImpl implements ComputerVision {
/** The Retrofit service to perform REST calls. */
private ComputerVisionService service;
/** The service client containing this operation class. */
- private ComputerVisionAPIImpl client;
+ private ComputerVisionClientImpl client;
/**
* Initializes an instance of ComputerVisionImpl.
@@ -81,7 +80,7 @@ public class ComputerVisionImpl implements ComputerVision {
* @param retrofit the Retrofit instance built from a Retrofit Builder.
* @param client the instance of the service client containing this operation class.
*/
- public ComputerVisionImpl(Retrofit retrofit, ComputerVisionAPIImpl client) {
+ public ComputerVisionImpl(Retrofit retrofit, ComputerVisionClientImpl client) {
this.service = retrofit.create(ComputerVisionService.class);
this.client = client;
}
@@ -93,7 +92,7 @@ public ComputerVisionImpl(Retrofit retrofit, ComputerVisionAPIImpl client) {
interface ComputerVisionService {
@Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision recognizeTextInStream" })
@POST("recognizeText")
- Observable> recognizeTextInStream(@Query("detectHandwriting") Boolean detectHandwriting, @Body RequestBody image, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ Observable> recognizeTextInStream(@Body RequestBody image, @Query("mode") TextRecognitionMode mode, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision analyzeImageByDomainInStream" })
@POST("models/{model}/analyze")
@@ -126,7 +125,7 @@ interface ComputerVisionService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision recognizeText" })
@POST("recognizeText")
- Observable> recognizeText(@Query("detectHandwriting") Boolean detectHandwriting, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ Observable> recognizeText(@Query("mode") TextRecognitionMode mode, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @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.computervision.ComputerVision analyzeImageByDomain" })
@POST("models/{model}/analyze")
@@ -159,43 +158,42 @@ interface ComputerVisionService {
}
-
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
- public void recognizeTextInStream(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter) {
- recognizeTextInStreamWithServiceResponseAsync(image, recognizeTextInStreamOptionalParameter).toBlocking().single().body();
+ public void recognizeTextInStream(byte[] image, TextRecognitionMode mode) {
+ recognizeTextInStreamWithServiceResponseAsync(image, mode).toBlocking().single().body();
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @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 recognizeTextInStreamAsync(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(recognizeTextInStreamWithServiceResponseAsync(image, recognizeTextInStreamOptionalParameter), serviceCallback);
+ public ServiceFuture recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(recognizeTextInStreamWithServiceResponseAsync(image, mode), serviceCallback);
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable recognizeTextInStreamAsync(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter) {
- return recognizeTextInStreamWithServiceResponseAsync(image, recognizeTextInStreamOptionalParameter).map(new Func1, Void>() {
+ public Observable recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode) {
+ return recognizeTextInStreamWithServiceResponseAsync(image, mode).map(new Func1, Void>() {
@Override
public Void call(ServiceResponseWithHeaders response) {
return response.body();
@@ -204,43 +202,26 @@ public Void call(ServiceResponseWithHeaders
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
* @param image An image stream.
- * @param recognizeTextInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable> recognizeTextInStreamWithServiceResponseAsync(byte[] image, RecognizeTextInStreamOptionalParameter recognizeTextInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
+ public Observable> recognizeTextInStreamWithServiceResponseAsync(byte[] image, TextRecognitionMode mode) {
+ if (this.client.endpoint() == null) {
+ throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
}
if (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- final Boolean detectHandwriting = recognizeTextInStreamOptionalParameter != null ? recognizeTextInStreamOptionalParameter.detectHandwriting() : null;
-
- return recognizeTextInStreamWithServiceResponseAsync(image, detectHandwriting);
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
- *
- * @param image An image stream.
- * @param detectHandwriting If 'true' is specified, handwriting recognition is performed. If this parameter is set to 'false' or is not specified, printed text recognition is performed.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable> recognizeTextInStreamWithServiceResponseAsync(byte[] image, Boolean detectHandwriting) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
- }
- if (image == null) {
- throw new IllegalArgumentException("Parameter image is required and cannot be null.");
+ if (mode == null) {
+ throw new IllegalArgumentException("Parameter mode is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
- return service.recognizeTextInStream(detectHandwriting, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
+ return service.recognizeTextInStream(imageConverted, mode, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -261,55 +242,6 @@ private ServiceResponseWithHeaders recognize
.buildWithHeaders(response, RecognizeTextInStreamHeaders.class);
}
- @Override
- public ComputerVisionRecognizeTextInStreamParameters recognizeTextInStream() {
- return new ComputerVisionRecognizeTextInStreamParameters(this);
- }
-
- /**
- * Internal class implementing ComputerVisionRecognizeTextInStreamDefinition.
- */
- class ComputerVisionRecognizeTextInStreamParameters implements ComputerVisionRecognizeTextInStreamDefinition {
- private ComputerVisionImpl parent;
- private byte[] image;
- private Boolean detectHandwriting;
-
- /**
- * Constructor.
- * @param parent the parent object.
- */
- ComputerVisionRecognizeTextInStreamParameters(ComputerVisionImpl parent) {
- this.parent = parent;
- }
-
- @Override
- public ComputerVisionRecognizeTextInStreamParameters withImage(byte[] image) {
- this.image = image;
- return this;
- }
-
- @Override
- public ComputerVisionRecognizeTextInStreamParameters withDetectHandwriting(Boolean detectHandwriting) {
- this.detectHandwriting = detectHandwriting;
- return this;
- }
-
- @Override
- public void execute() {
- recognizeTextInStreamWithServiceResponseAsync(image, detectHandwriting).toBlocking().single().body();
- }
-
- @Override
- public Observable executeAsync() {
- return recognizeTextInStreamWithServiceResponseAsync(image, detectHandwriting).map(new Func1, Void>() {
- @Override
- public Void call(ServiceResponseWithHeaders response) {
- return response.body();
- }
- });
- }
- }
-
/**
* This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API only provides a single domain-specific model: celebrities. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.
@@ -368,8 +300,8 @@ public DomainModelResults call(ServiceResponse response) {
* @return the observable to the DomainModelResults object
*/
public Observable> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, AnalyzeImageByDomainInStreamOptionalParameter analyzeImageByDomainInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (model == null) {
throw new IllegalArgumentException("Parameter model is required and cannot be null.");
@@ -387,13 +319,13 @@ public Observable> analyzeImageByDomainInStr
*
* @param model The domain-specific content to recognize.
* @param image An image stream.
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DomainModelResults object
*/
public Observable> analyzeImageByDomainInStreamWithServiceResponseAsync(String model, byte[] image, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (model == null) {
throw new IllegalArgumentException("Parameter model is required and cannot be null.");
@@ -401,7 +333,7 @@ public Observable> analyzeImageByDomainInStr
if (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.analyzeImageByDomainInStream(model, language, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@@ -534,8 +466,8 @@ public TagResult call(ServiceResponse response) {
* @return the observable to the TagResult object
*/
public Observable> tagImageInStreamWithServiceResponseAsync(byte[] image, TagImageInStreamOptionalParameter tagImageInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
@@ -549,18 +481,18 @@ public Observable> tagImageInStreamWithServiceRespons
* This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag 'cello' may be accompanied by the hint 'musical instrument'. All tags are in English.
*
* @param image An image stream.
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TagResult object
*/
public Observable> tagImageInStreamWithServiceResponseAsync(byte[] image, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.tagImageInStream(language, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@@ -686,8 +618,8 @@ public ImageDescription call(ServiceResponse response) {
* @return the observable to the ImageDescription object
*/
public Observable> describeImageInStreamWithServiceResponseAsync(byte[] image, DescribeImageInStreamOptionalParameter describeImageInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
@@ -703,18 +635,18 @@ public Observable> describeImageInStreamWithSe
*
* @param image An image stream.
* @param maxCandidates Maximum number of candidate descriptions to be returned. The default is 1.
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageDescription object
*/
public Observable> describeImageInStreamWithServiceResponseAsync(byte[] image, String maxCandidates, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.describeImageInStream(maxCandidates, language, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@@ -851,8 +783,8 @@ public OcrResult call(ServiceResponse response) {
* @return the observable to the OcrResult object
*/
public Observable> recognizePrintedTextInStreamWithServiceResponseAsync(boolean detectOrientation, byte[] image, RecognizePrintedTextInStreamOptionalParameter recognizePrintedTextInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
@@ -872,13 +804,13 @@ public Observable> recognizePrintedTextInStreamWithSe
* @return the observable to the OcrResult object
*/
public Observable> recognizePrintedTextInStreamWithServiceResponseAsync(boolean detectOrientation, byte[] image, OcrLanguages language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.recognizePrintedTextInStream(language, detectOrientation, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@@ -1019,8 +951,8 @@ public InputStream call(ServiceResponse response) {
* @return the observable to the InputStream object
*/
public Observable> generateThumbnailInStreamWithServiceResponseAsync(int width, int height, byte[] image, GenerateThumbnailInStreamOptionalParameter generateThumbnailInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
@@ -1041,13 +973,13 @@ public Observable> generateThumbnailInStreamWithSer
* @return the observable to the InputStream object
*/
public Observable> generateThumbnailInStreamWithServiceResponseAsync(int width, int height, byte[] image, Boolean smartCropping) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.generateThumbnailInStream(width, height, imageConverted, smartCropping, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@@ -1187,8 +1119,8 @@ public ImageAnalysis call(ServiceResponse response) {
* @return the observable to the ImageAnalysis object
*/
public Observable> analyzeImageInStreamWithServiceResponseAsync(byte[] image, AnalyzeImageInStreamOptionalParameter analyzeImageInStreamOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
@@ -1206,19 +1138,19 @@ public Observable> analyzeImageInStreamWithServic
* @param image An image stream.
* @param visualFeatures A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include:Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white.Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected.
* @param details A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include:Celebrities - identifies celebrities if detected in the image. Possible values include: 'Celebrities', 'Landmarks'
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageAnalysis object
*/
public Observable> analyzeImageInStreamWithServiceResponseAsync(byte[] image, List visualFeatures, String details, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
Validator.validate(visualFeatures);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
String visualFeaturesConverted = this.client.serializerAdapter().serializeList(visualFeatures, CollectionFormat.CSV);
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
return service.analyzeImageInStream(visualFeaturesConverted, details, language, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
@@ -1308,7 +1240,7 @@ public ImageAnalysis call(ServiceResponse response) {
/**
* This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@@ -1321,7 +1253,7 @@ public TextOperationResult getTextOperationResult(String operationId) {
/**
* This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
@@ -1333,7 +1265,7 @@ public ServiceFuture getTextOperationResultAsync(String ope
/**
* This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TextOperationResult object
*/
@@ -1349,18 +1281,18 @@ public TextOperationResult call(ServiceResponse response) {
/**
* This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
*
- * @param operationId Id of the text operation returned in the response of the 'Recognize Handwritten Text'
+ * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TextOperationResult object
*/
public Observable> getTextOperationResultWithServiceResponseAsync(String operationId) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (operationId == null) {
throw new IllegalArgumentException("Parameter operationId is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.getTextOperationResult(operationId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -1382,43 +1314,42 @@ private ServiceResponse getTextOperationResultDelegate(Resp
.build(response);
}
-
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image
- * @param recognizeTextOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
- public void recognizeText(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter) {
- recognizeTextWithServiceResponseAsync(url, recognizeTextOptionalParameter).toBlocking().single().body();
+ public void recognizeText(String url, TextRecognitionMode mode) {
+ recognizeTextWithServiceResponseAsync(url, mode).toBlocking().single().body();
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image
- * @param recognizeTextOptionalParameter 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 recognizeTextAsync(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(recognizeTextWithServiceResponseAsync(url, recognizeTextOptionalParameter), serviceCallback);
+ public ServiceFuture recognizeTextAsync(String url, TextRecognitionMode mode, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(recognizeTextWithServiceResponseAsync(url, mode), serviceCallback);
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image
- * @param recognizeTextOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable recognizeTextAsync(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter) {
- return recognizeTextWithServiceResponseAsync(url, recognizeTextOptionalParameter).map(new Func1, Void>() {
+ public Observable recognizeTextAsync(String url, TextRecognitionMode mode) {
+ return recognizeTextWithServiceResponseAsync(url, mode).map(new Func1, Void>() {
@Override
public Void call(ServiceResponseWithHeaders response) {
return response.body();
@@ -1427,44 +1358,27 @@ public Void call(ServiceResponseWithHeaders response
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
+ * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
*
+ * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
* @param url Publicly reachable URL of an image
- * @param recognizeTextOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable> recognizeTextWithServiceResponseAsync(String url, RecognizeTextOptionalParameter recognizeTextOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
- }
- if (url == null) {
- throw new IllegalArgumentException("Parameter url is required and cannot be null.");
+ public Observable> recognizeTextWithServiceResponseAsync(String url, TextRecognitionMode mode) {
+ if (this.client.endpoint() == null) {
+ throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
}
- final Boolean detectHandwriting = recognizeTextOptionalParameter != null ? recognizeTextOptionalParameter.detectHandwriting() : null;
-
- return recognizeTextWithServiceResponseAsync(url, detectHandwriting);
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Handwritten Text Operation Result operation.
- *
- * @param url Publicly reachable URL of an image
- * @param detectHandwriting If 'true' is specified, handwriting recognition is performed. If this parameter is set to 'false' or is not specified, printed text recognition is performed.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable> recognizeTextWithServiceResponseAsync(String url, Boolean detectHandwriting) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null.");
+ if (mode == null) {
+ throw new IllegalArgumentException("Parameter mode is required and cannot be null.");
}
if (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
- return service.recognizeText(detectHandwriting, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
+ return service.recognizeText(mode, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
public Observable> call(Response response) {
@@ -1485,55 +1399,6 @@ private ServiceResponseWithHeaders recognizeTextDele
.buildWithHeaders(response, RecognizeTextHeaders.class);
}
- @Override
- public ComputerVisionRecognizeTextParameters recognizeText() {
- return new ComputerVisionRecognizeTextParameters(this);
- }
-
- /**
- * Internal class implementing ComputerVisionRecognizeTextDefinition.
- */
- class ComputerVisionRecognizeTextParameters implements ComputerVisionRecognizeTextDefinition {
- private ComputerVisionImpl parent;
- private String url;
- private Boolean detectHandwriting;
-
- /**
- * Constructor.
- * @param parent the parent object.
- */
- ComputerVisionRecognizeTextParameters(ComputerVisionImpl parent) {
- this.parent = parent;
- }
-
- @Override
- public ComputerVisionRecognizeTextParameters withUrl(String url) {
- this.url = url;
- return this;
- }
-
- @Override
- public ComputerVisionRecognizeTextParameters withDetectHandwriting(Boolean detectHandwriting) {
- this.detectHandwriting = detectHandwriting;
- return this;
- }
-
- @Override
- public void execute() {
- recognizeTextWithServiceResponseAsync(url, detectHandwriting).toBlocking().single().body();
- }
-
- @Override
- public Observable executeAsync() {
- return recognizeTextWithServiceResponseAsync(url, detectHandwriting).map(new Func1, Void>() {
- @Override
- public Void call(ServiceResponseWithHeaders response) {
- return response.body();
- }
- });
- }
- }
-
/**
* This operation recognizes content within an image by applying a domain-specific model. The list of domain-specific models that are supported by the Computer Vision API can be retrieved using the /models GET request. Currently, the API only provides a single domain-specific model: celebrities. Two input methods are supported -- (1) Uploading an image or (2) specifying an image URL. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.
@@ -1592,8 +1457,8 @@ public DomainModelResults call(ServiceResponse response) {
* @return the observable to the DomainModelResults object
*/
public Observable> analyzeImageByDomainWithServiceResponseAsync(String model, String url, AnalyzeImageByDomainOptionalParameter analyzeImageByDomainOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (model == null) {
throw new IllegalArgumentException("Parameter model is required and cannot be null.");
@@ -1611,13 +1476,13 @@ public Observable> analyzeImageByDomainWithS
*
* @param model The domain-specific content to recognize.
* @param url Publicly reachable URL of an image
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the DomainModelResults object
*/
public Observable> analyzeImageByDomainWithServiceResponseAsync(String model, String url, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (model == null) {
throw new IllegalArgumentException("Parameter model is required and cannot be null.");
@@ -1627,7 +1492,7 @@ public Observable> analyzeImageByDomainWithS
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.analyzeImageByDomain(model, language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -1759,8 +1624,8 @@ public TagResult call(ServiceResponse response) {
* @return the observable to the TagResult object
*/
public Observable> tagImageWithServiceResponseAsync(String url, TagImageOptionalParameter tagImageOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -1774,20 +1639,20 @@ public Observable> tagImageWithServiceResponseAsync(S
* This operation generates a list of words, or tags, that are relevant to the content of the supplied image. The Computer Vision API can return tags based on objects, living beings, scenery or actions found in images. Unlike categories, tags are not organized according to a hierarchical classification system, but correspond to image content. Tags may contain hints to avoid ambiguity or provide context, for example the tag 'cello' may be accompanied by the hint 'musical instrument'. All tags are in English.
*
* @param url Publicly reachable URL of an image
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the TagResult object
*/
public Observable> tagImageWithServiceResponseAsync(String url, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.tagImage(language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -1912,8 +1777,8 @@ public ImageDescription call(ServiceResponse response) {
* @return the observable to the ImageDescription object
*/
public Observable> describeImageWithServiceResponseAsync(String url, DescribeImageOptionalParameter describeImageOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -1929,20 +1794,20 @@ public Observable> describeImageWithServiceRes
*
* @param url Publicly reachable URL of an image
* @param maxCandidates Maximum number of candidate descriptions to be returned. The default is 1.
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageDescription object
*/
public Observable> describeImageWithServiceResponseAsync(String url, String maxCandidates, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.describeImage(maxCandidates, language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -2078,8 +1943,8 @@ public OcrResult call(ServiceResponse response) {
* @return the observable to the OcrResult object
*/
public Observable> recognizePrintedTextWithServiceResponseAsync(boolean detectOrientation, String url, RecognizePrintedTextOptionalParameter recognizePrintedTextOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -2099,15 +1964,15 @@ public Observable> recognizePrintedTextWithServiceRes
* @return the observable to the OcrResult object
*/
public Observable> recognizePrintedTextWithServiceResponseAsync(boolean detectOrientation, String url, OcrLanguages language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.recognizePrintedText(detectOrientation, language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -2247,8 +2112,8 @@ public InputStream call(ServiceResponse response) {
* @return the observable to the InputStream object
*/
public Observable> generateThumbnailWithServiceResponseAsync(int width, int height, String url, GenerateThumbnailOptionalParameter generateThumbnailOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -2269,15 +2134,15 @@ public Observable> generateThumbnailWithServiceResp
* @return the observable to the InputStream object
*/
public Observable> generateThumbnailWithServiceResponseAsync(int width, int height, String url, Boolean smartCropping) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
}
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.generateThumbnail(width, height, smartCropping, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
@@ -2416,8 +2281,8 @@ public ImageAnalysis call(ServiceResponse response) {
* @return the observable to the ImageAnalysis object
*/
public Observable> analyzeImageWithServiceResponseAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -2435,13 +2300,13 @@ public Observable> analyzeImageWithServiceRespons
* @param url Publicly reachable URL of an image
* @param visualFeatures A string indicating what visual feature types to return. Multiple values should be comma-separated. Valid visual feature types include:Categories - categorizes image content according to a taxonomy defined in documentation. Tags - tags the image with a detailed list of words related to the image content. Description - describes the image content with a complete English sentence. Faces - detects if faces are present. If present, generate coordinates, gender and age. ImageType - detects if image is clipart or a line drawing. Color - determines the accent color, dominant color, and whether an image is black&white.Adult - detects if the image is pornographic in nature (depicts nudity or a sex act). Sexually suggestive content is also detected.
* @param details A string indicating which domain-specific details to return. Multiple values should be comma-separated. Valid visual feature types include:Celebrities - identifies celebrities if detected in the image.
- * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default.ja - Japanese pt - Portuguese zh - Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'
+ * @param language The desired language for output generation. If this parameter is not specified, the default value is "en".Supported languages:en - English, Default. es - Spanish, ja - Japanese, pt - Portuguese, zh - Simplified Chinese. Possible values include: 'en', 'es', 'ja', 'pt', 'zh'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ImageAnalysis object
*/
public Observable> analyzeImageWithServiceResponseAsync(String url, List visualFeatures, List details, String language) {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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 (url == null) {
throw new IllegalArgumentException("Parameter url is required and cannot be null.");
@@ -2450,7 +2315,7 @@ public Observable> analyzeImageWithServiceRespons
Validator.validate(details);
ImageUrl imageUrl = new ImageUrl();
imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
String visualFeaturesConverted = this.client.serializerAdapter().serializeList(visualFeatures, CollectionFormat.CSV);
String detailsConverted = this.client.serializerAdapter().serializeList(details, CollectionFormat.CSV);
return service.analyzeImage(visualFeaturesConverted, detailsConverted, language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
@@ -2582,10 +2447,10 @@ public ListModelsResult call(ServiceResponse response) {
* @return the observable to the ListModelsResult object
*/
public Observable> listModelsWithServiceResponseAsync() {
- if (this.client.azureRegion() == null) {
- throw new IllegalArgumentException("Parameter this.client.azureRegion() 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("{AzureRegion}", this.client.azureRegion());
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
return service.listModels(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
.flatMap(new Func1, Observable>>() {
@Override
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/package-info.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/package-info.java
index 70eaef23dc65..a0fdb3318f4b 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/package-info.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/package-info.java
@@ -5,7 +5,7 @@
// Code generated by Microsoft (R) AutoRest Code Generator.
/**
- * This package contains the implementation classes for ComputerVisionAPI.
+ * This package contains the implementation classes for ComputerVisionClient.
* The Computer Vision API provides state-of-the-art algorithms to process images and return information. For example, it can be used to determine if an image contains mature content, or it can be used to find all the faces in an image. It also has other features like estimating dominant and accent colors, categorizing the content of images, and describing an image with complete English sentences. Additionally, it can also intelligently generate images thumbnails for displaying large images effectively.
*/
package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainInStreamOptionalParameter.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainInStreamOptionalParameter.java
index 9847e2211cf1..2cafd3e4c7fb 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainInStreamOptionalParameter.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainInStreamOptionalParameter.java
@@ -16,8 +16,9 @@ public class AnalyzeImageByDomainInStreamOptionalParameter {
/**
* The desired language for output generation. If this parameter is not
* specified, the default value is "en".Supported
- * languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en',
+ * 'es', 'ja', 'pt', 'zh'.
*/
private String language;
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainOptionalParameter.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainOptionalParameter.java
index 90df476de561..afcd63f11b62 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainOptionalParameter.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageByDomainOptionalParameter.java
@@ -16,8 +16,9 @@ public class AnalyzeImageByDomainOptionalParameter {
/**
* The desired language for output generation. If this parameter is not
* specified, the default value is "en".Supported
- * languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en',
+ * 'es', 'ja', 'pt', 'zh'.
*/
private String language;
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageInStreamOptionalParameter.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageInStreamOptionalParameter.java
index 84768234a700..38bddc954426 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageInStreamOptionalParameter.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageInStreamOptionalParameter.java
@@ -40,8 +40,9 @@ public class AnalyzeImageInStreamOptionalParameter {
/**
* The desired language for output generation. If this parameter is not
* specified, the default value is "en".Supported
- * languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en',
+ * 'es', 'ja', 'pt', 'zh'.
*/
private String language;
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageOptionalParameter.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageOptionalParameter.java
index af8c23c736b7..5a5143962255 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageOptionalParameter.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeImageOptionalParameter.java
@@ -39,8 +39,9 @@ public class AnalyzeImageOptionalParameter {
/**
* The desired language for output generation. If this parameter is not
* specified, the default value is "en".Supported
- * languages:en - English, Default.ja - Japanese pt - Portuguese zh -
- * Simplified Chinese. Possible values include: 'en', 'ja', 'pt', 'zh'.
+ * languages:en - English, Default. es - Spanish, ja - Japanese, pt -
+ * Portuguese, zh - Simplified Chinese. Possible values include: 'en',
+ * 'es', 'ja', 'pt', 'zh'.
*/
private String language;
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AzureRegions.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AzureRegions.java
deleted file mode 100644
index 5700d0161fc8..000000000000
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AzureRegions.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Defines values for AzureRegions.
- */
-public enum AzureRegions {
- /** Enum value westus. */
- WESTUS("westus"),
-
- /** Enum value westeurope. */
- WESTEUROPE("westeurope"),
-
- /** Enum value southeastasia. */
- SOUTHEASTASIA("southeastasia"),
-
- /** Enum value eastus2. */
- EASTUS2("eastus2"),
-
- /** Enum value westcentralus. */
- WESTCENTRALUS("westcentralus"),
-
- /** Enum value westus2. */
- WESTUS2("westus2"),
-
- /** Enum value eastus. */
- EASTUS("eastus"),
-
- /** Enum value southcentralus. */
- SOUTHCENTRALUS("southcentralus"),
-
- /** Enum value northeurope. */
- NORTHEUROPE("northeurope"),
-
- /** Enum value eastasia. */
- EASTASIA("eastasia"),
-
- /** Enum value australiaeast. */
- AUSTRALIAEAST("australiaeast"),
-
- /** Enum value brazilsouth. */
- BRAZILSOUTH("brazilsouth");
-
- /** The actual serialized value for a AzureRegions instance. */
- private String value;
-
- AzureRegions(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a AzureRegions instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed AzureRegions object, or null if unable to parse.
- */
- @JsonCreator
- public static AzureRegions fromString(String value) {
- AzureRegions[] items = AzureRegions.values();
- for (AzureRegions item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Category.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Category.java
index dd592c4ccfdb..818eb79c30e4 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Category.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Category.java
@@ -24,7 +24,7 @@ public class Category {
* Scoring of the category.
*/
@JsonProperty(value = "score")
- private Double score;
+ private double score;
/**
* The detail property.
@@ -57,7 +57,7 @@ public Category withName(String name) {
*
* @return the score value
*/
- public Double score() {
+ public double score() {
return this.score;
}
@@ -67,7 +67,7 @@ public Double score() {
* @param score the score value to set
* @return the Category object itself.
*/
- public Category withScore(Double score) {
+ public Category withScore(double score) {
this.score = score;
return this;
}
diff --git a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/CategoryDetail.java b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/CategoryDetail.java
index 22e683f3b919..632b39319c57 100644
--- a/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/CategoryDetail.java
+++ b/cognitiveservices/data-plane/vision/computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/CategoryDetail.java
@@ -21,6 +21,12 @@ public class CategoryDetail {
@JsonProperty(value = "celebrities")
private List celebrities;
+ /**
+ * An array of landmarks if any identified.
+ */
+ @JsonProperty(value = "landmarks")
+ private List landmarks;
+
/**
* Get the celebrities value.
*
@@ -41,4 +47,24 @@ public CategoryDetail withCelebrities(List celebrities) {
return this;
}
+ /**
+ * Get the landmarks value.
+ *
+ * @return the landmarks value
+ */
+ public List landmarks() {
+ return this.landmarks;
+ }
+
+ /**
+ * Set the landmarks value.
+ *
+ * @param landmarks the landmarks value to set
+ * @return the CategoryDetail object itself.
+ */
+ public CategoryDetail withLandmarks(List