From 44c7df43bf48d8cab7b3b1fc167180a2c07a9e40 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Tue, 12 Mar 2019 03:48:24 +0000 Subject: [PATCH] Generated from 0a0a6f440615601504a0f696faaeccdeaf8248f3 Revert "Added VNet API (#5351)" This reverts commit f2ab4a8208bd3de1813b26b078429357dbd05506. --- .../eventhub/v2017_04_01/Namespaces.java | 22 -- .../implementation/NamespacesImpl.java | 25 --- .../implementation/NamespacesInner.java | 188 ------------------ 3 files changed, 235 deletions(-) diff --git a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/Namespaces.java b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/Namespaces.java index 6bb52a7e23682..8d7ffe48bb3a6 100644 --- a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/Namespaces.java +++ b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/Namespaces.java @@ -15,7 +15,6 @@ import rx.Observable; import com.microsoft.azure.arm.resources.collection.SupportsListingByResourceGroup; import com.microsoft.azure.arm.collection.SupportsListing; -import com.microsoft.azure.management.eventhub.v2017_04_01.implementation.NetworkRuleSetInner; import com.microsoft.azure.management.eventhub.v2017_04_01.implementation.NamespacesInner; import com.microsoft.azure.arm.model.HasInner; import com.microsoft.azure.management.eventhub.v2017_04_01.NamespaceAuthorizationRule; @@ -42,27 +41,6 @@ public interface Namespaces extends SupportsCreating getMessagingPlanAsync(String resourceGroupName, String namespaceName); - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters); - - /** - * Gets NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable for the request - */ - Observable getNetworkRuleSetAsync(String resourceGroupName, String namespaceName); - /** * Check the give Namespace name availability. * diff --git a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesImpl.java b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesImpl.java index b5a69fe16094c..37da88a50ce66 100644 --- a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesImpl.java +++ b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesImpl.java @@ -23,7 +23,6 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.Page; import com.microsoft.azure.management.eventhub.v2017_04_01.MessagingPlan; -import com.microsoft.azure.management.eventhub.v2017_04_01.NetworkRuleSet; import com.microsoft.azure.management.eventhub.v2017_04_01.CheckNameAvailabilityResult; import com.microsoft.azure.management.eventhub.v2017_04_01.NamespaceAuthorizationRule; import com.microsoft.azure.management.eventhub.v2017_04_01.AccessKeys; @@ -143,30 +142,6 @@ public MessagingPlan call(MessagingPlanInner inner) { }); } - @Override - public Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - NamespacesInner client = this.inner(); - return client.createOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters) - .map(new Func1() { - @Override - public NetworkRuleSet call(NetworkRuleSetInner inner) { - return new NetworkRuleSetImpl(inner, manager()); - } - }); - } - - @Override - public Observable getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { - NamespacesInner client = this.inner(); - return client.getNetworkRuleSetAsync(resourceGroupName, namespaceName) - .map(new Func1() { - @Override - public NetworkRuleSet call(NetworkRuleSetInner inner) { - return new NetworkRuleSetImpl(inner, manager()); - } - }); - } - @Override public Observable checkNameAvailabilityAsync(String name) { NamespacesInner client = this.inner(); diff --git a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesInner.java b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesInner.java index 964111f3b45f3..26c89ff1d99d1 100644 --- a/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesInner.java +++ b/eventhub/resource-manager/v2017_04_01/src/main/java/com/microsoft/azure/management/eventhub/v2017_04_01/implementation/NamespacesInner.java @@ -133,14 +133,6 @@ interface NamespacesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/AuthorizationRules/{authorizationRuleName}/regenerateKeys") Observable> regenerateKeys(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("authorizationRuleName") String authorizationRuleName, @Path("subscriptionId") String subscriptionId, @Body RegenerateAccessKeyParameters parameters, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.v2017_04_01.Namespaces createOrUpdateNetworkRuleSet" }) - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default") - Observable> createOrUpdateNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Body NetworkRuleSetInner parameters, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.v2017_04_01.Namespaces getNetworkRuleSet" }) - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.EventHub/namespaces/{namespaceName}/networkRuleSet/default") - Observable> getNetworkRuleSet(@Path("resourceGroupName") String resourceGroupName, @Path("namespaceName") String namespaceName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); - @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.eventhub.v2017_04_01.Namespaces listNext" }) @GET Observable> listNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @@ -1661,186 +1653,6 @@ private ServiceResponse regenerateKeysDelegate(Response createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters), serviceCallback); - } - - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object - */ - public Observable createOrUpdateNetworkRuleSetAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - return createOrUpdateNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName, parameters).map(new Func1, NetworkRuleSetInner>() { - @Override - public NetworkRuleSetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Create or update NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param parameters The Namespace IpFilterRule. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object - */ - public Observable> createOrUpdateNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName, NetworkRuleSetInner parameters) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - if (parameters == null) { - throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); - } - Validator.validate(parameters); - return service.createOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), parameters, this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = createOrUpdateNetworkRuleSetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse createOrUpdateNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - - /** - * Gets NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @throws ErrorResponseException thrown if the request is rejected by server - * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent - * @return the NetworkRuleSetInner object if successful. - */ - public NetworkRuleSetInner getNetworkRuleSet(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).toBlocking().single().body(); - } - - /** - * Gets NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the {@link ServiceFuture} object - */ - public ServiceFuture getNetworkRuleSetAsync(String resourceGroupName, String namespaceName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName), serviceCallback); - } - - /** - * Gets NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object - */ - public Observable getNetworkRuleSetAsync(String resourceGroupName, String namespaceName) { - return getNetworkRuleSetWithServiceResponseAsync(resourceGroupName, namespaceName).map(new Func1, NetworkRuleSetInner>() { - @Override - public NetworkRuleSetInner call(ServiceResponse response) { - return response.body(); - } - }); - } - - /** - * Gets NetworkRuleSet for a Namespace. - * - * @param resourceGroupName Name of the resource group within the azure subscription. - * @param namespaceName The Namespace name - * @throws IllegalArgumentException thrown if parameters fail the validation - * @return the observable to the NetworkRuleSetInner object - */ - public Observable> getNetworkRuleSetWithServiceResponseAsync(String resourceGroupName, String namespaceName) { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (namespaceName == null) { - throw new IllegalArgumentException("Parameter namespaceName is required and cannot be null."); - } - if (this.client.subscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); - } - if (this.client.apiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); - } - return service.getNetworkRuleSet(resourceGroupName, namespaceName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) - .flatMap(new Func1, Observable>>() { - @Override - public Observable> call(Response response) { - try { - ServiceResponse clientResponse = getNetworkRuleSetDelegate(response); - return Observable.just(clientResponse); - } catch (Throwable t) { - return Observable.error(t); - } - } - }); - } - - private ServiceResponse getNetworkRuleSetDelegate(Response response) throws ErrorResponseException, IOException, IllegalArgumentException { - return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(ErrorResponseException.class) - .build(response); - } - /** * Lists all the available Namespaces within a subscription, irrespective of the resource groups. *