From 6144facc396c5646aff9534e0ab6bcce0bb34bfc Mon Sep 17 00:00:00 2001 From: Milis Date: Thu, 16 Aug 2018 11:31:11 -0700 Subject: [PATCH 1/3] Update LUIS Authoring auto-gen'ed SDK files using latest specs. --- .../luis/authoring/LUISAuthoringClient.java | 15 + .../authoring/implementation/AppsImpl.java | 182 +++- .../implementation/ExamplesImpl.java | 36 +- .../implementation/FeaturesImpl.java | 58 +- .../LUISAuthoringClientImpl.java | 25 +- .../authoring/implementation/ModelsImpl.java | 969 ++++++++++++++---- .../implementation/PatternsImpl.java | 71 +- .../implementation/PermissionsImpl.java | 42 +- .../authoring/implementation/TrainsImpl.java | 17 +- .../implementation/VersionsImpl.java | 77 +- .../language/luis/runtime/LuisRuntimeAPI.java | 15 + .../implementation/LuisRuntimeAPIImpl.java | 25 +- .../implementation/PredictionsImpl.java | 12 +- .../luis/runtime/models/EntityModel.java | 12 +- 14 files changed, 1224 insertions(+), 332 deletions(-) diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringClient.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringClient.java index a3b9b84e9d9c..065cc8cbd49e 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringClient.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringClient.java @@ -35,6 +35,21 @@ public interface LUISAuthoringClient { */ String userAgent(); + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. + * + * @return the endpoint value. + */ + String endpoint(); + + /** + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. + * + * @param endpoint the endpoint value. + * @return the service client itself + */ + LUISAuthoringClient withEndpoint(String endpoint); + /** * Gets Gets or sets the preferred language for the response.. * diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java index 924eff8f513f..195089e73164 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/AppsImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateSettingsOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ApplicationCreateObject; @@ -83,84 +84,84 @@ public AppsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface AppsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps add" }) @POST("apps/") - Observable> add(@Body ApplicationCreateObject applicationCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> add(@Body ApplicationCreateObject applicationCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps list" }) @GET("apps/") - Observable> list(@Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps importMethod" }) @POST("apps/import") - Observable> importMethod(@Query("appName") String appName, @Body LuisApp luisApp, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> importMethod(@Query("appName") String appName, @Body LuisApp luisApp, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listCortanaEndpoints" }) @GET("apps/assistants") - Observable> listCortanaEndpoints(@Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCortanaEndpoints(@Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listDomains" }) @GET("apps/domains") - Observable> listDomains(@Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listDomains(@Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listUsageScenarios" }) @GET("apps/usagescenarios") - Observable> listUsageScenarios(@Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listUsageScenarios(@Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listSupportedCultures" }) @GET("apps/cultures") - Observable> listSupportedCultures(@Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listSupportedCultures(@Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps downloadQueryLogs" }) @GET("apps/{appId}/querylogs") @Streaming - Observable> downloadQueryLogs(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> downloadQueryLogs(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps get" }) @GET("apps/{appId}") - Observable> get(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps update" }) @PUT("apps/{appId}") - Observable> update(@Path("appId") UUID appId, @Body ApplicationUpdateObject applicationUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> update(@Path("appId") UUID appId, @Body ApplicationUpdateObject applicationUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps delete" }) @HTTP(path = "apps/{appId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> delete(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps publish" }) @POST("apps/{appId}/publish") - Observable> publish(@Path("appId") UUID appId, @Body ApplicationPublishObject applicationPublishObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> publish(@Path("appId") UUID appId, @Body ApplicationPublishObject applicationPublishObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps getSettings" }) @GET("apps/{appId}/settings") - Observable> getSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps updateSettings" }) @PUT("apps/{appId}/settings") - Observable> updateSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body ApplicationSettingUpdateObject applicationSettingUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body ApplicationSettingUpdateObject applicationSettingUpdateObject, @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.language.luis.authoring.Apps getPublishSettings" }) @GET("apps/{appId}/publishsettings") - Observable> getPublishSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPublishSettings(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps updatePublishSettings" }) @PUT("apps/{appId}/publishsettings") - Observable> updatePublishSettings(@Path("appId") UUID appId, @Body PublishSettingUpdateObject publishSettingUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePublishSettings(@Path("appId") UUID appId, @Body PublishSettingUpdateObject publishSettingUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listEndpoints" }) @GET("apps/{appId}/endpoints") - Observable> listEndpoints(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listEndpoints(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listAvailableCustomPrebuiltDomains" }) @GET("apps/customprebuiltdomains") - Observable> listAvailableCustomPrebuiltDomains(@Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAvailableCustomPrebuiltDomains(@Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps addCustomPrebuiltDomain" }) @POST("apps/customprebuiltdomains") - Observable> addCustomPrebuiltDomain(@Body PrebuiltDomainCreateObject prebuiltDomainCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addCustomPrebuiltDomain(@Body PrebuiltDomainCreateObject prebuiltDomainCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Apps listAvailableCustomPrebuiltDomainsForCulture" }) @GET("apps/customprebuiltdomains/{culture}") - Observable> listAvailableCustomPrebuiltDomainsForCulture(@Path("culture") String culture, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listAvailableCustomPrebuiltDomainsForCulture(@Path("culture") String culture, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -213,11 +214,15 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addWithServiceResponseAsync(ApplicationCreateObject applicationCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (applicationCreateObject == null) { throw new IllegalArgumentException("Parameter applicationCreateObject is required and cannot be null."); } Validator.validate(applicationCreateObject); - return service.add(applicationCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.add(applicationCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -288,6 +293,9 @@ public List call(ServiceResponse>> listWithServiceResponseAsync(ListAppsOptionalParameter listOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } final Integer skip = listOptionalParameter != null ? listOptionalParameter.skip() : null; final Integer take = listOptionalParameter != null ? listOptionalParameter.take() : null; @@ -303,7 +311,11 @@ public Observable>> listWithServic * @return the observable to the List<ApplicationInfoResponse> object */ public Observable>> listWithServiceResponseAsync(Integer skip, Integer take) { - return service.list(skip, take, this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.list(skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -317,7 +329,7 @@ public Observable>> call(Response< }); } - private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -427,6 +439,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> importMethodWithServiceResponseAsync(LuisApp luisApp, ImportMethodAppsOptionalParameter importMethodOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (luisApp == null) { throw new IllegalArgumentException("Parameter luisApp is required and cannot be null."); } @@ -445,11 +460,15 @@ public Observable> importMethodWithServiceResponseAsync(Lu * @return the observable to the UUID object */ public Observable> importMethodWithServiceResponseAsync(LuisApp luisApp, String appName) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (luisApp == null) { throw new IllegalArgumentException("Parameter luisApp is required and cannot be null."); } Validator.validate(luisApp); - return service.importMethod(appName, luisApp, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.importMethod(appName, luisApp, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -564,7 +583,11 @@ public PersonalAssistantsResponse call(ServiceResponse> listCortanaEndpointsWithServiceResponseAsync() { - return service.listCortanaEndpoints(this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listCortanaEndpoints(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -578,7 +601,7 @@ public Observable> call(Response listCortanaEndpointsDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse listCortanaEndpointsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(ErrorResponseException.class) @@ -630,7 +653,11 @@ public List call(ServiceResponse> response) { * @return the observable to the List<String> object */ public Observable>> listDomainsWithServiceResponseAsync() { - return service.listDomains(this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listDomains(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -644,7 +671,7 @@ public Observable>> call(Response res }); } - private ServiceResponse> listDomainsDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listDomainsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -696,7 +723,11 @@ public List call(ServiceResponse> response) { * @return the observable to the List<String> object */ public Observable>> listUsageScenariosWithServiceResponseAsync() { - return service.listUsageScenarios(this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listUsageScenarios(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -710,7 +741,7 @@ public Observable>> call(Response res }); } - private ServiceResponse> listUsageScenariosDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listUsageScenariosDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -762,7 +793,11 @@ public List call(ServiceResponse> respo * @return the observable to the List<AvailableCulture> object */ public Observable>> listSupportedCulturesWithServiceResponseAsync() { - return service.listSupportedCultures(this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listSupportedCultures(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -776,7 +811,7 @@ public Observable>> call(Response> listSupportedCulturesDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listSupportedCulturesDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -832,10 +867,14 @@ public InputStream call(ServiceResponse response) { * @return the observable to the InputStream object */ public Observable> downloadQueryLogsWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.downloadQueryLogs(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.downloadQueryLogs(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -905,10 +944,14 @@ public ApplicationInfoResponse call(ServiceResponse res * @return the observable to the ApplicationInfoResponse object */ public Observable> getWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.get(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.get(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -982,6 +1025,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateWithServiceResponseAsync(UUID appId, ApplicationUpdateObject applicationUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -989,7 +1035,8 @@ public Observable> updateWithServiceResponseAsy throw new IllegalArgumentException("Parameter applicationUpdateObject is required and cannot be null."); } Validator.validate(applicationUpdateObject); - return service.update(appId, applicationUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.update(appId, applicationUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1059,10 +1106,14 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.delete(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.delete(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1136,6 +1187,9 @@ public ProductionOrStagingEndpointInfo call(ServiceResponse> publishWithServiceResponseAsync(UUID appId, ApplicationPublishObject applicationPublishObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1143,7 +1197,8 @@ public Observable> publishWithS throw new IllegalArgumentException("Parameter applicationPublishObject is required and cannot be null."); } Validator.validate(applicationPublishObject); - return service.publish(appId, applicationPublishObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.publish(appId, applicationPublishObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1213,10 +1268,14 @@ public ApplicationSettings call(ServiceResponse response) { * @return the observable to the ApplicationSettings object */ public Observable> getSettingsWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.getSettings(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getSettings(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1291,6 +1350,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateSettingsWithServiceResponseAsync(UUID appId, UpdateSettingsOptionalParameter updateSettingsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1308,12 +1370,16 @@ public Observable> updateSettingsWithServiceRes * @return the observable to the OperationStatus object */ public Observable> updateSettingsWithServiceResponseAsync(UUID appId, boolean publicParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } ApplicationSettingUpdateObject applicationSettingUpdateObject = new ApplicationSettingUpdateObject(); applicationSettingUpdateObject.withPublicProperty(publicParameter); - return service.updateSettings(appId, this.client.acceptLanguage(), applicationSettingUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateSettings(appId, this.client.acceptLanguage(), applicationSettingUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1432,10 +1498,14 @@ public PublishSettings call(ServiceResponse response) { * @return the observable to the PublishSettings object */ public Observable> getPublishSettingsWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.getPublishSettings(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPublishSettings(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1509,6 +1579,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updatePublishSettingsWithServiceResponseAsync(UUID appId, PublishSettingUpdateObject publishSettingUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1516,7 +1589,8 @@ public Observable> updatePublishSettingsWithSer throw new IllegalArgumentException("Parameter publishSettingUpdateObject is required and cannot be null."); } Validator.validate(publishSettingUpdateObject); - return service.updatePublishSettings(appId, publishSettingUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePublishSettings(appId, publishSettingUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1586,10 +1660,14 @@ public Map call(ServiceResponse> response) { * @return the observable to the Map<String, String> object */ public Observable>> listEndpointsWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.listEndpoints(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listEndpoints(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1655,7 +1733,11 @@ public List call(ServiceResponse> response) * @return the observable to the List<PrebuiltDomain> object */ public Observable>> listAvailableCustomPrebuiltDomainsWithServiceResponseAsync() { - return service.listAvailableCustomPrebuiltDomains(this.client.acceptLanguage(), this.client.userAgent()) + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listAvailableCustomPrebuiltDomains(this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1669,7 +1751,7 @@ public Observable>> call(Response> listAvailableCustomPrebuiltDomainsDelegate(Response response) throws ErrorResponseException, IOException { + private ServiceResponse> listAvailableCustomPrebuiltDomainsDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { return this.client.restClient().responseBuilderFactory()., ErrorResponseException>newInstance(this.client.serializerAdapter()) .register(200, new TypeToken>() { }.getType()) .registerError(ErrorResponseException.class) @@ -1725,11 +1807,15 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addCustomPrebuiltDomainWithServiceResponseAsync(PrebuiltDomainCreateObject prebuiltDomainCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (prebuiltDomainCreateObject == null) { throw new IllegalArgumentException("Parameter prebuiltDomainCreateObject is required and cannot be null."); } Validator.validate(prebuiltDomainCreateObject); - return service.addCustomPrebuiltDomain(prebuiltDomainCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCustomPrebuiltDomain(prebuiltDomainCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1799,10 +1885,14 @@ public List call(ServiceResponse> response) * @return the observable to the List<PrebuiltDomain> object */ public Observable>> listAvailableCustomPrebuiltDomainsForCultureWithServiceResponseAsync(String culture) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (culture == null) { throw new IllegalArgumentException("Parameter culture is required and cannot be null."); } - return service.listAvailableCustomPrebuiltDomainsForCulture(culture, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listAvailableCustomPrebuiltDomainsForCulture(culture, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java index 9eff79626adc..c92923209531 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ExamplesImpl.java @@ -11,6 +11,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ListExamplesOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Examples; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.BatchLabelExample; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; @@ -66,19 +67,19 @@ public ExamplesImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface ExamplesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Examples add" }) @POST("apps/{appId}/versions/{versionId}/example") - Observable> add(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body ExampleLabelObject exampleLabelObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> add(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body ExampleLabelObject exampleLabelObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Examples batch" }) @POST("apps/{appId}/versions/{versionId}/examples") - Observable> batch(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List exampleLabelObjectArray, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> batch(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List exampleLabelObjectArray, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Examples list" }) @GET("apps/{appId}/versions/{versionId}/examples") - Observable> list(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Examples delete" }) @HTTP(path = "apps/{appId}/versions/{versionId}/examples/{exampleId}", method = "DELETE", hasBody = true) - Observable> delete(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("exampleId") int exampleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> delete(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("exampleId") int exampleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -139,6 +140,9 @@ public LabelExampleResponse call(ServiceResponse response) * @return the observable to the LabelExampleResponse object */ public Observable> addWithServiceResponseAsync(UUID appId, String versionId, ExampleLabelObject exampleLabelObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -149,7 +153,8 @@ public Observable> addWithServiceResponseA throw new IllegalArgumentException("Parameter exampleLabelObject is required and cannot be null."); } Validator.validate(exampleLabelObject); - return service.add(appId, versionId, exampleLabelObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.add(appId, versionId, exampleLabelObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -227,6 +232,9 @@ public List call(ServiceResponse> res * @return the observable to the List<BatchLabelExample> object */ public Observable>> batchWithServiceResponseAsync(UUID appId, String versionId, List exampleLabelObjectArray) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -237,7 +245,8 @@ public Observable>> batchWithServiceResp throw new IllegalArgumentException("Parameter exampleLabelObjectArray is required and cannot be null."); } Validator.validate(exampleLabelObjectArray); - return service.batch(appId, versionId, exampleLabelObjectArray, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.batch(appId, versionId, exampleLabelObjectArray, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -317,6 +326,9 @@ public List call(ServiceResponse> respo * @return the observable to the List<LabeledUtterance> object */ public Observable>> listWithServiceResponseAsync(UUID appId, String versionId, ListExamplesOptionalParameter listOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -340,13 +352,17 @@ public Observable>> listWithServiceRespon * @return the observable to the List<LabeledUtterance> object */ public Observable>> listWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.list(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.list(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -487,13 +503,17 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteWithServiceResponseAsync(UUID appId, String versionId, int exampleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.delete(appId, versionId, exampleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.delete(appId, versionId, exampleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java index 07627d490851..cfb7f11b0d4e 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdatePhraseListOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Features; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.FeaturesResponseObject; @@ -69,27 +70,27 @@ public FeaturesImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface FeaturesService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features addPhraseList" }) @POST("apps/{appId}/versions/{versionId}/phraselists") - Observable> addPhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PhraselistCreateObject phraselistCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addPhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PhraselistCreateObject phraselistCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features listPhraseLists" }) @GET("apps/{appId}/versions/{versionId}/phraselists") - Observable> listPhraseLists(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listPhraseLists(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features list" }) @GET("apps/{appId}/versions/{versionId}/features") - Observable> list(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features getPhraseList" }) @GET("apps/{appId}/versions/{versionId}/phraselists/{phraselistId}") - Observable> getPhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features updatePhraseList" }) @PUT("apps/{appId}/versions/{versionId}/phraselists/{phraselistId}") - Observable> updatePhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Body PhraselistUpdateObject phraselistUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Body PhraselistUpdateObject phraselistUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Features deletePhraseList" }) @HTTP(path = "apps/{appId}/versions/{versionId}/phraselists/{phraselistId}", method = "DELETE", hasBody = true) - Observable> deletePhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePhraseList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("phraselistId") int phraselistId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -150,6 +151,9 @@ public Integer call(ServiceResponse response) { * @return the observable to the Integer object */ public Observable> addPhraseListWithServiceResponseAsync(UUID appId, String versionId, PhraselistCreateObject phraselistCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -160,7 +164,8 @@ public Observable> addPhraseListWithServiceResponseAsyn throw new IllegalArgumentException("Parameter phraselistCreateObject is required and cannot be null."); } Validator.validate(phraselistCreateObject); - return service.addPhraseList(appId, versionId, phraselistCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addPhraseList(appId, versionId, phraselistCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -239,6 +244,9 @@ public List call(ServiceResponse>> listPhraseListsWithServiceResponseAsync(UUID appId, String versionId, ListPhraseListsOptionalParameter listPhraseListsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -262,13 +270,17 @@ public Observable>> listPhraseListsW * @return the observable to the List<PhraseListFeatureInfo> object */ public Observable>> listPhraseListsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listPhraseLists(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listPhraseLists(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -410,6 +422,9 @@ public FeaturesResponseObject call(ServiceResponse respo * @return the observable to the FeaturesResponseObject object */ public Observable> listWithServiceResponseAsync(UUID appId, String versionId, ListFeaturesOptionalParameter listOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -433,13 +448,17 @@ public Observable> listWithServiceRespon * @return the observable to the FeaturesResponseObject object */ public Observable> listWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.list(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.list(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -580,13 +599,17 @@ public PhraseListFeatureInfo call(ServiceResponse respons * @return the observable to the PhraseListFeatureInfo object */ public Observable> getPhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.getPhraseList(appId, versionId, phraselistId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPhraseList(appId, versionId, phraselistId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -669,6 +692,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updatePhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId, UpdatePhraseListOptionalParameter updatePhraseListOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -691,6 +717,9 @@ public Observable> updatePhraseListWithServiceR * @return the observable to the OperationStatus object */ public Observable> updatePhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId, PhraselistUpdateObject phraselistUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -698,7 +727,8 @@ public Observable> updatePhraseListWithServiceR throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } Validator.validate(phraselistUpdateObject); - return service.updatePhraseList(appId, versionId, phraselistId, phraselistUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePhraseList(appId, versionId, phraselistId, phraselistUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -839,13 +869,17 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePhraseListWithServiceResponseAsync(UUID appId, String versionId, int phraselistId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.deletePhraseList(appId, versionId, phraselistId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePhraseList(appId, versionId, phraselistId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/LUISAuthoringClientImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/LUISAuthoringClientImpl.java index 89f5a0a8803c..accd92be520a 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/LUISAuthoringClientImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/LUISAuthoringClientImpl.java @@ -37,6 +37,29 @@ public AzureClient getAzureClient() { return this.azureClient; } + /** Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). */ + private String endpoint; + + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * + * @param endpoint the endpoint value. + * @return the service client itself + */ + public LUISAuthoringClientImpl withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + /** Gets or sets the preferred language for the response. */ private String acceptLanguage; @@ -216,7 +239,7 @@ public Patterns patterns() { * @param credentials the management credentials for Azure */ public LUISAuthoringClientImpl(ServiceClientCredentials credentials) { - this("https://api.cognitive.microsoft.com/luis/api/v2.0", credentials); + this("https://{endpoint}/luis/api/v2.0", credentials); } /** diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java index 69e8f5414d95..5e5798398c5f 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/ModelsImpl.java @@ -50,6 +50,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdateExplicitListItemOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Models; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.CloudException; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.AvailablePrebuiltEntityModel; @@ -143,427 +144,427 @@ public ModelsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface ModelsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addIntent" }) @POST("apps/{appId}/versions/{versionId}/intents") - Observable> addIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body ModelCreateObject intentCreateObject, @Header("User-Agent") String userAgent); + Observable> addIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body ModelCreateObject intentCreateObject, @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.language.luis.authoring.Models listIntents" }) @GET("apps/{appId}/versions/{versionId}/intents") - Observable> listIntents(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listIntents(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addEntity" }) @POST("apps/{appId}/versions/{versionId}/entities") - Observable> addEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body ModelCreateObject modelCreateObject, @Header("User-Agent") String userAgent); + Observable> addEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body ModelCreateObject modelCreateObject, @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.language.luis.authoring.Models listEntities" }) @GET("apps/{appId}/versions/{versionId}/entities") - Observable> listEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addHierarchicalEntity" }) @POST("apps/{appId}/versions/{versionId}/hierarchicalentities") - Observable> addHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body HierarchicalEntityModel hierarchicalModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body HierarchicalEntityModel hierarchicalModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listHierarchicalEntities" }) @GET("apps/{appId}/versions/{versionId}/hierarchicalentities") - Observable> listHierarchicalEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listHierarchicalEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addCompositeEntity" }) @POST("apps/{appId}/versions/{versionId}/compositeentities") - Observable> addCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body CompositeEntityModel compositeModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body CompositeEntityModel compositeModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listCompositeEntities" }) @GET("apps/{appId}/versions/{versionId}/compositeentities") - Observable> listCompositeEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCompositeEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listClosedLists" }) @GET("apps/{appId}/versions/{versionId}/closedlists") - Observable> listClosedLists(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listClosedLists(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addClosedList" }) @POST("apps/{appId}/versions/{versionId}/closedlists") - Observable> addClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body ClosedListModelCreateObject closedListModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body ClosedListModelCreateObject closedListModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addPrebuilt" }) @POST("apps/{appId}/versions/{versionId}/prebuilts") - Observable> addPrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List prebuiltExtractorNames, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addPrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List prebuiltExtractorNames, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listPrebuilts" }) @GET("apps/{appId}/versions/{versionId}/prebuilts") - Observable> listPrebuilts(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listPrebuilts(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listPrebuiltEntities" }) @GET("apps/{appId}/versions/{versionId}/listprebuilts") - Observable> listPrebuiltEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listPrebuiltEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listModels" }) @GET("apps/{appId}/versions/{versionId}/models") - Observable> listModels(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listModels(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models examplesMethod" }) @GET("apps/{appId}/versions/{versionId}/models/{modelId}/examples") - Observable> examplesMethod(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("modelId") String modelId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> examplesMethod(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("modelId") String modelId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getIntent" }) @GET("apps/{appId}/versions/{versionId}/intents/{intentId}") - Observable> getIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateIntent" }) @PUT("apps/{appId}/versions/{versionId}/intents/{intentId}") - Observable> updateIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Header("accept-language") String acceptLanguage, @Body ModelUpdateObject modelUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Header("accept-language") String acceptLanguage, @Body ModelUpdateObject modelUpdateObject, @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.language.luis.authoring.Models deleteIntent" }) @HTTP(path = "apps/{appId}/versions/{versionId}/intents/{intentId}", method = "DELETE", hasBody = true) - Observable> deleteIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("deleteUtterances") Boolean deleteUtterances, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("deleteUtterances") Boolean deleteUtterances, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getEntity" }) @GET("apps/{appId}/versions/{versionId}/entities/{entityId}") - Observable> getEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateEntity" }) @PUT("apps/{appId}/versions/{versionId}/entities/{entityId}") - Observable> updateEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body ModelUpdateObject modelUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body ModelUpdateObject modelUpdateObject, @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.language.luis.authoring.Models deleteEntity" }) @HTTP(path = "apps/{appId}/versions/{versionId}/entities/{entityId}", method = "DELETE", hasBody = true) - Observable> deleteEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getHierarchicalEntity" }) @GET("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}") - Observable> getHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateHierarchicalEntity" }) @PUT("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}") - Observable> updateHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Body HierarchicalEntityModel hierarchicalModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Body HierarchicalEntityModel hierarchicalModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deleteHierarchicalEntity" }) @HTTP(path = "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}", method = "DELETE", hasBody = true) - Observable> deleteHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteHierarchicalEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getCompositeEntity" }) @GET("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}") - Observable> getCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateCompositeEntity" }) @PUT("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}") - Observable> updateCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Body CompositeEntityModel compositeModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Body CompositeEntityModel compositeModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deleteCompositeEntity" }) @HTTP(path = "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}", method = "DELETE", hasBody = true) - Observable> deleteCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteCompositeEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getClosedList" }) @GET("apps/{appId}/versions/{versionId}/closedlists/{clEntityId}") - Observable> getClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateClosedList" }) @PUT("apps/{appId}/versions/{versionId}/closedlists/{clEntityId}") - Observable> updateClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Body ClosedListModelUpdateObject closedListModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Body ClosedListModelUpdateObject closedListModelUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models patchClosedList" }) @PATCH("apps/{appId}/versions/{versionId}/closedlists/{clEntityId}") - Observable> patchClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Body ClosedListModelPatchObject closedListModelPatchObject, @Header("User-Agent") String userAgent); + Observable> patchClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Body ClosedListModelPatchObject closedListModelPatchObject, @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.language.luis.authoring.Models deleteClosedList" }) @HTTP(path = "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}", method = "DELETE", hasBody = true) - Observable> deleteClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteClosedList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getPrebuilt" }) @GET("apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}") - Observable> getPrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("prebuiltId") UUID prebuiltId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("prebuiltId") UUID prebuiltId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deletePrebuilt" }) @HTTP(path = "apps/{appId}/versions/{versionId}/prebuilts/{prebuiltId}", method = "DELETE", hasBody = true) - Observable> deletePrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("prebuiltId") UUID prebuiltId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePrebuilt(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("prebuiltId") UUID prebuiltId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deleteSubList" }) @HTTP(path = "apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}", method = "DELETE", hasBody = true) - Observable> deleteSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Path("subListId") int subListId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Path("subListId") int subListId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateSubList" }) @PUT("apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists/{subListId}") - Observable> updateSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Path("subListId") int subListId, @Body WordListBaseUpdateObject wordListBaseUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Path("subListId") int subListId, @Body WordListBaseUpdateObject wordListBaseUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getIntentSuggestions" }) @GET("apps/{appId}/versions/{versionId}/intents/{intentId}/suggest") - Observable> getIntentSuggestions(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getIntentSuggestions(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getEntitySuggestions" }) @GET("apps/{appId}/versions/{versionId}/entities/{entityId}/suggest") - Observable> getEntitySuggestions(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getEntitySuggestions(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addSubList" }) @POST("apps/{appId}/versions/{versionId}/closedlists/{clEntityId}/sublists") - Observable> addSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Body WordListObject wordListCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addSubList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("clEntityId") UUID clEntityId, @Body WordListObject wordListCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addCustomPrebuiltDomain" }) @POST("apps/{appId}/versions/{versionId}/customprebuiltdomains") - Observable> addCustomPrebuiltDomain(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body PrebuiltDomainCreateBaseObject prebuiltDomainObject, @Header("User-Agent") String userAgent); + Observable> addCustomPrebuiltDomain(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body PrebuiltDomainCreateBaseObject prebuiltDomainObject, @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.language.luis.authoring.Models addCustomPrebuiltIntent" }) @POST("apps/{appId}/versions/{versionId}/customprebuiltintents") - Observable> addCustomPrebuiltIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addCustomPrebuiltIntent(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listCustomPrebuiltIntents" }) @GET("apps/{appId}/versions/{versionId}/customprebuiltintents") - Observable> listCustomPrebuiltIntents(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCustomPrebuiltIntents(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addCustomPrebuiltEntity" }) @POST("apps/{appId}/versions/{versionId}/customprebuiltentities") - Observable> addCustomPrebuiltEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addCustomPrebuiltEntity(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listCustomPrebuiltEntities" }) @GET("apps/{appId}/versions/{versionId}/customprebuiltentities") - Observable> listCustomPrebuiltEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCustomPrebuiltEntities(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models listCustomPrebuiltModels" }) @GET("apps/{appId}/versions/{versionId}/customprebuiltmodels") - Observable> listCustomPrebuiltModels(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> listCustomPrebuiltModels(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deleteCustomPrebuiltDomain" }) @HTTP(path = "apps/{appId}/versions/{versionId}/customprebuiltdomains/{domainName}", method = "DELETE", hasBody = true) - Observable> deleteCustomPrebuiltDomain(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("domainName") String domainName, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteCustomPrebuiltDomain(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("domainName") String domainName, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getHierarchicalEntityChild" }) @GET("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}") - Observable> getHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateHierarchicalEntityChild" }) @PUT("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}") - Observable> updateHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Body HierarchicalChildModelUpdateObject hierarchicalChildModelUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Body HierarchicalChildModelUpdateObject hierarchicalChildModelUpdateObject, @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.language.luis.authoring.Models deleteHierarchicalEntityChild" }) @HTTP(path = "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children/{hChildId}", method = "DELETE", hasBody = true) - Observable> deleteHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("hChildId") UUID hChildId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addHierarchicalEntityChild" }) @POST("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/children") - Observable> addHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Body HierarchicalChildModelCreateObject hierarchicalChildModelCreateObject, @Header("User-Agent") String userAgent); + Observable> addHierarchicalEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Body HierarchicalChildModelCreateObject hierarchicalChildModelCreateObject, @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.language.luis.authoring.Models addCompositeEntityChild" }) @POST("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children") - Observable> addCompositeEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Body CompositeChildModelCreateObject compositeChildModelCreateObject, @Header("User-Agent") String userAgent); + Observable> addCompositeEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Body CompositeChildModelCreateObject compositeChildModelCreateObject, @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.language.luis.authoring.Models deleteCompositeEntityChild" }) @HTTP(path = "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/children/{cChildId}", method = "DELETE", hasBody = true) - Observable> deleteCompositeEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("cChildId") UUID cChildId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteCompositeEntityChild(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("cChildId") UUID cChildId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getRegexEntityInfos" }) @GET("apps/{appId}/versions/{versionId}/regexentities") - Observable> getRegexEntityInfos(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getRegexEntityInfos(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createRegexEntityModel" }) @POST("apps/{appId}/versions/{versionId}/regexentities") - Observable> createRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body RegexModelCreateObject regexEntityExtractorCreateObj, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body RegexModelCreateObject regexEntityExtractorCreateObj, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getPatternAnyEntityInfos" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities") - Observable> getPatternAnyEntityInfos(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPatternAnyEntityInfos(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createPatternAnyEntityModel" }) @POST("apps/{appId}/versions/{versionId}/patternanyentities") - Observable> createPatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PatternAnyModelCreateObject extractorCreateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> createPatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PatternAnyModelCreateObject extractorCreateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/entities/{entityId}/roles") - Observable> getEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createEntityRole" }) @POST("apps/{appId}/versions/{versionId}/entities/{entityId}/roles") - Observable> createEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getPrebuiltEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles") - Observable> getPrebuiltEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPrebuiltEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createPrebuiltEntityRole" }) @POST("apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles") - Observable> createPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getClosedListEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles") - Observable> getClosedListEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getClosedListEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createClosedListEntityRole" }) @POST("apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles") - Observable> createClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getRegexEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles") - Observable> getRegexEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getRegexEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createRegexEntityRole" }) @POST("apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles") - Observable> createRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getCompositeEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles") - Observable> getCompositeEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCompositeEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createCompositeEntityRole" }) @POST("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles") - Observable> createCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getPatternAnyEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles") - Observable> getPatternAnyEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPatternAnyEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createPatternAnyEntityRole" }) @POST("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles") - Observable> createPatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createPatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getHierarchicalEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles") - Observable> getHierarchicalEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getHierarchicalEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createHierarchicalEntityRole" }) @POST("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles") - Observable> createHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getCustomPrebuiltEntityRoles" }) @GET("apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles") - Observable> getCustomPrebuiltEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCustomPrebuiltEntityRoles(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models createCustomPrebuiltEntityRole" }) @POST("apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles") - Observable> createCustomPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @Header("User-Agent") String userAgent); + Observable> createCustomPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body EntityRoleCreateObject entityRoleCreateObject, @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.language.luis.authoring.Models getExplicitList" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist") - Observable> getExplicitList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getExplicitList(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models addExplicitListItem" }) @POST("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist") - Observable> addExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body ExplicitListItemCreateObject item, @Header("User-Agent") String userAgent); + Observable> addExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Body ExplicitListItemCreateObject item, @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.language.luis.authoring.Models getRegexEntityEntityInfo" }) @GET("apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}") - Observable> getRegexEntityEntityInfo(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getRegexEntityEntityInfo(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateRegexEntityModel" }) @PUT("apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}") - Observable> updateRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Body RegexModelUpdateObject regexEntityUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updateRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Body RegexModelUpdateObject regexEntityUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deleteRegexEntityModel" }) @HTTP(path = "apps/{appId}/versions/{versionId}/regexentities/{regexEntityId}", method = "DELETE", hasBody = true) - Observable> deleteRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteRegexEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("regexEntityId") UUID regexEntityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getPatternAnyEntityInfo" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}") - Observable> getPatternAnyEntityInfo(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPatternAnyEntityInfo(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updatePatternAnyEntityModel" }) @PUT("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}") - Observable> updatePatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Body PatternAnyModelUpdateObject patternAnyUpdateObject, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Body PatternAnyModelUpdateObject patternAnyUpdateObject, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models deletePatternAnyEntityModel" }) @HTTP(path = "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}", method = "DELETE", hasBody = true) - Observable> deletePatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePatternAnyEntityModel(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getEntityRole" }) @GET("apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}") - Observable> getEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}") - Observable> updateEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/entities/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getPrebuiltEntityRole" }) @GET("apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}") - Observable> getPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updatePrebuiltEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}") - Observable> updatePrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updatePrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deletePrebuiltEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/prebuilts/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deletePrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getClosedListEntityRole" }) @GET("apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}") - Observable> getClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateClosedListEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}") - Observable> updateClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteClosedListEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/closedlists/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteClosedListEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getRegexEntityRole" }) @GET("apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}") - Observable> getRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateRegexEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}") - Observable> updateRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteRegexEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/regexentities/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteRegexEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getCompositeEntityRole" }) @GET("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}") - Observable> getCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateCompositeEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}") - Observable> updateCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteCompositeEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/compositeentities/{cEntityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteCompositeEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("cEntityId") UUID cEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getPatternAnyEntityRole" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}") - Observable> getPatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updatePatternAnyEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}") - Observable> updatePatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updatePatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deletePatternAnyEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deletePatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePatternAnyEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getHierarchicalEntityRole" }) @GET("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}") - Observable> getHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateHierarchicalEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}") - Observable> updateHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteHierarchicalEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/hierarchicalentities/{hEntityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteHierarchicalEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("hEntityId") UUID hEntityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getCustomEntityRole" }) @GET("apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}") - Observable> getCustomEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getCustomEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateCustomPrebuiltEntityRole" }) @PUT("apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}") - Observable> updateCustomPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @Header("User-Agent") String userAgent); + Observable> updateCustomPrebuiltEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Body EntityRoleUpdateObject entityRoleUpdateObject, @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.language.luis.authoring.Models deleteCustomEntityRole" }) @HTTP(path = "apps/{appId}/versions/{versionId}/customprebuiltentities/{entityId}/roles/{roleId}", method = "DELETE", hasBody = true) - Observable> deleteCustomEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteCustomEntityRole(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("roleId") UUID roleId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models getExplicitListItem" }) @GET("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}") - Observable> getExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Models updateExplicitListItem" }) @PUT("apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}") - Observable> updateExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Body ExplicitListItemUpdateObject item, @Header("User-Agent") String userAgent); + Observable> updateExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Body ExplicitListItemUpdateObject item, @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.language.luis.authoring.Models deleteExplicitListItem" }) @HTTP(path = "apps/{appId}/versions/{versionId}/patternanyentities/{entityId}/explicitlist/{itemId}", method = "DELETE", hasBody = true) - Observable> deleteExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteExplicitListItem(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("entityId") UUID entityId, @Path("itemId") long itemId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -625,6 +626,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addIntentWithServiceResponseAsync(UUID appId, String versionId, AddIntentOptionalParameter addIntentOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -646,6 +650,9 @@ public Observable> addIntentWithServiceResponseAsync(UUID * @return the observable to the UUID object */ public Observable> addIntentWithServiceResponseAsync(UUID appId, String versionId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -654,7 +661,8 @@ public Observable> addIntentWithServiceResponseAsync(UUID } ModelCreateObject intentCreateObject = new ModelCreateObject(); intentCreateObject.withName(name); - return service.addIntent(appId, versionId, this.client.acceptLanguage(), intentCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addIntent(appId, versionId, this.client.acceptLanguage(), intentCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -789,6 +797,9 @@ public List call(ServiceResponse> respo * @return the observable to the List<IntentClassifier> object */ public Observable>> listIntentsWithServiceResponseAsync(UUID appId, String versionId, ListIntentsOptionalParameter listIntentsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -812,13 +823,17 @@ public Observable>> listIntentsWithServic * @return the observable to the List<IntentClassifier> object */ public Observable>> listIntentsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listIntents(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listIntents(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -960,6 +975,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addEntityWithServiceResponseAsync(UUID appId, String versionId, AddEntityOptionalParameter addEntityOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -981,6 +999,9 @@ public Observable> addEntityWithServiceResponseAsync(UUID * @return the observable to the UUID object */ public Observable> addEntityWithServiceResponseAsync(UUID appId, String versionId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -989,7 +1010,8 @@ public Observable> addEntityWithServiceResponseAsync(UUID } ModelCreateObject modelCreateObject = new ModelCreateObject(); modelCreateObject.withName(name); - return service.addEntity(appId, versionId, this.client.acceptLanguage(), modelCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addEntity(appId, versionId, this.client.acceptLanguage(), modelCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1124,6 +1146,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<EntityExtractor> object */ public Observable>> listEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListEntitiesOptionalParameter listEntitiesOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1147,13 +1172,17 @@ public Observable>> listEntitiesWithServic * @return the observable to the List<EntityExtractor> object */ public Observable>> listEntitiesWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listEntities(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listEntities(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1294,6 +1323,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addHierarchicalEntityWithServiceResponseAsync(UUID appId, String versionId, HierarchicalEntityModel hierarchicalModelCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1304,7 +1336,8 @@ public Observable> addHierarchicalEntityWithServiceRespons throw new IllegalArgumentException("Parameter hierarchicalModelCreateObject is required and cannot be null."); } Validator.validate(hierarchicalModelCreateObject); - return service.addHierarchicalEntity(appId, versionId, hierarchicalModelCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addHierarchicalEntity(appId, versionId, hierarchicalModelCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1383,6 +1416,9 @@ public List call(ServiceResponse>> listHierarchicalEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListHierarchicalEntitiesOptionalParameter listHierarchicalEntitiesOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1406,13 +1442,17 @@ public Observable>> listHierar * @return the observable to the List<HierarchicalEntityExtractor> object */ public Observable>> listHierarchicalEntitiesWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listHierarchicalEntities(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listHierarchicalEntities(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1553,6 +1593,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, CompositeEntityModel compositeModelCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1563,7 +1606,8 @@ public Observable> addCompositeEntityWithServiceResponseAs throw new IllegalArgumentException("Parameter compositeModelCreateObject is required and cannot be null."); } Validator.validate(compositeModelCreateObject); - return service.addCompositeEntity(appId, versionId, compositeModelCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCompositeEntity(appId, versionId, compositeModelCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1642,6 +1686,9 @@ public List call(ServiceResponse>> listCompositeEntitiesWithServiceResponseAsync(UUID appId, String versionId, ListCompositeEntitiesOptionalParameter listCompositeEntitiesOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1665,13 +1712,17 @@ public Observable>> listComposite * @return the observable to the List<CompositeEntityExtractor> object */ public Observable>> listCompositeEntitiesWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listCompositeEntities(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listCompositeEntities(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1813,6 +1864,9 @@ public List call(ServiceResponse>> listClosedListsWithServiceResponseAsync(UUID appId, String versionId, ListClosedListsOptionalParameter listClosedListsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1836,13 +1890,17 @@ public Observable>> listClosedLi * @return the observable to the List<ClosedListEntityExtractor> object */ public Observable>> listClosedListsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listClosedLists(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listClosedLists(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -1983,6 +2041,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addClosedListWithServiceResponseAsync(UUID appId, String versionId, ClosedListModelCreateObject closedListModelCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1993,7 +2054,8 @@ public Observable> addClosedListWithServiceResponseAsync(U throw new IllegalArgumentException("Parameter closedListModelCreateObject is required and cannot be null."); } Validator.validate(closedListModelCreateObject); - return service.addClosedList(appId, versionId, closedListModelCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addClosedList(appId, versionId, closedListModelCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2071,6 +2133,9 @@ public List call(ServiceResponse>> addPrebuiltWithServiceResponseAsync(UUID appId, String versionId, List prebuiltExtractorNames) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2081,7 +2146,8 @@ public Observable>> addPrebuiltWit throw new IllegalArgumentException("Parameter prebuiltExtractorNames is required and cannot be null."); } Validator.validate(prebuiltExtractorNames); - return service.addPrebuilt(appId, versionId, prebuiltExtractorNames, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addPrebuilt(appId, versionId, prebuiltExtractorNames, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2160,6 +2226,9 @@ public List call(ServiceResponse>> listPrebuiltsWithServiceResponseAsync(UUID appId, String versionId, ListPrebuiltsOptionalParameter listPrebuiltsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2183,13 +2252,17 @@ public Observable>> listPrebuiltsW * @return the observable to the List<PrebuiltEntityExtractor> object */ public Observable>> listPrebuiltsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listPrebuilts(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listPrebuilts(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2326,13 +2399,17 @@ public List call(ServiceResponse>> listPrebuiltEntitiesWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listPrebuiltEntities(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listPrebuiltEntities(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2411,6 +2488,9 @@ public List call(ServiceResponse> res * @return the observable to the List<ModelInfoResponse> object */ public Observable>> listModelsWithServiceResponseAsync(UUID appId, String versionId, ListModelsOptionalParameter listModelsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2434,13 +2514,17 @@ public Observable>> listModelsWithServic * @return the observable to the List<ModelInfoResponse> object */ public Observable>> listModelsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listModels(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listModels(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2586,6 +2670,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<LabelTextObject> object */ public Observable>> examplesMethodWithServiceResponseAsync(UUID appId, String versionId, String modelId, ExamplesMethodOptionalParameter examplesMethodOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2613,6 +2700,9 @@ public Observable>> examplesMethodWithServ * @return the observable to the List<LabelTextObject> object */ public Observable>> examplesMethodWithServiceResponseAsync(UUID appId, String versionId, String modelId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2622,7 +2712,8 @@ public Observable>> examplesMethodWithServ if (modelId == null) { throw new IllegalArgumentException("Parameter modelId is required and cannot be null."); } - return service.examplesMethod(appId, versionId, modelId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.examplesMethod(appId, versionId, modelId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -2770,6 +2861,9 @@ public IntentClassifier call(ServiceResponse response) { * @return the observable to the IntentClassifier object */ public Observable> getIntentWithServiceResponseAsync(UUID appId, String versionId, UUID intentId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2779,7 +2873,8 @@ public Observable> getIntentWithServiceRespons if (intentId == null) { throw new IllegalArgumentException("Parameter intentId is required and cannot be null."); } - return service.getIntent(appId, versionId, intentId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getIntent(appId, versionId, intentId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -2862,6 +2957,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateIntentWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, UpdateIntentOptionalParameter updateIntentOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2887,6 +2985,9 @@ public Observable> updateIntentWithServiceRespo * @return the observable to the OperationStatus object */ public Observable> updateIntentWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -2898,7 +2999,8 @@ public Observable> updateIntentWithServiceRespo } ModelUpdateObject modelUpdateObject = new ModelUpdateObject(); modelUpdateObject.withName(name); - return service.updateIntent(appId, versionId, intentId, this.client.acceptLanguage(), modelUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateIntent(appId, versionId, intentId, this.client.acceptLanguage(), modelUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3044,6 +3146,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteIntentWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, DeleteIntentOptionalParameter deleteIntentOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3069,6 +3174,9 @@ public Observable> deleteIntentWithServiceRespo * @return the observable to the OperationStatus object */ public Observable> deleteIntentWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, Boolean deleteUtterances) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3078,7 +3186,8 @@ public Observable> deleteIntentWithServiceRespo if (intentId == null) { throw new IllegalArgumentException("Parameter intentId is required and cannot be null."); } - return service.deleteIntent(appId, versionId, intentId, deleteUtterances, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteIntent(appId, versionId, intentId, deleteUtterances, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3219,6 +3328,9 @@ public EntityExtractor call(ServiceResponse response) { * @return the observable to the EntityExtractor object */ public Observable> getEntityWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3228,7 +3340,8 @@ public Observable> getEntityWithServiceResponse if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getEntity(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getEntity(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3311,6 +3424,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateEntityWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UpdateEntityOptionalParameter updateEntityOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3336,6 +3452,9 @@ public Observable> updateEntityWithServiceRespo * @return the observable to the OperationStatus object */ public Observable> updateEntityWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3347,7 +3466,8 @@ public Observable> updateEntityWithServiceRespo } ModelUpdateObject modelUpdateObject = new ModelUpdateObject(); modelUpdateObject.withName(name); - return service.updateEntity(appId, versionId, entityId, this.client.acceptLanguage(), modelUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateEntity(appId, versionId, entityId, this.client.acceptLanguage(), modelUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3488,6 +3608,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteEntityWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3497,7 +3620,8 @@ public Observable> deleteEntityWithServiceRespo if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.deleteEntity(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteEntity(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3575,6 +3699,9 @@ public HierarchicalEntityExtractor call(ServiceResponse> getHierarchicalEntityWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3584,7 +3711,8 @@ public Observable> getHierarchicalE if (hEntityId == null) { throw new IllegalArgumentException("Parameter hEntityId is required and cannot be null."); } - return service.getHierarchicalEntity(appId, versionId, hEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getHierarchicalEntity(appId, versionId, hEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3666,6 +3794,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateHierarchicalEntityWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, HierarchicalEntityModel hierarchicalModelUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3679,7 +3810,8 @@ public Observable> updateHierarchicalEntityWith throw new IllegalArgumentException("Parameter hierarchicalModelUpdateObject is required and cannot be null."); } Validator.validate(hierarchicalModelUpdateObject); - return service.updateHierarchicalEntity(appId, versionId, hEntityId, hierarchicalModelUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateHierarchicalEntity(appId, versionId, hEntityId, hierarchicalModelUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3757,6 +3889,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteHierarchicalEntityWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3766,7 +3901,8 @@ public Observable> deleteHierarchicalEntityWith if (hEntityId == null) { throw new IllegalArgumentException("Parameter hEntityId is required and cannot be null."); } - return service.deleteHierarchicalEntity(appId, versionId, hEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteHierarchicalEntity(appId, versionId, hEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3844,6 +3980,9 @@ public CompositeEntityExtractor call(ServiceResponse r * @return the observable to the CompositeEntityExtractor object */ public Observable> getCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3853,7 +3992,8 @@ public Observable> getCompositeEntityW if (cEntityId == null) { throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null."); } - return service.getCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -3935,6 +4075,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, CompositeEntityModel compositeModelUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -3948,7 +4091,8 @@ public Observable> updateCompositeEntityWithSer throw new IllegalArgumentException("Parameter compositeModelUpdateObject is required and cannot be null."); } Validator.validate(compositeModelUpdateObject); - return service.updateCompositeEntity(appId, versionId, cEntityId, compositeModelUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateCompositeEntity(appId, versionId, cEntityId, compositeModelUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4026,6 +4170,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteCompositeEntityWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4035,7 +4182,8 @@ public Observable> deleteCompositeEntityWithSer if (cEntityId == null) { throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null."); } - return service.deleteCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteCompositeEntity(appId, versionId, cEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4113,6 +4261,9 @@ public ClosedListEntityExtractor call(ServiceResponse * @return the observable to the ClosedListEntityExtractor object */ public Observable> getClosedListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4122,7 +4273,8 @@ public Observable> getClosedListWithS if (clEntityId == null) { throw new IllegalArgumentException("Parameter clEntityId is required and cannot be null."); } - return service.getClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4204,6 +4356,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateClosedListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, ClosedListModelUpdateObject closedListModelUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4217,7 +4372,8 @@ public Observable> updateClosedListWithServiceR throw new IllegalArgumentException("Parameter closedListModelUpdateObject is required and cannot be null."); } Validator.validate(closedListModelUpdateObject); - return service.updateClosedList(appId, versionId, clEntityId, closedListModelUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateClosedList(appId, versionId, clEntityId, closedListModelUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4300,6 +4456,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> patchClosedListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, PatchClosedListOptionalParameter patchClosedListOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4325,6 +4484,9 @@ public Observable> patchClosedListWithServiceRe * @return the observable to the OperationStatus object */ public Observable> patchClosedListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, List subLists) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4337,7 +4499,8 @@ public Observable> patchClosedListWithServiceRe Validator.validate(subLists); ClosedListModelPatchObject closedListModelPatchObject = new ClosedListModelPatchObject(); closedListModelPatchObject.withSubLists(subLists); - return service.patchClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), closedListModelPatchObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.patchClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), closedListModelPatchObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4478,6 +4641,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteClosedListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4487,7 +4653,8 @@ public Observable> deleteClosedListWithServiceR if (clEntityId == null) { throw new IllegalArgumentException("Parameter clEntityId is required and cannot be null."); } - return service.deleteClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteClosedList(appId, versionId, clEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4565,6 +4732,9 @@ public PrebuiltEntityExtractor call(ServiceResponse res * @return the observable to the PrebuiltEntityExtractor object */ public Observable> getPrebuiltWithServiceResponseAsync(UUID appId, String versionId, UUID prebuiltId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4574,7 +4744,8 @@ public Observable> getPrebuiltWithServi if (prebuiltId == null) { throw new IllegalArgumentException("Parameter prebuiltId is required and cannot be null."); } - return service.getPrebuilt(appId, versionId, prebuiltId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPrebuilt(appId, versionId, prebuiltId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4652,6 +4823,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePrebuiltWithServiceResponseAsync(UUID appId, String versionId, UUID prebuiltId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4661,7 +4835,8 @@ public Observable> deletePrebuiltWithServiceRes if (prebuiltId == null) { throw new IllegalArgumentException("Parameter prebuiltId is required and cannot be null."); } - return service.deletePrebuilt(appId, versionId, prebuiltId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePrebuilt(appId, versionId, prebuiltId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4743,6 +4918,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteSubListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, int subListId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4752,7 +4930,8 @@ public Observable> deleteSubListWithServiceResp if (clEntityId == null) { throw new IllegalArgumentException("Parameter clEntityId is required and cannot be null."); } - return service.deleteSubList(appId, versionId, clEntityId, subListId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteSubList(appId, versionId, clEntityId, subListId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4838,6 +5017,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateSubListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, int subListId, WordListBaseUpdateObject wordListBaseUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4851,7 +5033,8 @@ public Observable> updateSubListWithServiceResp throw new IllegalArgumentException("Parameter wordListBaseUpdateObject is required and cannot be null."); } Validator.validate(wordListBaseUpdateObject); - return service.updateSubList(appId, versionId, clEntityId, subListId, wordListBaseUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateSubList(appId, versionId, clEntityId, subListId, wordListBaseUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -4934,6 +5117,9 @@ public List call(ServiceResponse>> getIntentSuggestionsWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, GetIntentSuggestionsOptionalParameter getIntentSuggestionsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4959,6 +5145,9 @@ public Observable>> getIntentSugg * @return the observable to the List<IntentsSuggestionExample> object */ public Observable>> getIntentSuggestionsWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -4968,7 +5157,8 @@ public Observable>> getIntentSugg if (intentId == null) { throw new IllegalArgumentException("Parameter intentId is required and cannot be null."); } - return service.getIntentSuggestions(appId, versionId, intentId, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getIntentSuggestions(appId, versionId, intentId, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5114,6 +5304,9 @@ public List call(ServiceResponse>> getEntitySuggestionsWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, GetEntitySuggestionsOptionalParameter getEntitySuggestionsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5139,6 +5332,9 @@ public Observable>> getEntitySug * @return the observable to the List<EntitiesSuggestionExample> object */ public Observable>> getEntitySuggestionsWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5148,7 +5344,8 @@ public Observable>> getEntitySug if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getEntitySuggestions(appId, versionId, entityId, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getEntitySuggestions(appId, versionId, entityId, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5293,6 +5490,9 @@ public Integer call(ServiceResponse response) { * @return the observable to the Integer object */ public Observable> addSubListWithServiceResponseAsync(UUID appId, String versionId, UUID clEntityId, WordListObject wordListCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5306,7 +5506,8 @@ public Observable> addSubListWithServiceResponseAsync(U throw new IllegalArgumentException("Parameter wordListCreateObject is required and cannot be null."); } Validator.validate(wordListCreateObject); - return service.addSubList(appId, versionId, clEntityId, wordListCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addSubList(appId, versionId, clEntityId, wordListCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -5385,6 +5586,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<UUID> object */ public Observable>> addCustomPrebuiltDomainWithServiceResponseAsync(UUID appId, String versionId, AddCustomPrebuiltDomainModelsOptionalParameter addCustomPrebuiltDomainOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5406,6 +5610,9 @@ public Observable>> addCustomPrebuiltDomainWithServic * @return the observable to the List<UUID> object */ public Observable>> addCustomPrebuiltDomainWithServiceResponseAsync(UUID appId, String versionId, String domainName) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5414,7 +5621,8 @@ public Observable>> addCustomPrebuiltDomainWithServic } PrebuiltDomainCreateBaseObject prebuiltDomainObject = new PrebuiltDomainCreateBaseObject(); prebuiltDomainObject.withDomainName(domainName); - return service.addCustomPrebuiltDomain(appId, versionId, this.client.acceptLanguage(), prebuiltDomainObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCustomPrebuiltDomain(appId, versionId, this.client.acceptLanguage(), prebuiltDomainObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5548,6 +5756,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addCustomPrebuiltIntentWithServiceResponseAsync(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5558,7 +5769,8 @@ public Observable> addCustomPrebuiltIntentWithServiceRespo throw new IllegalArgumentException("Parameter prebuiltDomainModelCreateObject is required and cannot be null."); } Validator.validate(prebuiltDomainModelCreateObject); - return service.addCustomPrebuiltIntent(appId, versionId, prebuiltDomainModelCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCustomPrebuiltIntent(appId, versionId, prebuiltDomainModelCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -5632,13 +5844,17 @@ public List call(ServiceResponse> respo * @return the observable to the List<IntentClassifier> object */ public Observable>> listCustomPrebuiltIntentsWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listCustomPrebuiltIntents(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listCustomPrebuiltIntents(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5716,6 +5932,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addCustomPrebuiltEntityWithServiceResponseAsync(UUID appId, String versionId, PrebuiltDomainModelCreateObject prebuiltDomainModelCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5726,7 +5945,8 @@ public Observable> addCustomPrebuiltEntityWithServiceRespo throw new IllegalArgumentException("Parameter prebuiltDomainModelCreateObject is required and cannot be null."); } Validator.validate(prebuiltDomainModelCreateObject); - return service.addCustomPrebuiltEntity(appId, versionId, prebuiltDomainModelCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCustomPrebuiltEntity(appId, versionId, prebuiltDomainModelCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -5800,13 +6020,17 @@ public List call(ServiceResponse> respons * @return the observable to the List<EntityExtractor> object */ public Observable>> listCustomPrebuiltEntitiesWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listCustomPrebuiltEntities(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listCustomPrebuiltEntities(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5880,13 +6104,17 @@ public List call(ServiceResponse> * @return the observable to the List<CustomPrebuiltModel> object */ public Observable>> listCustomPrebuiltModelsWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.listCustomPrebuiltModels(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.listCustomPrebuiltModels(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -5964,6 +6192,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteCustomPrebuiltDomainWithServiceResponseAsync(UUID appId, String versionId, String domainName) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -5973,7 +6204,8 @@ public Observable> deleteCustomPrebuiltDomainWi if (domainName == null) { throw new IllegalArgumentException("Parameter domainName is required and cannot be null."); } - return service.deleteCustomPrebuiltDomain(appId, versionId, domainName, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteCustomPrebuiltDomain(appId, versionId, domainName, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6055,6 +6287,9 @@ public HierarchicalChildEntity call(ServiceResponse res * @return the observable to the HierarchicalChildEntity object */ public Observable> getHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6067,7 +6302,8 @@ public Observable> getHierarchicalEntit if (hChildId == null) { throw new IllegalArgumentException("Parameter hChildId is required and cannot be null."); } - return service.getHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6154,6 +6390,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId, UpdateHierarchicalEntityChildOptionalParameter updateHierarchicalEntityChildOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6183,6 +6422,9 @@ public Observable> updateHierarchicalEntityChil * @return the observable to the OperationStatus object */ public Observable> updateHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6197,7 +6439,8 @@ public Observable> updateHierarchicalEntityChil } HierarchicalChildModelUpdateObject hierarchicalChildModelUpdateObject = new HierarchicalChildModelUpdateObject(); hierarchicalChildModelUpdateObject.withName(name); - return service.updateHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), hierarchicalChildModelUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), hierarchicalChildModelUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6349,6 +6592,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID hChildId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6361,7 +6607,8 @@ public Observable> deleteHierarchicalEntityChil if (hChildId == null) { throw new IllegalArgumentException("Parameter hChildId is required and cannot be null."); } - return service.deleteHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteHierarchicalEntityChild(appId, versionId, hEntityId, hChildId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6444,6 +6691,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, AddHierarchicalEntityChildOptionalParameter addHierarchicalEntityChildOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6469,6 +6719,9 @@ public Observable> addHierarchicalEntityChildWithServiceRe * @return the observable to the UUID object */ public Observable> addHierarchicalEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6480,7 +6733,8 @@ public Observable> addHierarchicalEntityChildWithServiceRe } HierarchicalChildModelCreateObject hierarchicalChildModelCreateObject = new HierarchicalChildModelCreateObject(); hierarchicalChildModelCreateObject.withName(name); - return service.addHierarchicalEntityChild(appId, versionId, hEntityId, this.client.acceptLanguage(), hierarchicalChildModelCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addHierarchicalEntityChild(appId, versionId, hEntityId, this.client.acceptLanguage(), hierarchicalChildModelCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6626,6 +6880,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> addCompositeEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, AddCompositeEntityChildOptionalParameter addCompositeEntityChildOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6651,6 +6908,9 @@ public Observable> addCompositeEntityChildWithServiceRespo * @return the observable to the UUID object */ public Observable> addCompositeEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6662,7 +6922,8 @@ public Observable> addCompositeEntityChildWithServiceRespo } CompositeChildModelCreateObject compositeChildModelCreateObject = new CompositeChildModelCreateObject(); compositeChildModelCreateObject.withName(name); - return service.addCompositeEntityChild(appId, versionId, cEntityId, this.client.acceptLanguage(), compositeChildModelCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addCompositeEntityChild(appId, versionId, cEntityId, this.client.acceptLanguage(), compositeChildModelCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6807,6 +7068,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteCompositeEntityChildWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID cChildId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6819,7 +7083,8 @@ public Observable> deleteCompositeEntityChildWi if (cChildId == null) { throw new IllegalArgumentException("Parameter cChildId is required and cannot be null."); } - return service.deleteCompositeEntityChild(appId, versionId, cEntityId, cChildId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteCompositeEntityChild(appId, versionId, cEntityId, cChildId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -6898,6 +7163,9 @@ public List call(ServiceResponse>> getRegexEntityInfosWithServiceResponseAsync(UUID appId, String versionId, GetRegexEntityInfosOptionalParameter getRegexEntityInfosOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -6921,13 +7189,17 @@ public Observable>> getRegexEntityInf * @return the observable to the List<RegexEntityExtractor> object */ public Observable>> getRegexEntityInfosWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.getRegexEntityInfos(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getRegexEntityInfos(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -7068,6 +7340,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createRegexEntityModelWithServiceResponseAsync(UUID appId, String versionId, RegexModelCreateObject regexEntityExtractorCreateObj) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7078,7 +7353,8 @@ public Observable> createRegexEntityModelWithServiceRespon throw new IllegalArgumentException("Parameter regexEntityExtractorCreateObj is required and cannot be null."); } Validator.validate(regexEntityExtractorCreateObj); - return service.createRegexEntityModel(appId, versionId, regexEntityExtractorCreateObj, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createRegexEntityModel(appId, versionId, regexEntityExtractorCreateObj, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -7157,6 +7433,9 @@ public List call(ServiceResponse>> getPatternAnyEntityInfosWithServiceResponseAsync(UUID appId, String versionId, GetPatternAnyEntityInfosOptionalParameter getPatternAnyEntityInfosOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7180,13 +7459,17 @@ public Observable>> getPatternAn * @return the observable to the List<PatternAnyEntityExtractor> object */ public Observable>> getPatternAnyEntityInfosWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.getPatternAnyEntityInfos(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPatternAnyEntityInfos(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -7327,6 +7610,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createPatternAnyEntityModelWithServiceResponseAsync(UUID appId, String versionId, PatternAnyModelCreateObject extractorCreateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7337,7 +7623,8 @@ public Observable> createPatternAnyEntityModelWithServiceR throw new IllegalArgumentException("Parameter extractorCreateObject is required and cannot be null."); } Validator.validate(extractorCreateObject); - return service.createPatternAnyEntityModel(appId, versionId, extractorCreateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createPatternAnyEntityModel(appId, versionId, extractorCreateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -7415,6 +7702,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7424,7 +7714,8 @@ public Observable>> getEntityRolesWithServiceRe if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -7507,6 +7798,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreateEntityRoleOptionalParameter createEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7532,6 +7826,9 @@ public Observable> createEntityRoleWithServiceResponseAsyn * @return the observable to the UUID object */ public Observable> createEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7543,7 +7840,8 @@ public Observable> createEntityRoleWithServiceResponseAsyn } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -7684,6 +7982,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getPrebuiltEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7693,7 +7994,8 @@ public Observable>> getPrebuiltEntityRolesWithS if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getPrebuiltEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPrebuiltEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -7776,6 +8078,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreatePrebuiltEntityRoleOptionalParameter createPrebuiltEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7801,6 +8106,9 @@ public Observable> createPrebuiltEntityRoleWithServiceResp * @return the observable to the UUID object */ public Observable> createPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7812,7 +8120,8 @@ public Observable> createPrebuiltEntityRoleWithServiceResp } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createPrebuiltEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createPrebuiltEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -7953,6 +8262,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getClosedListEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -7962,7 +8274,8 @@ public Observable>> getClosedListEntityRolesWit if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getClosedListEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getClosedListEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -8045,6 +8358,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreateClosedListEntityRoleOptionalParameter createClosedListEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8070,6 +8386,9 @@ public Observable> createClosedListEntityRoleWithServiceRe * @return the observable to the UUID object */ public Observable> createClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8081,7 +8400,8 @@ public Observable> createClosedListEntityRoleWithServiceRe } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createClosedListEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createClosedListEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -8222,6 +8542,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getRegexEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8231,7 +8554,8 @@ public Observable>> getRegexEntityRolesWithServ if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getRegexEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getRegexEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -8314,6 +8638,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreateRegexEntityRoleOptionalParameter createRegexEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8339,6 +8666,9 @@ public Observable> createRegexEntityRoleWithServiceRespons * @return the observable to the UUID object */ public Observable> createRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8350,7 +8680,8 @@ public Observable> createRegexEntityRoleWithServiceRespons } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createRegexEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createRegexEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -8491,6 +8822,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getCompositeEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8500,7 +8834,8 @@ public Observable>> getCompositeEntityRolesWith if (cEntityId == null) { throw new IllegalArgumentException("Parameter cEntityId is required and cannot be null."); } - return service.getCompositeEntityRoles(appId, versionId, cEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getCompositeEntityRoles(appId, versionId, cEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -8583,6 +8918,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, CreateCompositeEntityRoleOptionalParameter createCompositeEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8608,6 +8946,9 @@ public Observable> createCompositeEntityRoleWithServiceRes * @return the observable to the UUID object */ public Observable> createCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8619,7 +8960,8 @@ public Observable> createCompositeEntityRoleWithServiceRes } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createCompositeEntityRole(appId, versionId, cEntityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createCompositeEntityRole(appId, versionId, cEntityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -8760,6 +9102,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getPatternAnyEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8769,7 +9114,8 @@ public Observable>> getPatternAnyEntityRolesWit if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getPatternAnyEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPatternAnyEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -8852,6 +9198,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createPatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreatePatternAnyEntityRoleOptionalParameter createPatternAnyEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8877,6 +9226,9 @@ public Observable> createPatternAnyEntityRoleWithServiceRe * @return the observable to the UUID object */ public Observable> createPatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -8888,7 +9240,8 @@ public Observable> createPatternAnyEntityRoleWithServiceRe } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createPatternAnyEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createPatternAnyEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -9029,6 +9382,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getHierarchicalEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9038,7 +9394,8 @@ public Observable>> getHierarchicalEntityRolesW if (hEntityId == null) { throw new IllegalArgumentException("Parameter hEntityId is required and cannot be null."); } - return service.getHierarchicalEntityRoles(appId, versionId, hEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getHierarchicalEntityRoles(appId, versionId, hEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -9121,6 +9478,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, CreateHierarchicalEntityRoleOptionalParameter createHierarchicalEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9146,6 +9506,9 @@ public Observable> createHierarchicalEntityRoleWithService * @return the observable to the UUID object */ public Observable> createHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9157,7 +9520,8 @@ public Observable> createHierarchicalEntityRoleWithService } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createHierarchicalEntityRole(appId, versionId, hEntityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createHierarchicalEntityRole(appId, versionId, hEntityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -9298,6 +9662,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<EntityRole> object */ public Observable>> getCustomPrebuiltEntityRolesWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9307,7 +9674,8 @@ public Observable>> getCustomPrebuiltEntityRole if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getCustomPrebuiltEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getCustomPrebuiltEntityRoles(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -9390,6 +9758,9 @@ public UUID call(ServiceResponse response) { * @return the observable to the UUID object */ public Observable> createCustomPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, CreateCustomPrebuiltEntityRoleOptionalParameter createCustomPrebuiltEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9415,6 +9786,9 @@ public Observable> createCustomPrebuiltEntityRoleWithServi * @return the observable to the UUID object */ public Observable> createCustomPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9426,7 +9800,8 @@ public Observable> createCustomPrebuiltEntityRoleWithServi } EntityRoleCreateObject entityRoleCreateObject = new EntityRoleCreateObject(); entityRoleCreateObject.withName(name); - return service.createCustomPrebuiltEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.createCustomPrebuiltEntityRole(appId, versionId, entityId, this.client.acceptLanguage(), entityRoleCreateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -9567,6 +9942,9 @@ public List call(ServiceResponse> respo * @return the observable to the List<ExplicitListItem> object */ public Observable>> getExplicitListWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9576,7 +9954,8 @@ public Observable>> getExplicitListWithSe if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getExplicitList(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getExplicitList(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -9659,6 +10038,9 @@ public Integer call(ServiceResponse response) { * @return the observable to the Integer object */ public Observable> addExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, AddExplicitListItemOptionalParameter addExplicitListItemOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9684,6 +10066,9 @@ public Observable> addExplicitListItemWithServiceRespon * @return the observable to the Integer object */ public Observable> addExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, String explicitListItem) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9695,7 +10080,8 @@ public Observable> addExplicitListItemWithServiceRespon } ExplicitListItemCreateObject item = new ExplicitListItemCreateObject(); item.withExplicitListItem(explicitListItem); - return service.addExplicitListItem(appId, versionId, entityId, this.client.acceptLanguage(), item, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addExplicitListItem(appId, versionId, entityId, this.client.acceptLanguage(), item, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -9836,6 +10222,9 @@ public RegexEntityExtractor call(ServiceResponse response) * @return the observable to the RegexEntityExtractor object */ public Observable> getRegexEntityEntityInfoWithServiceResponseAsync(UUID appId, String versionId, UUID regexEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9845,7 +10234,8 @@ public Observable> getRegexEntityEntityInf if (regexEntityId == null) { throw new IllegalArgumentException("Parameter regexEntityId is required and cannot be null."); } - return service.getRegexEntityEntityInfo(appId, versionId, regexEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getRegexEntityEntityInfo(appId, versionId, regexEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -9927,6 +10317,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateRegexEntityModelWithServiceResponseAsync(UUID appId, String versionId, UUID regexEntityId, RegexModelUpdateObject regexEntityUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -9940,7 +10333,8 @@ public Observable> updateRegexEntityModelWithSe throw new IllegalArgumentException("Parameter regexEntityUpdateObject is required and cannot be null."); } Validator.validate(regexEntityUpdateObject); - return service.updateRegexEntityModel(appId, versionId, regexEntityId, regexEntityUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateRegexEntityModel(appId, versionId, regexEntityId, regexEntityUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10018,6 +10412,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteRegexEntityModelWithServiceResponseAsync(UUID appId, String versionId, UUID regexEntityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10027,7 +10424,8 @@ public Observable> deleteRegexEntityModelWithSe if (regexEntityId == null) { throw new IllegalArgumentException("Parameter regexEntityId is required and cannot be null."); } - return service.deleteRegexEntityModel(appId, versionId, regexEntityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteRegexEntityModel(appId, versionId, regexEntityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10105,6 +10503,9 @@ public PatternAnyEntityExtractor call(ServiceResponse * @return the observable to the PatternAnyEntityExtractor object */ public Observable> getPatternAnyEntityInfoWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10114,7 +10515,8 @@ public Observable> getPatternAnyEntit if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getPatternAnyEntityInfo(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPatternAnyEntityInfo(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10196,6 +10598,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updatePatternAnyEntityModelWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, PatternAnyModelUpdateObject patternAnyUpdateObject) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10209,7 +10614,8 @@ public Observable> updatePatternAnyEntityModelW throw new IllegalArgumentException("Parameter patternAnyUpdateObject is required and cannot be null."); } Validator.validate(patternAnyUpdateObject); - return service.updatePatternAnyEntityModel(appId, versionId, entityId, patternAnyUpdateObject, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePatternAnyEntityModel(appId, versionId, entityId, patternAnyUpdateObject, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10287,6 +10693,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePatternAnyEntityModelWithServiceResponseAsync(UUID appId, String versionId, UUID entityId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10296,7 +10705,8 @@ public Observable> deletePatternAnyEntityModelW if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.deletePatternAnyEntityModel(appId, versionId, entityId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePatternAnyEntityModel(appId, versionId, entityId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10378,6 +10788,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10390,7 +10803,8 @@ public Observable> getEntityRoleWithServiceResponseA if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10477,6 +10891,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateEntityRoleOptionalParameter updateEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10506,6 +10923,9 @@ public Observable> updateEntityRoleWithServiceR * @return the observable to the OperationStatus object */ public Observable> updateEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10520,7 +10940,8 @@ public Observable> updateEntityRoleWithServiceR } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10672,6 +11093,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10684,7 +11108,8 @@ public Observable> deleteEntityRoleWithServiceR if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10766,6 +11191,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10778,7 +11206,8 @@ public Observable> getPrebuiltEntityRoleWithServiceR if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getPrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -10865,6 +11294,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updatePrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdatePrebuiltEntityRoleOptionalParameter updatePrebuiltEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10894,6 +11326,9 @@ public Observable> updatePrebuiltEntityRoleWith * @return the observable to the OperationStatus object */ public Observable> updatePrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -10908,7 +11343,8 @@ public Observable> updatePrebuiltEntityRoleWith } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updatePrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11060,6 +11496,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11072,7 +11511,8 @@ public Observable> deletePrebuiltEntityRoleWith if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deletePrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11154,6 +11594,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11166,7 +11609,8 @@ public Observable> getClosedListEntityRoleWithServic if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11253,6 +11697,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateClosedListEntityRoleOptionalParameter updateClosedListEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11282,6 +11729,9 @@ public Observable> updateClosedListEntityRoleWi * @return the observable to the OperationStatus object */ public Observable> updateClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11296,7 +11746,8 @@ public Observable> updateClosedListEntityRoleWi } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11448,6 +11899,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteClosedListEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11460,7 +11914,8 @@ public Observable> deleteClosedListEntityRoleWi if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteClosedListEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11542,6 +11997,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11554,7 +12012,8 @@ public Observable> getRegexEntityRoleWithServiceResp if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11641,6 +12100,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateRegexEntityRoleOptionalParameter updateRegexEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11670,6 +12132,9 @@ public Observable> updateRegexEntityRoleWithSer * @return the observable to the OperationStatus object */ public Observable> updateRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11684,7 +12149,8 @@ public Observable> updateRegexEntityRoleWithSer } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11836,6 +12302,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteRegexEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11848,7 +12317,8 @@ public Observable> deleteRegexEntityRoleWithSer if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteRegexEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -11930,6 +12400,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -11942,7 +12415,8 @@ public Observable> getCompositeEntityRoleWithService if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12029,6 +12503,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, UpdateCompositeEntityRoleOptionalParameter updateCompositeEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12058,6 +12535,9 @@ public Observable> updateCompositeEntityRoleWit * @return the observable to the OperationStatus object */ public Observable> updateCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12072,7 +12552,8 @@ public Observable> updateCompositeEntityRoleWit } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12224,6 +12705,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteCompositeEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12236,7 +12720,8 @@ public Observable> deleteCompositeEntityRoleWit if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteCompositeEntityRole(appId, versionId, cEntityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12318,6 +12803,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getPatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12330,7 +12818,8 @@ public Observable> getPatternAnyEntityRoleWithServic if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getPatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12417,6 +12906,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updatePatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdatePatternAnyEntityRoleOptionalParameter updatePatternAnyEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12446,6 +12938,9 @@ public Observable> updatePatternAnyEntityRoleWi * @return the observable to the OperationStatus object */ public Observable> updatePatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12460,7 +12955,8 @@ public Observable> updatePatternAnyEntityRoleWi } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updatePatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12612,6 +13108,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePatternAnyEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12624,7 +13123,8 @@ public Observable> deletePatternAnyEntityRoleWi if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deletePatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePatternAnyEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12706,6 +13206,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12718,7 +13221,8 @@ public Observable> getHierarchicalEntityRoleWithServ if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -12805,6 +13309,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId, UpdateHierarchicalEntityRoleOptionalParameter updateHierarchicalEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12834,6 +13341,9 @@ public Observable> updateHierarchicalEntityRole * @return the observable to the OperationStatus object */ public Observable> updateHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -12848,7 +13358,8 @@ public Observable> updateHierarchicalEntityRole } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13000,6 +13511,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteHierarchicalEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID hEntityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13012,7 +13526,8 @@ public Observable> deleteHierarchicalEntityRole if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteHierarchicalEntityRole(appId, versionId, hEntityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13094,6 +13609,9 @@ public EntityRole call(ServiceResponse response) { * @return the observable to the EntityRole object */ public Observable> getCustomEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13106,7 +13624,8 @@ public Observable> getCustomEntityRoleWithServiceRes if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.getCustomEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getCustomEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13193,6 +13712,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateCustomPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, UpdateCustomPrebuiltEntityRoleOptionalParameter updateCustomPrebuiltEntityRoleOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13222,6 +13744,9 @@ public Observable> updateCustomPrebuiltEntityRo * @return the observable to the OperationStatus object */ public Observable> updateCustomPrebuiltEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId, String name) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13236,7 +13761,8 @@ public Observable> updateCustomPrebuiltEntityRo } EntityRoleUpdateObject entityRoleUpdateObject = new EntityRoleUpdateObject(); entityRoleUpdateObject.withName(name); - return service.updateCustomPrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateCustomPrebuiltEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), entityRoleUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13388,6 +13914,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteCustomEntityRoleWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, UUID roleId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13400,7 +13929,8 @@ public Observable> deleteCustomEntityRoleWithSe if (roleId == null) { throw new IllegalArgumentException("Parameter roleId is required and cannot be null."); } - return service.deleteCustomEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteCustomEntityRole(appId, versionId, entityId, roleId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13482,6 +14012,9 @@ public ExplicitListItem call(ServiceResponse response) { * @return the observable to the ExplicitListItem object */ public Observable> getExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13491,7 +14024,8 @@ public Observable> getExplicitListItemWithServ if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.getExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13578,6 +14112,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId, UpdateExplicitListItemOptionalParameter updateExplicitListItemOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13604,6 +14141,9 @@ public Observable> updateExplicitListItemWithSe * @return the observable to the OperationStatus object */ public Observable> updateExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId, String explicitListItem) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13615,7 +14155,8 @@ public Observable> updateExplicitListItemWithSe } ExplicitListItemUpdateObject item = new ExplicitListItemUpdateObject(); item.withExplicitListItem(explicitListItem); - return service.updateExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), item, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updateExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), item, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -13767,6 +14308,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteExplicitListItemWithServiceResponseAsync(UUID appId, String versionId, UUID entityId, long itemId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -13776,7 +14320,8 @@ public Observable> deleteExplicitListItemWithSe if (entityId == null) { throw new IllegalArgumentException("Parameter entityId is required and cannot be null."); } - return service.deleteExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteExplicitListItem(appId, versionId, entityId, itemId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java index ca3cd90b31f2..c953014f0950 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PatternsImpl.java @@ -12,6 +12,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.GetIntentPatternsOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.OperationStatus; @@ -67,35 +68,35 @@ public PatternsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface PatternsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns addPattern" }) @POST("apps/{appId}/versions/{versionId}/patternrule") - Observable> addPattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PatternRuleCreateObject pattern, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> addPattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body PatternRuleCreateObject pattern, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns getPatterns" }) @GET("apps/{appId}/versions/{versionId}/patternrules") - Observable> getPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns updatePatterns" }) @PUT("apps/{appId}/versions/{versionId}/patternrules") - Observable> updatePatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patterns, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patterns, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns batchAddPatterns" }) @POST("apps/{appId}/versions/{versionId}/patternrules") - Observable> batchAddPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patterns, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> batchAddPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patterns, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns deletePatterns" }) @HTTP(path = "apps/{appId}/versions/{versionId}/patternrules", method = "DELETE", hasBody = true) - Observable> deletePatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patternIds, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body List patternIds, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns updatePattern" }) @PUT("apps/{appId}/versions/{versionId}/patternrules/{patternId}") - Observable> updatePattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("patternId") UUID patternId, @Body PatternRuleUpdateObject pattern, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> updatePattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("patternId") UUID patternId, @Body PatternRuleUpdateObject pattern, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns deletePattern" }) @HTTP(path = "apps/{appId}/versions/{versionId}/patternrules/{patternId}", method = "DELETE", hasBody = true) - Observable> deletePattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("patternId") UUID patternId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deletePattern(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("patternId") UUID patternId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Patterns getIntentPatterns" }) @GET("apps/{appId}/versions/{versionId}/intents/{intentId}/patternrules") - Observable> getIntentPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getIntentPatterns(@Path("appId") UUID appId, @Path("versionId") String versionId, @Path("intentId") UUID intentId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -156,6 +157,9 @@ public PatternRuleInfo call(ServiceResponse response) { * @return the observable to the PatternRuleInfo object */ public Observable> addPatternWithServiceResponseAsync(UUID appId, String versionId, PatternRuleCreateObject pattern) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -166,7 +170,8 @@ public Observable> addPatternWithServiceRespons throw new IllegalArgumentException("Parameter pattern is required and cannot be null."); } Validator.validate(pattern); - return service.addPattern(appId, versionId, pattern, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.addPattern(appId, versionId, pattern, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -245,6 +250,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<PatternRuleInfo> object */ public Observable>> getPatternsWithServiceResponseAsync(UUID appId, String versionId, GetPatternsOptionalParameter getPatternsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -268,13 +276,17 @@ public Observable>> getPatternsWithService * @return the observable to the List<PatternRuleInfo> object */ public Observable>> getPatternsWithServiceResponseAsync(UUID appId, String versionId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.getPatterns(appId, versionId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getPatterns(appId, versionId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -415,6 +427,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<PatternRuleInfo> object */ public Observable>> updatePatternsWithServiceResponseAsync(UUID appId, String versionId, List patterns) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -425,7 +440,8 @@ public Observable>> updatePatternsWithServ throw new IllegalArgumentException("Parameter patterns is required and cannot be null."); } Validator.validate(patterns); - return service.updatePatterns(appId, versionId, patterns, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePatterns(appId, versionId, patterns, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -503,6 +519,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<PatternRuleInfo> object */ public Observable>> batchAddPatternsWithServiceResponseAsync(UUID appId, String versionId, List patterns) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -513,7 +532,8 @@ public Observable>> batchAddPatternsWithSe throw new IllegalArgumentException("Parameter patterns is required and cannot be null."); } Validator.validate(patterns); - return service.batchAddPatterns(appId, versionId, patterns, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.batchAddPatterns(appId, versionId, patterns, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -591,6 +611,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePatternsWithServiceResponseAsync(UUID appId, String versionId, List patternIds) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -601,7 +624,8 @@ public Observable> deletePatternsWithServiceRes throw new IllegalArgumentException("Parameter patternIds is required and cannot be null."); } Validator.validate(patternIds); - return service.deletePatterns(appId, versionId, patternIds, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePatterns(appId, versionId, patternIds, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -683,6 +707,9 @@ public PatternRuleInfo call(ServiceResponse response) { * @return the observable to the PatternRuleInfo object */ public Observable> updatePatternWithServiceResponseAsync(UUID appId, String versionId, UUID patternId, PatternRuleUpdateObject pattern) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -696,7 +723,8 @@ public Observable> updatePatternWithServiceResp throw new IllegalArgumentException("Parameter pattern is required and cannot be null."); } Validator.validate(pattern); - return service.updatePattern(appId, versionId, patternId, pattern, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.updatePattern(appId, versionId, patternId, pattern, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -774,6 +802,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deletePatternWithServiceResponseAsync(UUID appId, String versionId, UUID patternId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -783,7 +814,8 @@ public Observable> deletePatternWithServiceResp if (patternId == null) { throw new IllegalArgumentException("Parameter patternId is required and cannot be null."); } - return service.deletePattern(appId, versionId, patternId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deletePattern(appId, versionId, patternId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -866,6 +898,9 @@ public List call(ServiceResponse> respons * @return the observable to the List<PatternRuleInfo> object */ public Observable>> getIntentPatternsWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, GetIntentPatternsOptionalParameter getIntentPatternsOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -893,6 +928,9 @@ public Observable>> getIntentPatternsWithS * @return the observable to the List<PatternRuleInfo> object */ public Observable>> getIntentPatternsWithServiceResponseAsync(UUID appId, String versionId, UUID intentId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -902,7 +940,8 @@ public Observable>> getIntentPatternsWithS if (intentId == null) { throw new IllegalArgumentException("Parameter intentId is required and cannot be null."); } - return service.getIntentPatterns(appId, versionId, intentId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getIntentPatterns(appId, versionId, intentId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java index 22667ce992e0..3f2dd428d505 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/PermissionsImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.UpdatePermissionsOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Permissions; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.CollaboratorsArray; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; @@ -67,19 +68,19 @@ public PermissionsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface PermissionsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Permissions list" }) @GET("apps/{appId}/permissions") - Observable> list(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Permissions add" }) @POST("apps/{appId}/permissions") - Observable> add(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body UserCollaborator userToAdd, @Header("User-Agent") String userAgent); + Observable> add(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body UserCollaborator userToAdd, @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.language.luis.authoring.Permissions delete" }) @HTTP(path = "apps/{appId}/permissions", method = "DELETE", hasBody = true) - Observable> delete(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body UserCollaborator userToDelete, @Header("User-Agent") String userAgent); + Observable> delete(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body UserCollaborator userToDelete, @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.language.luis.authoring.Permissions update" }) @PUT("apps/{appId}/permissions") - Observable> update(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body CollaboratorsArray collaborators, @Header("User-Agent") String userAgent); + Observable> update(@Path("appId") UUID appId, @Header("accept-language") String acceptLanguage, @Body CollaboratorsArray collaborators, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -132,10 +133,14 @@ public UserAccessList call(ServiceResponse response) { * @return the observable to the UserAccessList object */ public Observable> listWithServiceResponseAsync(UUID appId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.list(appId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.list(appId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -210,6 +215,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> addWithServiceResponseAsync(UUID appId, AddPermissionsOptionalParameter addOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -227,12 +235,16 @@ public Observable> addWithServiceResponseAsync( * @return the observable to the OperationStatus object */ public Observable> addWithServiceResponseAsync(UUID appId, String email) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } UserCollaborator userToAdd = new UserCollaborator(); userToAdd.withEmail(email); - return service.add(appId, this.client.acceptLanguage(), userToAdd, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.add(appId, this.client.acceptLanguage(), userToAdd, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -356,6 +368,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteWithServiceResponseAsync(UUID appId, DeletePermissionsOptionalParameter deleteOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -373,12 +388,16 @@ public Observable> deleteWithServiceResponseAsy * @return the observable to the OperationStatus object */ public Observable> deleteWithServiceResponseAsync(UUID appId, String email) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } UserCollaborator userToDelete = new UserCollaborator(); userToDelete.withEmail(email); - return service.delete(appId, this.client.acceptLanguage(), userToDelete, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.delete(appId, this.client.acceptLanguage(), userToDelete, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -502,6 +521,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateWithServiceResponseAsync(UUID appId, UpdatePermissionsOptionalParameter updateOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -519,13 +541,17 @@ public Observable> updateWithServiceResponseAsy * @return the observable to the OperationStatus object */ public Observable> updateWithServiceResponseAsync(UUID appId, List emails) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } Validator.validate(emails); CollaboratorsArray collaborators = new CollaboratorsArray(); collaborators.withEmails(emails); - return service.update(appId, this.client.acceptLanguage(), collaborators, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.update(appId, this.client.acceptLanguage(), collaborators, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java index 241d53738494..c72da51ee224 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/TrainsImpl.java @@ -10,6 +10,7 @@ import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Trains; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.EnqueueTrainingResponse; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; @@ -58,11 +59,11 @@ public TrainsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface TrainsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Trains trainVersion" }) @POST("apps/{appId}/versions/{versionId}/train") - Observable> trainVersion(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> trainVersion(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Trains getStatus" }) @GET("apps/{appId}/versions/{versionId}/train") - Observable> getStatus(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> getStatus(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -119,13 +120,17 @@ public EnqueueTrainingResponse call(ServiceResponse res * @return the observable to the EnqueueTrainingResponse object */ public Observable> trainVersionWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.trainVersion(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.trainVersion(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -199,13 +204,17 @@ public List call(ServiceResponse> res * @return the observable to the List<ModelTrainingInfo> object */ public Observable>> getStatusWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.getStatus(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.getStatus(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java index 2dcccd4157ac..1b3b8e5b0b0b 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java @@ -14,6 +14,7 @@ import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ImportMethodVersionsOptionalParameter; import retrofit2.Retrofit; import com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions; +import com.google.common.base.Joiner; import com.google.common.reflect.TypeToken; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.ErrorResponseException; import com.microsoft.azure.cognitiveservices.language.luis.authoring.models.LuisApp; @@ -69,35 +70,35 @@ public VersionsImpl(Retrofit retrofit, LUISAuthoringClientImpl client) { interface VersionsService { @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions clone" }) @POST("apps/{appId}/versions/{versionId}/clone") - Observable> clone(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body TaskUpdateObject versionCloneObject, @Header("User-Agent") String userAgent); + Observable> clone(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body TaskUpdateObject versionCloneObject, @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.language.luis.authoring.Versions list" }) @GET("apps/{appId}/versions") - Observable> list(@Path("appId") UUID appId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> list(@Path("appId") UUID appId, @Query("skip") Integer skip, @Query("take") Integer take, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions get" }) @GET("apps/{appId}/versions/{versionId}/") - Observable> get(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> get(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions update" }) @PUT("apps/{appId}/versions/{versionId}/") - Observable> update(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body TaskUpdateObject versionUpdateObject, @Header("User-Agent") String userAgent); + Observable> update(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Body TaskUpdateObject versionUpdateObject, @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.language.luis.authoring.Versions delete" }) @HTTP(path = "apps/{appId}/versions/{versionId}/", method = "DELETE", hasBody = true) - Observable> delete(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> delete(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions export" }) @GET("apps/{appId}/versions/{versionId}/export") - Observable> export(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> export(@Path("appId") UUID appId, @Path("versionId") String versionId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions importMethod" }) @POST("apps/{appId}/versions/import") - Observable> importMethod(@Path("appId") UUID appId, @Query("versionId") String versionId, @Body LuisApp luisApp, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> importMethod(@Path("appId") UUID appId, @Query("versionId") String versionId, @Body LuisApp luisApp, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.language.luis.authoring.Versions deleteUnlabelledUtterance" }) @HTTP(path = "apps/{appId}/versions/{versionId}/suggest", method = "DELETE", hasBody = true) - Observable> deleteUnlabelledUtterance(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body String utterance, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + Observable> deleteUnlabelledUtterance(@Path("appId") UUID appId, @Path("versionId") String versionId, @Body String utterance, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent); } @@ -159,6 +160,9 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> cloneWithServiceResponseAsync(UUID appId, String versionId, CloneOptionalParameter cloneOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -180,6 +184,9 @@ public Observable> cloneWithServiceResponseAsync(UUID ap * @return the observable to the String object */ public Observable> cloneWithServiceResponseAsync(UUID appId, String versionId, String version) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -191,7 +198,8 @@ public Observable> cloneWithServiceResponseAsync(UUID ap versionCloneObject = new TaskUpdateObject(); versionCloneObject.withVersion(version); } - return service.clone(appId, versionId, this.client.acceptLanguage(), versionCloneObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.clone(appId, versionId, this.client.acceptLanguage(), versionCloneObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -322,6 +330,9 @@ public List call(ServiceResponse> response) { * @return the observable to the List<VersionInfo> object */ public Observable>> listWithServiceResponseAsync(UUID appId, ListVersionsOptionalParameter listOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -341,10 +352,14 @@ public Observable>> listWithServiceResponseAsy * @return the observable to the List<VersionInfo> object */ public Observable>> listWithServiceResponseAsync(UUID appId, Integer skip, Integer take) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } - return service.list(appId, skip, take, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.list(appId, skip, take, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -474,13 +489,17 @@ public VersionInfo call(ServiceResponse response) { * @return the observable to the VersionInfo object */ public Observable> getWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.get(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.get(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -559,6 +578,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> updateWithServiceResponseAsync(UUID appId, String versionId, UpdateVersionsOptionalParameter updateOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -580,6 +602,9 @@ public Observable> updateWithServiceResponseAsy * @return the observable to the OperationStatus object */ public Observable> updateWithServiceResponseAsync(UUID appId, String versionId, String version) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -588,7 +613,8 @@ public Observable> updateWithServiceResponseAsy } TaskUpdateObject versionUpdateObject = new TaskUpdateObject(); versionUpdateObject.withVersion(version); - return service.update(appId, versionId, this.client.acceptLanguage(), versionUpdateObject, this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.update(appId, versionId, this.client.acceptLanguage(), versionUpdateObject, parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -718,13 +744,17 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.delete(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.delete(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -798,13 +828,17 @@ public LuisApp call(ServiceResponse response) { * @return the observable to the LuisApp object */ public Observable> exportWithServiceResponseAsync(UUID appId, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } if (versionId == null) { throw new IllegalArgumentException("Parameter versionId is required and cannot be null."); } - return service.export(appId, versionId, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.export(appId, versionId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -883,6 +917,9 @@ public String call(ServiceResponse response) { * @return the observable to the String object */ public Observable> importMethodWithServiceResponseAsync(UUID appId, LuisApp luisApp, ImportMethodVersionsOptionalParameter importMethodOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -905,6 +942,9 @@ public Observable> importMethodWithServiceResponseAsync( * @return the observable to the String object */ public Observable> importMethodWithServiceResponseAsync(UUID appId, LuisApp luisApp, String versionId) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -912,7 +952,8 @@ public Observable> importMethodWithServiceResponseAsync( throw new IllegalArgumentException("Parameter luisApp is required and cannot be null."); } Validator.validate(luisApp); - return service.importMethod(appId, versionId, luisApp, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.importMethod(appId, versionId, luisApp, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1046,6 +1087,9 @@ public OperationStatus call(ServiceResponse response) { * @return the observable to the OperationStatus object */ public Observable> deleteUnlabelledUtteranceWithServiceResponseAsync(UUID appId, String versionId, String utterance) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -1055,7 +1099,8 @@ public Observable> deleteUnlabelledUtteranceWit if (utterance == null) { throw new IllegalArgumentException("Parameter utterance is required and cannot be null."); } - return service.deleteUnlabelledUtterance(appId, versionId, utterance, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.deleteUnlabelledUtterance(appId, versionId, utterance, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { 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 4cdc67e772bd..96e1da798fa4 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 @@ -35,6 +35,21 @@ public interface LuisRuntimeAPI { */ String userAgent(); + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. + * + * @return the endpoint value. + */ + String endpoint(); + + /** + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com).. + * + * @param endpoint the endpoint value. + * @return the service client itself + */ + LuisRuntimeAPI withEndpoint(String endpoint); + /** * 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/implementation/LuisRuntimeAPIImpl.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/implementation/LuisRuntimeAPIImpl.java index 391f1cc5d8a5..b60448adcd77 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 @@ -30,6 +30,29 @@ public AzureClient getAzureClient() { return this.azureClient; } + /** Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). */ + private String endpoint; + + /** + * Gets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * + * @return the endpoint value. + */ + public String endpoint() { + return this.endpoint; + } + + /** + * Sets Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). + * + * @param endpoint the endpoint value. + * @return the service client itself + */ + public LuisRuntimeAPIImpl withEndpoint(String endpoint) { + this.endpoint = endpoint; + return this; + } + /** Gets or sets the preferred language for the response. */ private String acceptLanguage; @@ -118,7 +141,7 @@ public Predictions predictions() { * @param credentials the management credentials for Azure */ public LuisRuntimeAPIImpl(ServiceClientCredentials credentials) { - this("https://api.cognitive.microsoft.com/luis/v2.0", credentials); + this("https://{endpoint}/luis/v2.0", credentials); } /** 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 bda630f0ca0d..c08dfa7fd61e 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,6 +11,7 @@ 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,7 +58,7 @@ 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("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); + 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); } @@ -119,6 +120,9 @@ public LuisResult call(ServiceResponse response) { * @return the observable to the LuisResult object */ public Observable> resolveWithServiceResponseAsync(String appId, String query, ResolveOptionalParameter resolveOptionalParameter) { + if (this.client.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null."); + } if (appId == null) { throw new IllegalArgumentException("Parameter appId is required and cannot be null."); } @@ -150,13 +154,17 @@ 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.endpoint() == null) { + throw new IllegalArgumentException("Parameter this.client.endpoint() 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."); } - return service.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log, this.client.acceptLanguage(), this.client.userAgent()) + String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + return service.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/models/EntityModel.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/models/EntityModel.java index 772c8aa1703a..04ae32bfc26e 100755 --- a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/models/EntityModel.java +++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/models/EntityModel.java @@ -37,14 +37,14 @@ public class EntityModel { * utterance. */ @JsonProperty(value = "startIndex", required = true) - private double startIndex; + private int startIndex; /** * The position of the last character of the matched entity within the * utterance. */ @JsonProperty(value = "endIndex", required = true) - private double endIndex; + private int endIndex; /** * Get the additionalProperties value. @@ -111,7 +111,7 @@ public EntityModel withType(String type) { * * @return the startIndex value */ - public double startIndex() { + public int startIndex() { return this.startIndex; } @@ -121,7 +121,7 @@ public double startIndex() { * @param startIndex the startIndex value to set * @return the EntityModel object itself. */ - public EntityModel withStartIndex(double startIndex) { + public EntityModel withStartIndex(int startIndex) { this.startIndex = startIndex; return this; } @@ -131,7 +131,7 @@ public EntityModel withStartIndex(double startIndex) { * * @return the endIndex value */ - public double endIndex() { + public int endIndex() { return this.endIndex; } @@ -141,7 +141,7 @@ public double endIndex() { * @param endIndex the endIndex value to set * @return the EntityModel object itself. */ - public EntityModel withEndIndex(double endIndex) { + public EntityModel withEndIndex(int endIndex) { this.endIndex = endIndex; return this; } From 25259dc3146a99dbb4eb70c8631ea3a9217157b6 Mon Sep 17 00:00:00 2001 From: milismsft-mac Date: Thu, 16 Aug 2018 22:27:23 -0700 Subject: [PATCH 2/3] Add enum class to support current enpoint APIs. --- .../language/luis/authoring/EndpointAPI.java | 70 +++++++++++++++++++ .../luis/authoring/LUISAuthoringManager.java | 31 +++++--- .../language/luis/runtime/EndpointAPI.java | 70 +++++++++++++++++++ .../luis/runtime/LuisRuntimeManager.java | 41 ++++++++--- 4 files changed, 193 insertions(+), 19 deletions(-) create mode 100644 cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/EndpointAPI.java create mode 100644 cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/EndpointAPI.java diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/EndpointAPI.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/EndpointAPI.java new file mode 100644 index 000000000000..52867e46fe64 --- /dev/null +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/EndpointAPI.java @@ -0,0 +1,70 @@ +/** + * 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.language.luis.authoring; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Defines values for LUIS endpoint API. + */ +public final class EndpointAPI extends ExpandableStringEnum { + /** Static value US_WEST for EndpointAPI. */ + public static final EndpointAPI US_WEST = fromString("westus.api.cognitive.microsoft.com"); + + /** Static value US_WEST2 for EndpointAPI. */ + public static final EndpointAPI US_WEST2 = fromString("westus2.api.cognitive.microsoft.com"); + + /** Static value US_EAST for EndpointAPI. */ + public static final EndpointAPI US_EAST = fromString("eastus.api.cognitive.microsoft.com"); + + /** Static value US_EAST2 for EndpointAPI. */ + public static final EndpointAPI US_EAST2 = fromString("eastus2.api.cognitive.microsoft.com"); + + /** Static value US_WEST_CENTRAL for EndpointAPI. */ + public static final EndpointAPI US_WEST_CENTRAL = fromString("westcentralus.api.cognitive.microsoft.com"); + + /** Static value US_SOUTH_CENTRAL for EndpointAPI. */ + public static final EndpointAPI US_SOUTH_CENTRAL = fromString("southcentralus.api.cognitive.microsoft.com"); + + /** Static value EUROPE_WEST for EndpointAPI. */ + public static final EndpointAPI EUROPE_WEST = fromString("westeurope.api.cognitive.microsoft.com"); + + /** Static value EUROPE_NORTH for EndpointAPI. */ + public static final EndpointAPI EUROPE_NORTH = fromString("northeurope.api.cognitive.microsoft.com"); + + /** Static value ASIA_SOUTHEAST for EndpointAPI. */ + public static final EndpointAPI ASIA_SOUTHEAST = fromString("southeastasia.api.cognitive.microsoft.com"); + + /** Static value ASIA_EAST for EndpointAPI. */ + public static final EndpointAPI ASIA_EAST = fromString("eastasia.api.cognitive.microsoft.com"); + + /** Static value AUSTRALIA_EAST for EndpointAPI. */ + public static final EndpointAPI AUSTRALIA_EAST = fromString("australiaeast.api.cognitive.microsoft.com"); + + /** Static value BRAZIL_SOUTH for EndpointAPI. */ + public static final EndpointAPI BRAZIL_SOUTH = fromString("brazilsouth.api.cognitive.microsoft.com"); + + /** + * Creates or finds a EndpointAPI from its string representation. + * @param name a name to look for + * @return the corresponding EndpointAPI + */ + @JsonCreator + public static EndpointAPI fromString(String name) { + return fromString(name, EndpointAPI.class); + } + + /** + * @return known CatalogCollationType values + */ + public static Collection values() { + return values(EndpointAPI.class); + } +} diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java index 5b4e94ff8eec..ca0adc460544 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java @@ -15,6 +15,7 @@ import okhttp3.Response; import java.io.IOException; +import java.net.URI; /** * Entry point to Azure Cognitive Services Language Understanding (LUIS) Authoring manager. @@ -23,21 +24,23 @@ public class LUISAuthoringManager { /** * Initializes an instance of Language Understanding (LUIS) Authoring API client. * - * @param subscriptionKey the Language Understanding (LUIS) Authoring API key + * @param endpointAPI the endpoint API + * @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) * @return the Language Understanding Authoring API client */ - public static LUISAuthoringClient authenticate(String subscriptionKey) { - return authenticate("https://api.cognitive.microsoft.com/luis/api/v2.0/", subscriptionKey); + public static LUISAuthoringClient authenticate(EndpointAPI endpointAPI, String luisAuthoringKey) { + return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), luisAuthoringKey) + .withEndpoint(endpointAPI.toString()); } /** * Initializes an instance of Language Understanding (LUIS) Authoring API client. * * @param baseUrl the base URL of the service - * @param subscriptionKey the Language Understanding (LUIS) Authoring API key + * @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) * @return the Language Understanding (LUIS) Authoring API client */ - public static LUISAuthoringClient authenticate(String baseUrl, final String subscriptionKey) { + public static LUISAuthoringClient authenticate(String baseUrl, final String luisAuthoringKey) { ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() { @Override public void applyCredentialsFilter(OkHttpClient.Builder builder) { @@ -49,24 +52,34 @@ public Response intercept(Chain chain) throws IOException { Request original = chain.request(); // Request customization: add request headers Request.Builder requestBuilder = original.newBuilder() - .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey); + .addHeader("Ocp-Apim-Subscription-Key", luisAuthoringKey); request = requestBuilder.build(); return chain.proceed(request); } }); } }; - return authenticate(baseUrl, serviceClientCredentials); + String endpointAPI = null; + try { + URI uri = new URI(baseUrl); + endpointAPI = uri.getHost(); + } catch (Exception e) { + endpointAPI = EndpointAPI.US_WEST.toString(); + } + return authenticate(baseUrl, serviceClientCredentials) + .withEndpoint(endpointAPI); } /** * Initializes an instance of Language Understanding (LUIS) Authoring API client. * + * @param endpointAPI the endpoint API * @param credentials the management credentials for Azure * @return the Language Understanding (LUIS) Authoring API client */ - public static LUISAuthoringClient authenticate(ServiceClientCredentials credentials) { - return authenticate("https://api.cognitive.microsoft.com/luis/api/v2.0/", credentials); + public static LUISAuthoringClient authenticate(EndpointAPI endpointAPI, ServiceClientCredentials credentials) { + return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), credentials) + .withEndpoint(endpointAPI.toString()); } /** diff --git a/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/EndpointAPI.java b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/EndpointAPI.java new file mode 100644 index 000000000000..7ea4c957b625 --- /dev/null +++ b/cognitiveservices/data-plane/language/luis/runtime/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/runtime/EndpointAPI.java @@ -0,0 +1,70 @@ +/** + * 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.language.luis.runtime; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.microsoft.rest.ExpandableStringEnum; + +import java.util.Collection; + +/** + * Defines values for LUIS endpoint API. + */ +public final class EndpointAPI extends ExpandableStringEnum { + /** Static value US_WEST for EndpointAPI. */ + public static final EndpointAPI US_WEST = fromString("westus.api.cognitive.microsoft.com"); + + /** Static value US_WEST2 for EndpointAPI. */ + public static final EndpointAPI US_WEST2 = fromString("westus2.api.cognitive.microsoft.com"); + + /** Static value US_EAST for EndpointAPI. */ + public static final EndpointAPI US_EAST = fromString("eastus.api.cognitive.microsoft.com"); + + /** Static value US_EAST2 for EndpointAPI. */ + public static final EndpointAPI US_EAST2 = fromString("eastus2.api.cognitive.microsoft.com"); + + /** Static value US_WEST_CENTRAL for EndpointAPI. */ + public static final EndpointAPI US_WEST_CENTRAL = fromString("westcentralus.api.cognitive.microsoft.com"); + + /** Static value US_SOUTH_CENTRAL for EndpointAPI. */ + public static final EndpointAPI US_SOUTH_CENTRAL = fromString("southcentralus.api.cognitive.microsoft.com"); + + /** Static value EUROPE_WEST for EndpointAPI. */ + public static final EndpointAPI EUROPE_WEST = fromString("westeurope.api.cognitive.microsoft.com"); + + /** Static value EUROPE_NORTH for EndpointAPI. */ + public static final EndpointAPI EUROPE_NORTH = fromString("northeurope.api.cognitive.microsoft.com"); + + /** Static value ASIA_SOUTHEAST for EndpointAPI. */ + public static final EndpointAPI ASIA_SOUTHEAST = fromString("southeastasia.api.cognitive.microsoft.com"); + + /** Static value ASIA_EAST for EndpointAPI. */ + public static final EndpointAPI ASIA_EAST = fromString("eastasia.api.cognitive.microsoft.com"); + + /** Static value AUSTRALIA_EAST for EndpointAPI. */ + public static final EndpointAPI AUSTRALIA_EAST = fromString("australiaeast.api.cognitive.microsoft.com"); + + /** Static value BRAZIL_SOUTH for EndpointAPI. */ + public static final EndpointAPI BRAZIL_SOUTH = fromString("brazilsouth.api.cognitive.microsoft.com"); + + /** + * Creates or finds a EndpointAPI from its string representation. + * @param name a name to look for + * @return the corresponding EndpointAPI + */ + @JsonCreator + public static EndpointAPI fromString(String name) { + return fromString(name, EndpointAPI.class); + } + + /** + * @return known CatalogCollationType values + */ + public static Collection values() { + return values(EndpointAPI.class); + } +} 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 a70dc9de8371..0bb0378ff101 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 @@ -15,6 +15,7 @@ import okhttp3.Response; import java.io.IOException; +import java.net.URI; /** * Entry point to Azure Cognitive Services Language Understanding (LUIS) Runtime manager. @@ -23,21 +24,23 @@ public class LuisRuntimeManager { /** * Initializes an instance of Language Understanding (LUIS) Runtime API client. * - * @param subscriptionKey the Language Understanding (LUIS) Runtime API key + * @param endpointAPI the endpoint API + * @param key the Language Understanding (LUIS) Runtime API key * @return the Language Understanding Runtime API client */ - public static LuisRuntimeAPI authenticate(String subscriptionKey) { - return authenticate("https://api.cognitive.microsoft.com/luis/v2.0/", subscriptionKey); + public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String key) { + return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), key) + .withEndpoint(endpointAPI.toString()); } /** * Initializes an instance of Language Understanding (LUIS) Runtime API client. * * @param baseUrl the base URL of the service - * @param subscriptionKey the Language Understanding (LUIS) Runtime API key + * @param key the Language Understanding (LUIS) Runtime API key * @return the Language Understanding (LUIS) Runtime API client */ - public static LuisRuntimeAPI authenticate(String baseUrl, final String subscriptionKey) { + public static LuisRuntimeAPI authenticate(String baseUrl, final String key) { ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() { @Override public void applyCredentialsFilter(OkHttpClient.Builder builder) { @@ -49,24 +52,34 @@ public Response intercept(Chain chain) throws IOException { Request original = chain.request(); // Request customization: add request headers Request.Builder requestBuilder = original.newBuilder() - .addHeader("Ocp-Apim-Subscription-Key", subscriptionKey); + .addHeader("Ocp-Apim-Subscription-Key", key); request = requestBuilder.build(); return chain.proceed(request); } }); } }; - return authenticate(baseUrl, serviceClientCredentials); + String endpointAPI = null; + try { + URI uri = new URI(baseUrl); + endpointAPI = uri.getHost(); + } catch (Exception e) { + endpointAPI = EndpointAPI.US_WEST.toString(); + } + return authenticate(baseUrl, serviceClientCredentials) + .withEndpoint(endpointAPI); } /** * Initializes an instance of Language Understanding (LUIS) Runtime API client. * + * @param endpointAPI the endpoint API * @param credentials the management credentials for Azure * @return the Language Understanding (LUIS) Runtime API client */ - public static LuisRuntimeAPI authenticate(ServiceClientCredentials credentials) { - return authenticate("https://api.cognitive.microsoft.com/luis/v2.0/", credentials); + public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, ServiceClientCredentials credentials) { + return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), credentials) + .withEndpoint(endpointAPI.toString()); } /** @@ -77,7 +90,15 @@ public static LuisRuntimeAPI authenticate(ServiceClientCredentials credentials) * @return the Language Understanding (LUIS) Runtime API client */ public static LuisRuntimeAPI authenticate(String baseUrl, ServiceClientCredentials credentials) { - return new LuisRuntimeAPIImpl(baseUrl, credentials); + String endpointAPI = null; + try { + URI uri = new URI(baseUrl); + endpointAPI = uri.getHost(); + } catch (Exception e) { + endpointAPI = EndpointAPI.US_WEST.toString(); + } + return new LuisRuntimeAPIImpl(baseUrl, credentials) + .withEndpoint(endpointAPI); } /** From 0bacdc3da19e83d3476865a342b4bff793465441 Mon Sep 17 00:00:00 2001 From: milismsft-mac Date: Fri, 17 Aug 2018 12:55:08 -0700 Subject: [PATCH 3/3] Bug fixing --- .../luis/authoring/LUISAuthoringManager.java | 2 +- .../language/luis/runtime/LuisRuntimeManager.java | 14 +++++++------- .../runtime/implementation/PredictionsImpl.java | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java index ca0adc460544..4621eb789197 100644 --- a/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java +++ b/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/LUISAuthoringManager.java @@ -29,7 +29,7 @@ public class LUISAuthoringManager { * @return the Language Understanding Authoring API client */ public static LUISAuthoringClient authenticate(EndpointAPI endpointAPI, String luisAuthoringKey) { - return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), luisAuthoringKey) + return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI.toString()), luisAuthoringKey) .withEndpoint(endpointAPI.toString()); } 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 0bb0378ff101..64c13ed98506 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 @@ -25,11 +25,11 @@ public class LuisRuntimeManager { * Initializes an instance of Language Understanding (LUIS) Runtime API client. * * @param endpointAPI the endpoint API - * @param key the Language Understanding (LUIS) Runtime API key + * @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) * @return the Language Understanding Runtime API client */ - public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String key) { - return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), key) + public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String luisAuthoringKey) { + return authenticate(String.format("https://%s/luis/v2.0/", endpointAPI.toString()), luisAuthoringKey) .withEndpoint(endpointAPI.toString()); } @@ -37,10 +37,10 @@ public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, String key) { * Initializes an instance of Language Understanding (LUIS) Runtime API client. * * @param baseUrl the base URL of the service - * @param key the Language Understanding (LUIS) Runtime API key + * @param luisAuthoringKey the Language Understanding (LUIS) Authoring API key (see https://www.luis.ai) * @return the Language Understanding (LUIS) Runtime API client */ - public static LuisRuntimeAPI authenticate(String baseUrl, final String key) { + public static LuisRuntimeAPI authenticate(String baseUrl, final String luisAuthoringKey) { ServiceClientCredentials serviceClientCredentials = new ServiceClientCredentials() { @Override public void applyCredentialsFilter(OkHttpClient.Builder builder) { @@ -52,7 +52,7 @@ public Response intercept(Chain chain) throws IOException { Request original = chain.request(); // Request customization: add request headers Request.Builder requestBuilder = original.newBuilder() - .addHeader("Ocp-Apim-Subscription-Key", key); + .addHeader("Ocp-Apim-Subscription-Key", luisAuthoringKey); request = requestBuilder.build(); return chain.proceed(request); } @@ -78,7 +78,7 @@ public Response intercept(Chain chain) throws IOException { * @return the Language Understanding (LUIS) Runtime API client */ public static LuisRuntimeAPI authenticate(EndpointAPI endpointAPI, ServiceClientCredentials credentials) { - return authenticate(String.format("https://%s/luis/api/v2.0/", endpointAPI), credentials) + return authenticate(String.format("https://%s/luis/v2.0/", endpointAPI.toString()), credentials) .withEndpoint(endpointAPI.toString()); } 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 c08dfa7fd61e..5a5c11e348aa 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 @@ -163,7 +163,7 @@ public Observable> resolveWithServiceResponseAsync(S if (query == null) { throw new IllegalArgumentException("Parameter query is required and cannot be null."); } - String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint()); + String parameterizedHost = Joiner.on(", ").join("{endpoint}", this.client.endpoint()); return service.resolve(appId, query, timezoneOffset, verbose, staging, spellCheck, bingSpellCheckSubscriptionKey, log, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override