From f97df3f6191c3aa6e51b7faa0589a32068c69003 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 14 Sep 2016 14:18:20 -0700 Subject: [PATCH 1/5] Remove unnecessary throws --- .../collection/implementation/CreatableResourcesImpl.java | 2 +- .../management/resources/fluentcore/model/Appliable.java | 3 +-- .../management/resources/fluentcore/model/Creatable.java | 3 +-- .../fluentcore/model/implementation/CreatableImpl.java | 6 +++--- .../model/implementation/CreatableUpdatableImpl.java | 2 +- .../fluentcore/model/implementation/CreatorTaskGroup.java | 3 +-- .../management/resources/implementation/DeploymentImpl.java | 2 +- .../resources/implementation/GenericResourceImpl.java | 2 +- .../test/java/com/microsoft/azure/TestVirtualMachine.java | 1 - 9 files changed, 10 insertions(+), 14 deletions(-) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java index 7ce888f985c7..d3e7c3d1ca81 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java @@ -297,7 +297,7 @@ public Observable> createResourceAsync() { } @Override - public CreatableResourcesRoot createResource() throws Exception { + public CreatableResourcesRoot createResource() { return this; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java index 14a4b3f6d143..c675270d1d62 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Appliable.java @@ -22,9 +22,8 @@ public interface Appliable extends Indexable { * Execute the update request. * * @return the updated resource - * @throws Exception exceptions from Azure */ - T apply() throws Exception; + T apply(); /** * Execute the update request asynchronously. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java index 110f2e100883..375101ee45f2 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java @@ -27,9 +27,8 @@ public interface Creatable extends Indexable { * Execute the create request. * * @return the create resource - * @throws Exception exceptions from Azure */ - T create() throws Exception; + T create(); /** * Puts the request into the queue and allow the HTTP client to execute diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableImpl.java index f216e36b5c57..7caed01b832a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableImpl.java @@ -67,10 +67,9 @@ public String name() { * Default implementation of create(). * * @return the created resource - * @throws Exception when anything goes wrong */ @SuppressWarnings("unchecked") - public FluentModelT create() throws Exception { + public FluentModelT create() { return createAsync().toBlocking().single(); } @@ -108,10 +107,11 @@ public CreatorTaskGroup creatorTaskGroup() { } @Override - public FluentModelT createResource() throws Exception { + public FluentModelT createResource() { return this.createResourceAsync().toBlocking().last(); } + @SuppressWarnings("unchecked") protected Func1 innerToFluentMap(final FluentModelImplT fluentModelImplT) { return new Func1() { @Override diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java index 24d8d5c0e8b7..fb5f8aa56fca 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatableUpdatableImpl.java @@ -40,7 +40,7 @@ public FluentModelImplT update() { } @Override - public FluentModelT apply() throws Exception { + public FluentModelT apply() { return applyAsync().toBlocking().last(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatorTaskGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatorTaskGroup.java index e099589edb62..d28fd68c8e68 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatorTaskGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/CreatorTaskGroup.java @@ -26,9 +26,8 @@ interface ResourceCreator { * Creates the resource synchronously. * * @return the created resource - * @throws Exception */ - T createResource() throws Exception; + T createResource(); /** * @return Gets the task group. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java index bff13a8a9485..25bd884bc15a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java @@ -281,7 +281,7 @@ public DeploymentImpl beginCreate() throws Exception { } @Override - public DeploymentImpl create() throws Exception { + public DeploymentImpl create() { if (this.creatableResourceGroup != null) { this.creatableResourceGroup.create(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java index 3049b256600b..578aab023e54 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java @@ -117,7 +117,7 @@ public GenericResourceImpl withApiVersion(String apiVersion) { } @Override - public GenericResourceImpl create() throws Exception { + public GenericResourceImpl create() { createResource(); return this; } diff --git a/azure/src/test/java/com/microsoft/azure/TestVirtualMachine.java b/azure/src/test/java/com/microsoft/azure/TestVirtualMachine.java index 3a80d2198d5a..a4ef4e2cc035 100644 --- a/azure/src/test/java/com/microsoft/azure/TestVirtualMachine.java +++ b/azure/src/test/java/com/microsoft/azure/TestVirtualMachine.java @@ -15,7 +15,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.Region; import okhttp3.logging.HttpLoggingInterceptor; import org.junit.Test; -import rx.Subscriber; import rx.functions.Action1; public class TestVirtualMachine extends TestTemplate { From aa238f63713e6fdbee0d08a6c0368872113bbd03 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 14 Sep 2016 22:08:14 -0700 Subject: [PATCH 2/5] Remove throws uncheck exceptions in generated code --- .../batch/implementation/AccountsInner.java | 76 ++----- .../implementation/ApplicationsInner.java | 67 ++---- .../implementation/SubscriptionsInner.java | 5 +- .../implementation/AvailabilitySetsInner.java | 25 +-- .../compute/implementation/UsagesInner.java | 15 +- .../VirtualMachineExtensionImagesInner.java | 20 +- .../VirtualMachineExtensionsInner.java | 32 +-- .../VirtualMachineImagesInner.java | 30 +-- .../VirtualMachineScaleSetVMsInner.java | 98 ++------- .../VirtualMachineScaleSetsInner.java | 196 ++++-------------- .../VirtualMachineSizesInner.java | 5 +- .../implementation/VirtualMachinesInner.java | 137 +++--------- .../implementation/ApplicationsInner.java | 60 ++---- .../graphrbac/implementation/GroupsInner.java | 71 ++----- .../implementation/ObjectsInner.java | 5 +- .../ServicePrincipalsInner.java | 67 ++---- .../graphrbac/implementation/UsersInner.java | 47 +---- .../keyvault/implementation/VaultsInner.java | 82 +++----- .../ApplicationGatewaysInner.java | 78 ++----- ...xpressRouteCircuitAuthorizationsInner.java | 42 +--- .../ExpressRouteCircuitPeeringsInner.java | 42 +--- .../ExpressRouteCircuitsInner.java | 99 ++------- .../ExpressRouteServiceProvidersInner.java | 15 +- .../FrontendIPConfigurationInner.java | 5 +- .../implementation/LoadBalancersInner.java | 61 ++---- .../LocalNetworkGatewaysInner.java | 42 +--- .../NetworkInterfaceIPConfigurationInner.java | 7 +- .../implementation/NetworkInterfaceInner.java | 7 +- .../NetworkInterfacesInner.java | 121 +++-------- .../NetworkManagementClientImpl.java | 10 +- .../NetworkSecurityGroupsInner.java | 61 ++---- .../PublicIPAddressesInner.java | 61 ++---- .../implementation/RouteTablesInner.java | 61 ++---- .../network/implementation/RoutesInner.java | 42 +--- .../implementation/SecurityRulesInner.java | 42 +--- .../network/implementation/SubnetInner.java | 5 +- .../network/implementation/SubnetsInner.java | 47 +---- .../network/implementation/UsagesInner.java | 15 +- ...VirtualNetworkGatewayConnectionsInner.java | 91 ++------ .../VirtualNetworkGatewaysInner.java | 63 ++---- .../VirtualNetworkPeeringsInner.java | 42 +--- .../implementation/VirtualNetworksInner.java | 71 ++----- .../azure/management/redis/SkuFamily.java | 2 +- .../implementation/PatchSchedulesInner.java | 15 +- .../redis/implementation/RedisInner.java | 81 ++------ .../DeploymentOperationsInner.java | 27 +-- .../implementation/DeploymentsInner.java | 84 ++------ .../implementation/FeaturesInner.java | 39 +--- .../implementation/ProvidersInner.java | 42 +--- .../implementation/ResourceGroupsInner.java | 79 ++----- .../implementation/ResourcesInner.java | 53 ++--- .../implementation/SubscriptionsInner.java | 25 +-- .../resources/implementation/TagsInner.java | 35 +--- .../implementation/TenantsInner.java | 15 +- .../search/implementation/AdminKeysInner.java | 5 +- .../search/implementation/QueryKeysInner.java | 5 +- .../search/implementation/ServicesInner.java | 15 +- .../management/storage/StorageAccount.java | 16 +- .../implementation/StorageAccountImpl.java | 6 +- .../implementation/StorageAccountsInner.java | 51 +---- .../storage/implementation/UsagesInner.java | 5 +- 61 files changed, 629 insertions(+), 2139 deletions(-) diff --git a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/AccountsInner.java b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/AccountsInner.java index fb1bf7287622..b36117d75a83 100644 --- a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/AccountsInner.java +++ b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/AccountsInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.batch.BatchAccountRegenerateKeyParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -126,13 +125,9 @@ interface AccountsService { * @param resourceGroupName The name of the resource group that contains the new Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the AccountResourceInner object if successful. */ - public AccountResourceInner create(String resourceGroupName, String accountName, BatchAccountCreateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public AccountResourceInner create(String resourceGroupName, String accountName, BatchAccountCreateParametersInner parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().getBody(); } @@ -201,12 +196,9 @@ public Observable> createWithServiceRespon * @param resourceGroupName The name of the resource group that contains the new Batch account. * @param accountName A name for the Batch account which must be unique within the region. Batch account names must be between 3 and 24 characters in length and must use only numbers and lowercase letters. This name is used as part of the DNS name that is used to access the Batch service in the region in which the account is created. For example: http://accountname.region.batch.azure.com/. * @param parameters Additional parameters for account creation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AccountResourceInner object if successful. */ - public AccountResourceInner beginCreate(String resourceGroupName, String accountName, BatchAccountCreateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public AccountResourceInner beginCreate(String resourceGroupName, String accountName, BatchAccountCreateParametersInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().getBody(); } @@ -293,12 +285,9 @@ private ServiceResponse beginCreateDelegate(Response updateDelegate(Response> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group that contains the Batch account to be deleted. * @param accountName The name of the account to be deleted. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String accountName) { beginDeleteWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -532,12 +514,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AccountResourceInner object if successful. */ - public AccountResourceInner get(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public AccountResourceInner get(String resourceGroupName, String accountName) { return getWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -613,16 +592,13 @@ private ServiceResponse getDelegate(Response /** * Gets information about the Batch accounts associated with the subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<AccountResourceInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -717,16 +693,13 @@ private ServiceResponse> listDelegate(Response listByResourceGroup(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroup(final String resourceGroupName) { ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -829,11 +802,8 @@ private ServiceResponse> listByResourceGroupDeleg * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void synchronizeAutoStorageKeys(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public void synchronizeAutoStorageKeys(String resourceGroupName, String accountName) { synchronizeAutoStorageKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -911,12 +881,9 @@ private ServiceResponse synchronizeAutoStorageKeysDelegate(Response regenerateKeyDeleg * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BatchAccountListKeyResultInner object if successful. */ - public BatchAccountListKeyResultInner listKeys(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public BatchAccountListKeyResultInner listKeys(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -1084,16 +1048,13 @@ private ServiceResponse listKeysDelegate(Respons * Gets information about the Batch accounts associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<AccountResourceInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1190,16 +1151,13 @@ private ServiceResponse> listNextDelegate(Respons * Gets information about the Batch accounts associated within the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<AccountResourceInner> object if successful. */ - public PagedList listByResourceGroupNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroupNext(final String nextPageLink) { ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationsInner.java b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationsInner.java index 35ccdd891a63..3859973a440c 100644 --- a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationsInner.java +++ b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/ApplicationsInner.java @@ -17,7 +17,6 @@ import com.microsoft.azure.management.batch.ActivateApplicationPackageParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -115,11 +114,8 @@ interface ApplicationsService { * @param id The id of the application. * @param version The version of the application to activate. * @param format The format of the application package binary file. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void activateApplicationPackage(String resourceGroupName, String accountName, String id, String version, String format) throws CloudException, IOException, IllegalArgumentException { + public void activateApplicationPackage(String resourceGroupName, String accountName, String id, String version, String format) { activateApplicationPackageWithServiceResponseAsync(resourceGroupName, accountName, id, version, format).toBlocking().single().getBody(); } @@ -217,12 +213,9 @@ private ServiceResponse activateApplicationPackageDelegate(Response> call(Response * @param accountName The name of the Batch account. * @param applicationId The id of the application. * @param parameters The parameters for the request. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationInner object if successful. */ - public ApplicationInner addApplication(String resourceGroupName, String accountName, String applicationId, AddApplicationParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ApplicationInner addApplication(String resourceGroupName, String accountName, String applicationId, AddApplicationParametersInner parameters) { return addApplicationWithServiceResponseAsync(resourceGroupName, accountName, applicationId, parameters).toBlocking().single().getBody(); } @@ -396,11 +386,8 @@ private ServiceResponse addApplicationDelegate(Response deleteApplicationDelegate(Response r * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. * @param applicationId The id of the application. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationInner object if successful. */ - public ApplicationInner getApplication(String resourceGroupName, String accountName, String applicationId) throws CloudException, IOException, IllegalArgumentException { + public ApplicationInner getApplication(String resourceGroupName, String accountName, String applicationId) { return getApplicationWithServiceResponseAsync(resourceGroupName, accountName, applicationId).toBlocking().single().getBody(); } @@ -575,11 +559,8 @@ private ServiceResponse getApplicationDelegate(Response updateApplicationDelegate(Response r * @param accountName The name of the Batch account. * @param applicationId The id of the application. * @param version The version of the application. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AddApplicationPackageResultInner object if successful. */ - public AddApplicationPackageResultInner addApplicationPackage(String resourceGroupName, String accountName, String applicationId, String version) throws CloudException, IOException, IllegalArgumentException { + public AddApplicationPackageResultInner addApplicationPackage(String resourceGroupName, String accountName, String applicationId, String version) { return addApplicationPackageWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().getBody(); } @@ -768,11 +746,8 @@ private ServiceResponse addApplicationPackageD * @param accountName The name of the Batch account. * @param applicationId The id of the application. * @param version The version of the application to delete. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void deleteApplicationPackage(String resourceGroupName, String accountName, String applicationId, String version) throws CloudException, IOException, IllegalArgumentException { + public void deleteApplicationPackage(String resourceGroupName, String accountName, String applicationId, String version) { deleteApplicationPackageWithServiceResponseAsync(resourceGroupName, accountName, applicationId, version).toBlocking().single().getBody(); } @@ -863,12 +838,9 @@ private ServiceResponse deleteApplicationPackageDelegate(Response getApplicationPackageD * * @param resourceGroupName The name of the resource group that contains the Batch account. * @param accountName The name of the Batch account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ApplicationInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String accountName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String accountName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1072,16 +1041,13 @@ public Observable>> call(Response list(final String resourceGroupName, final String accountName, final Integer maxresults) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String accountName, final Integer maxresults) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, accountName, maxresults).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1194,16 +1160,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/SubscriptionsInner.java b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/SubscriptionsInner.java index d7896f7b3c2e..621c91676a54 100644 --- a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/SubscriptionsInner.java +++ b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/implementation/SubscriptionsInner.java @@ -62,12 +62,9 @@ interface SubscriptionsService { * Gets the Batch service quotas for the specified suscription. * * @param locationName The desired region for the quotas. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SubscriptionQuotasGetResultInner object if successful. */ - public SubscriptionQuotasGetResultInner getSubscriptionQuotas(String locationName) throws CloudException, IOException, IllegalArgumentException { + public SubscriptionQuotasGetResultInner getSubscriptionQuotas(String locationName) { return getSubscriptionQuotasWithServiceResponseAsync(locationName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java index 7ca42ada6ca3..dc366e34235a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java @@ -85,12 +85,9 @@ interface AvailabilitySetsService { * @param resourceGroupName The name of the resource group. * @param name Parameters supplied to the Create Availability Set operation. * @param parameters Parameters supplied to the Create Availability Set operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AvailabilitySetInner object if successful. */ - public AvailabilitySetInner createOrUpdate(String resourceGroupName, String name, AvailabilitySetInner parameters) throws CloudException, IOException, IllegalArgumentException { + public AvailabilitySetInner createOrUpdate(String resourceGroupName, String name, AvailabilitySetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -175,11 +172,8 @@ private ServiceResponse createOrUpdateDelegate(Response deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AvailabilitySetInner object if successful. */ - public AvailabilitySetInner get(String resourceGroupName, String availabilitySetName) throws CloudException, IOException, IllegalArgumentException { + public AvailabilitySetInner get(String resourceGroupName, String availabilitySetName) { return getWithServiceResponseAsync(resourceGroupName, availabilitySetName).toBlocking().single().getBody(); } @@ -339,12 +330,9 @@ private ServiceResponse getDelegate(Response * The operation to list the availability sets. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<AvailabilitySetInner> object if successful. */ - public List list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public List list(String resourceGroupName) { return listWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -417,12 +405,9 @@ private ServiceResponse> listDelegate(Response listAvailableSizes(String resourceGroupName, String availabilitySetName) throws CloudException, IOException, IllegalArgumentException { + public List listAvailableSizes(String resourceGroupName, String availabilitySetName) { return listAvailableSizesWithServiceResponseAsync(resourceGroupName, availabilitySetName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java index 169e7b333290..40a924fe871e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -71,16 +70,13 @@ interface UsagesService { * Lists compute usages for a subscription. * * @param location The location upon which resource usage is queried. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList list(final String location) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String location) { ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -182,16 +178,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java index c3cc3f210be7..14529247e919 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java @@ -74,12 +74,9 @@ interface VirtualMachineExtensionImagesService { * @param publisherName the String value * @param type the String value * @param version the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineExtensionImageInner object if successful. */ - public VirtualMachineExtensionImageInner get(String location, String publisherName, String type, String version) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineExtensionImageInner get(String location, String publisherName, String type, String version) { return getWithServiceResponseAsync(location, publisherName, type, version).toBlocking().single().getBody(); } @@ -169,12 +166,9 @@ private ServiceResponse getDelegate(Response< * * @param location the String value * @param publisherName the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineExtensionImageInner> object if successful. */ - public List listTypes(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException { + public List listTypes(String location, String publisherName) { return listTypesWithServiceResponseAsync(location, publisherName).toBlocking().single().getBody(); } @@ -253,12 +247,9 @@ private ServiceResponse> listTypesDelega * @param location the String value * @param publisherName the String value * @param type the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineExtensionImageInner> object if successful. */ - public List listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException { + public List listVersions(String location, String publisherName, String type) { return listVersionsWithServiceResponseAsync(location, publisherName, type).toBlocking().single().getBody(); } @@ -342,12 +333,9 @@ public Observable>> call * @param filter The filter to apply on the operation. * @param top the Integer value * @param orderby the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineExtensionImageInner> object if successful. */ - public List listVersions(String location, String publisherName, String type, String filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException { + public List listVersions(String location, String publisherName, String type, String filter, Integer top, String orderby) { return listVersionsWithServiceResponseAsync(location, publisherName, type, filter, top, orderby).toBlocking().single().getBody(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index 8ac198723470..b984fe3cc6fa 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java @@ -85,13 +85,9 @@ interface VirtualMachineExtensionsService { * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualMachineExtensionInner object if successful. */ - public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualMachineExtensionInner createOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().last().getBody(); } @@ -167,12 +163,9 @@ public Observable> createOrUpdateW * @param vmName The name of the virtual machine where the extension should be create or updated. * @param vmExtensionName The name of the virtual machine extension. * @param extensionParameters Parameters supplied to the Create Virtual Machine Extension operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineExtensionInner object if successful. */ - public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().getBody(); } @@ -265,12 +258,8 @@ private ServiceResponse beginCreateOrUpdateDelegat * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String vmName, String vmExtensionName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String vmName, String vmExtensionName) { deleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().last().getBody(); } @@ -338,11 +327,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine where the extension should be deleted. * @param vmExtensionName The name of the virtual machine extension. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String vmName, String vmExtensionName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String vmName, String vmExtensionName) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().getBody(); } @@ -427,12 +413,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine containing the extension. * @param vmExtensionName The name of the virtual machine extension. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineExtensionInner object if successful. */ - public VirtualMachineExtensionInner get(String resourceGroupName, String vmName, String vmExtensionName) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineExtensionInner get(String resourceGroupName, String vmName, String vmExtensionName) { return getWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName).toBlocking().single().getBody(); } @@ -512,12 +495,9 @@ public Observable> call(Response getDelegate(Response list(String location, String publisherName, String offer, String skus) throws CloudException, IOException, IllegalArgumentException { + public List list(String location, String publisherName, String offer, String skus) { return listWithServiceResponseAsync(location, publisherName, offer, skus).toBlocking().single().getBody(); } @@ -282,12 +276,9 @@ public Observable>> call( * @param filter The filter to apply on the operation. * @param top the Integer value * @param orderby the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineImageResourceInner> object if successful. */ - public List list(String location, String publisherName, String offer, String skus, String filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException { + public List list(String location, String publisherName, String offer, String skus, String filter, Integer top, String orderby) { return listWithServiceResponseAsync(location, publisherName, offer, skus, filter, top, orderby).toBlocking().single().getBody(); } @@ -386,12 +377,9 @@ private ServiceResponse> listDelegate(Res * * @param location the String value * @param publisherName the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineImageResourceInner> object if successful. */ - public List listOffers(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException { + public List listOffers(String location, String publisherName) { return listOffersWithServiceResponseAsync(location, publisherName).toBlocking().single().getBody(); } @@ -468,12 +456,9 @@ private ServiceResponse> listOffersDelega * Gets a list of virtual machine image publishers. * * @param location the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineImageResourceInner> object if successful. */ - public List listPublishers(String location) throws CloudException, IOException, IllegalArgumentException { + public List listPublishers(String location) { return listPublishersWithServiceResponseAsync(location).toBlocking().single().getBody(); } @@ -546,12 +531,9 @@ private ServiceResponse> listPublishersDe * @param location the String value * @param publisherName the String value * @param offer the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineImageResourceInner> object if successful. */ - public List listSkus(String location, String publisherName, String offer) throws CloudException, IOException, IllegalArgumentException { + public List listSkus(String location, String publisherName, String offer) { return listSkusWithServiceResponseAsync(location, publisherName, offer).toBlocking().single().getBody(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index 7f6440659974..d3192ca53d7e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -132,12 +131,8 @@ interface VirtualMachineScaleSetVMsService { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void reimage(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void reimage(String resourceGroupName, String vmScaleSetName, String instanceId) { reimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -205,11 +200,8 @@ public Observable> reimageWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginReimage(String resourceGroupName, String vmScaleSetName, String instanceId) { beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -293,12 +285,8 @@ private ServiceResponse beginReimageDelegate(Response respon * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void deallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -366,11 +354,8 @@ public Observable> deallocateWithServiceResponseAsync(Stri * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, String instanceId) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -454,12 +439,8 @@ private ServiceResponse beginDeallocateDelegate(Response res * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String vmScaleSetName, String instanceId) { deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -527,11 +508,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String vmScaleSetName, String instanceId) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -617,12 +595,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineScaleSetVMInner object if successful. */ - public VirtualMachineScaleSetVMInner get(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineScaleSetVMInner get(String resourceGroupName, String vmScaleSetName, String instanceId) { return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -707,12 +682,9 @@ private ServiceResponse getDelegate(Response getInstanceVi * * @param resourceGroupName The name of the resource group. * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetVMInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String virtualMachineScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String virtualMachineScaleSetName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -914,16 +883,13 @@ public Observable>> call(Res * @param filter The filter to apply on the operation. * @param select The list parameters. * @param expand The expand expression to apply on the operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetVMInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String virtualMachineScaleSetName, final String filter, final String select, final String expand) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String virtualMachineScaleSetName, final String filter, final String select, final String expand) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, filter, select, expand).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1046,12 +1012,8 @@ private ServiceResponse> listDelegate(R * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void powerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -1119,11 +1081,8 @@ public Observable> powerOffWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, String instanceId) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -1207,12 +1166,8 @@ private ServiceResponse beginPowerOffDelegate(Response respo * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void restart(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void restart(String resourceGroupName, String vmScaleSetName, String instanceId) { restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -1280,11 +1235,8 @@ public Observable> restartWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginRestart(String resourceGroupName, String vmScaleSetName, String instanceId) { beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -1368,12 +1320,8 @@ private ServiceResponse beginRestartDelegate(Response respon * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void start(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void start(String resourceGroupName, String vmScaleSetName, String instanceId) { startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().last().getBody(); } @@ -1441,11 +1389,8 @@ public Observable> startWithServiceResponseAsync(String re * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceId The instance id of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public void beginStart(String resourceGroupName, String vmScaleSetName, String instanceId) { beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceId).toBlocking().single().getBody(); } @@ -1527,16 +1472,13 @@ private ServiceResponse beginStartDelegate(Response response * Lists all virtual machines in a VM scale sets. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetVMInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java index 47de6b0de9d1..68f63c9f7b00 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.compute.VirtualMachineScaleSetVMInstanceRequiredIDs; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -177,13 +176,9 @@ interface VirtualMachineScaleSetsService { * @param resourceGroupName The name of the resource group. * @param name Parameters supplied to the Create Virtual Machine Scale Set operation. * @param parameters Parameters supplied to the Create Virtual Machine Scale Set operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner createOrUpdate(String resourceGroupName, String name, VirtualMachineScaleSetInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualMachineScaleSetInner createOrUpdate(String resourceGroupName, String name, VirtualMachineScaleSetInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } @@ -252,12 +247,9 @@ public Observable> createOrUpdateWi * @param resourceGroupName The name of the resource group. * @param name Parameters supplied to the Create Virtual Machine Scale Set operation. * @param parameters Parameters supplied to the Create Virtual Machine Scale Set operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner beginCreateOrUpdate(String resourceGroupName, String name, VirtualMachineScaleSetInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineScaleSetInner beginCreateOrUpdate(String resourceGroupName, String name, VirtualMachineScaleSetInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -343,12 +335,8 @@ private ServiceResponse beginCreateOrUpdateDelegate * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void deallocate(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void deallocate(String resourceGroupName, String vmScaleSetName) { deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().getBody(); } @@ -412,12 +400,8 @@ public Observable> deallocateWithServiceResponseAsync(Stri * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void deallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { deallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -487,11 +471,8 @@ public Observable> deallocateWithServiceResponseAsync(Stri * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDeallocate(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginDeallocate(String resourceGroupName, String vmScaleSetName) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -566,11 +547,8 @@ public Observable> call(Response response) { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginDeallocate(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -656,12 +634,8 @@ private ServiceResponse beginDeallocateDelegate(Response res * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String vmScaleSetName) { deleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().getBody(); } @@ -722,11 +696,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String vmScaleSetName) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -805,12 +776,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineScaleSetInner object if successful. */ - public VirtualMachineScaleSetInner get(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineScaleSetInner get(String resourceGroupName, String vmScaleSetName) { return getWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -889,12 +857,8 @@ private ServiceResponse getDelegate(Response instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void deleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { deleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -965,11 +929,8 @@ public Observable> deleteInstancesWithServiceResponseAsync * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginDeleteInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginDeleteInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -1055,12 +1016,9 @@ private ServiceResponse beginDeleteInstancesDelegate(Response getInstanceView * Lists all virtual machine scale sets under a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1247,16 +1202,13 @@ private ServiceResponse> listDelegate(Res /** * Lists all Virtual Machine Scale Sets in the subscription. Use nextLink property in the response to get the next page of Virtual Machine Scale Sets. Do this till nextLink is not null to fetch all the Virtual Machine Scale Sets. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1352,16 +1304,13 @@ private ServiceResponse> listAllDelegate( * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetSkuInner> object if successful. */ - public PagedList listSkus(final String resourceGroupName, final String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSkus(final String resourceGroupName, final String vmScaleSetName) { ServiceResponse> response = listSkusSinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1471,12 +1420,8 @@ private ServiceResponse> listSkusDeleg * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void powerOff(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void powerOff(String resourceGroupName, String vmScaleSetName) { powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().getBody(); } @@ -1540,12 +1485,8 @@ public Observable> powerOffWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void powerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { powerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -1615,11 +1556,8 @@ public Observable> powerOffWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginPowerOff(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginPowerOff(String resourceGroupName, String vmScaleSetName) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -1694,11 +1632,8 @@ public Observable> call(Response response) { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginPowerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginPowerOff(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -1784,12 +1719,8 @@ private ServiceResponse beginPowerOffDelegate(Response respo * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void restart(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void restart(String resourceGroupName, String vmScaleSetName) { restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().getBody(); } @@ -1853,12 +1784,8 @@ public Observable> restartWithServiceResponseAsync(String * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void restart(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void restart(String resourceGroupName, String vmScaleSetName, List instanceIds) { restartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -1928,11 +1855,8 @@ public Observable> restartWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginRestart(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginRestart(String resourceGroupName, String vmScaleSetName) { beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -2007,11 +1931,8 @@ public Observable> call(Response response) { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginRestart(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginRestart(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginRestartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -2097,12 +2018,8 @@ private ServiceResponse beginRestartDelegate(Response respon * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void start(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void start(String resourceGroupName, String vmScaleSetName) { startWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().last().getBody(); } @@ -2166,12 +2083,8 @@ public Observable> startWithServiceResponseAsync(String re * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void start(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void start(String resourceGroupName, String vmScaleSetName, List instanceIds) { startWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -2241,11 +2154,8 @@ public Observable> startWithServiceResponseAsync(String re * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStart(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginStart(String resourceGroupName, String vmScaleSetName) { beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -2320,11 +2230,8 @@ public Observable> call(Response response) { * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStart(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginStart(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginStartWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -2411,12 +2318,8 @@ private ServiceResponse beginStartDelegate(Response response * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void updateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { updateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().last().getBody(); } @@ -2487,11 +2390,8 @@ public Observable> updateInstancesWithServiceResponseAsync * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. * @param instanceIds the virtual machine scale set instance ids. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) throws CloudException, IOException, IllegalArgumentException { + public void beginUpdateInstances(String resourceGroupName, String vmScaleSetName, List instanceIds) { beginUpdateInstancesWithServiceResponseAsync(resourceGroupName, vmScaleSetName, instanceIds).toBlocking().single().getBody(); } @@ -2577,12 +2477,8 @@ private ServiceResponse beginUpdateInstancesDelegate(Response> reimageWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginReimage(String resourceGroupName, String vmScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public void beginReimage(String resourceGroupName, String vmScaleSetName) { beginReimageWithServiceResponseAsync(resourceGroupName, vmScaleSetName).toBlocking().single().getBody(); } @@ -2723,16 +2616,13 @@ private ServiceResponse beginReimageDelegate(Response respon * Lists all virtual machine scale sets under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2829,16 +2719,13 @@ private ServiceResponse> listNextDelegate * Lists all Virtual Machine Scale Sets in the subscription. Use nextLink property in the response to get the next page of Virtual Machine Scale Sets. Do this till nextLink is not null to fetch all the Virtual Machine Scale Sets. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2935,16 +2822,13 @@ private ServiceResponse> listAllNextDeleg * Displays available skus for your virtual machine scale set including the minimum and maximum vm instances allowed for a particular sku. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineScaleSetSkuInner> object if successful. */ - public PagedList listSkusNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSkusNext(final String nextPageLink) { ServiceResponse> response = listSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java index d75d3b18b908..7753de7dfe38 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java @@ -63,12 +63,9 @@ interface VirtualMachineSizesService { * Lists all available virtual machine sizes for a subscription in a location. * * @param location The location upon which virtual-machine-sizes is queried. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSizeInner> object if successful. */ - public List list(String location) throws CloudException, IOException, IllegalArgumentException { + public List list(String location) { return listWithServiceResponseAsync(location).toBlocking().single().getBody(); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java index 2f2ca09da5ac..b195f42873f2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java @@ -17,7 +17,6 @@ import com.microsoft.azure.management.compute.InstanceViewTypes; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -164,13 +163,9 @@ interface VirtualMachinesService { * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualMachineCaptureResultInner capture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { return captureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().getBody(); } @@ -239,12 +234,9 @@ public Observable> captureWith * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Capture Virtual Machine operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineCaptureResultInner object if successful. */ - public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineCaptureResultInner beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParametersInner parameters) { return beginCaptureWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().getBody(); } @@ -331,13 +323,9 @@ private ServiceResponse beginCaptureDelegate(R * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualMachineInner object if successful. */ - public VirtualMachineInner createOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualMachineInner createOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().last().getBody(); } @@ -406,12 +394,9 @@ public Observable> createOrUpdateWithServic * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. * @param parameters Parameters supplied to the Create Virtual Machine operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineInner object if successful. */ - public VirtualMachineInner beginCreateOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineInner beginCreateOrUpdate(String resourceGroupName, String vmName, VirtualMachineInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, parameters).toBlocking().single().getBody(); } @@ -497,12 +482,8 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String vmName) { deleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -563,11 +544,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String vmName) { beginDeleteWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -645,12 +623,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachineInner object if successful. */ - public VirtualMachineInner get(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public VirtualMachineInner get(String resourceGroupName, String vmName) { return getWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -723,12 +698,9 @@ public Observable> call(Response getDelegate(Response * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void deallocate(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void deallocate(String resourceGroupName, String vmName) { deallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -875,11 +843,8 @@ public Observable> deallocateWithServiceResponseAsync(Stri * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDeallocate(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginDeallocate(String resourceGroupName, String vmName) { beginDeallocateWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -956,11 +921,8 @@ private ServiceResponse beginDeallocateDelegate(Response res * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void generalize(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void generalize(String resourceGroupName, String vmName) { generalizeWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1036,16 +998,13 @@ private ServiceResponse generalizeDelegate(Response response * The operation to list virtual machines under a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1146,16 +1105,13 @@ private ServiceResponse> listDelegate(Response listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1251,12 +1207,9 @@ private ServiceResponse> listAllDelegate(Response * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSizeInner> object if successful. */ - public List listAvailableSizes(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public List listAvailableSizes(String resourceGroupName, String vmName) { return listAvailableSizesWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1335,12 +1288,8 @@ private ServiceResponse> listAvailableSizesDel * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void powerOff(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void powerOff(String resourceGroupName, String vmName) { powerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -1401,11 +1350,8 @@ public Observable> powerOffWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginPowerOff(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginPowerOff(String resourceGroupName, String vmName) { beginPowerOffWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1482,12 +1428,8 @@ private ServiceResponse beginPowerOffDelegate(Response respo * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void restart(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void restart(String resourceGroupName, String vmName) { restartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -1548,11 +1490,8 @@ public Observable> restartWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginRestart(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginRestart(String resourceGroupName, String vmName) { beginRestartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1629,12 +1568,8 @@ private ServiceResponse beginRestartDelegate(Response respon * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void start(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void start(String resourceGroupName, String vmName) { startWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -1695,11 +1630,8 @@ public Observable> startWithServiceResponseAsync(String re * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStart(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginStart(String resourceGroupName, String vmName) { beginStartWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1776,12 +1708,8 @@ private ServiceResponse beginStartDelegate(Response response * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void redeploy(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void redeploy(String resourceGroupName, String vmName) { redeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().last().getBody(); } @@ -1842,11 +1770,8 @@ public Observable> redeployWithServiceResponseAsync(String * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginRedeploy(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { + public void beginRedeploy(String resourceGroupName, String vmName) { beginRedeployWithServiceResponseAsync(resourceGroupName, vmName).toBlocking().single().getBody(); } @@ -1922,16 +1847,13 @@ private ServiceResponse beginRedeployDelegate(Response respo * The operation to list virtual machines under a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2028,16 +1950,13 @@ private ServiceResponse> listNextDelegate(Respons * Gets the list of Virtual Machines in the subscription. Use nextLink property in the response to get the next page of Virtual Machines. Do this till nextLink is not null to fetch all the Virtual Machines. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualMachineInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ApplicationsInner.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ApplicationsInner.java index d77097b6d262..3d988d0f4b72 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ApplicationsInner.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ApplicationsInner.java @@ -102,12 +102,9 @@ interface ApplicationsService { * Create a new application. Reference: http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx. * * @param parameters Parameters to create an application. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationInner object if successful. */ - public ApplicationInner create(ApplicationCreateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public ApplicationInner create(ApplicationCreateParametersInner parameters) { return createWithServiceResponseAsync(parameters).toBlocking().single().getBody(); } @@ -178,12 +175,9 @@ private ServiceResponse createDelegate(Response /** * Lists applications by filter parameters. Reference: http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx. * - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<ApplicationInner> object if successful. */ - public List list() throws GraphErrorException, IOException, IllegalArgumentException { + public List list() { return listWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -243,12 +237,9 @@ public Observable>> call(Response list(String filter) throws GraphErrorException, IOException, IllegalArgumentException { + public List list(String filter) { return listWithServiceResponseAsync(filter).toBlocking().single().getBody(); } @@ -317,11 +308,8 @@ private ServiceResponse> listDelegate(Response deleteDelegate(Response response) th * Get an application by object Id. Reference: http://msdn.microsoft.com/en-us/library/azure/hh974476.aspx. * * @param applicationObjectId Application object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationInner object if successful. */ - public ApplicationInner get(String applicationObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public ApplicationInner get(String applicationObjectId) { return getWithServiceResponseAsync(applicationObjectId).toBlocking().single().getBody(); } @@ -469,11 +454,8 @@ private ServiceResponse getDelegate(Response res * * @param applicationObjectId Application object id * @param parameters Parameters to update an existing application. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void patch(String applicationObjectId, ApplicationUpdateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public void patch(String applicationObjectId, ApplicationUpdateParametersInner parameters) { patchWithServiceResponseAsync(applicationObjectId, parameters).toBlocking().single().getBody(); } @@ -551,12 +533,9 @@ private ServiceResponse patchDelegate(Response response) thr * Get keyCredentials associated with the application by object Id. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type. * * @param applicationObjectId Application object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<KeyCredentialInner> object if successful. */ - public List listKeyCredentials(String applicationObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public List listKeyCredentials(String applicationObjectId) { return listKeyCredentialsWithServiceResponseAsync(applicationObjectId).toBlocking().single().getBody(); } @@ -628,11 +607,8 @@ private ServiceResponse> listKeyCredentialsDelegate * Update keyCredentials associated with an existing application. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type. * * @param applicationObjectId Application object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updateKeyCredentials(String applicationObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void updateKeyCredentials(String applicationObjectId) { updateKeyCredentialsWithServiceResponseAsync(applicationObjectId).toBlocking().single().getBody(); } @@ -700,11 +676,8 @@ public Observable> call(Response response) { * * @param applicationObjectId Application object id * @param value KeyCredential list. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updateKeyCredentials(String applicationObjectId, List value) throws GraphErrorException, IOException, IllegalArgumentException { + public void updateKeyCredentials(String applicationObjectId, List value) { updateKeyCredentialsWithServiceResponseAsync(applicationObjectId, value).toBlocking().single().getBody(); } @@ -781,12 +754,9 @@ private ServiceResponse updateKeyCredentialsDelegate(Response listPasswordCredentials(String applicationObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public List listPasswordCredentials(String applicationObjectId) { return listPasswordCredentialsWithServiceResponseAsync(applicationObjectId).toBlocking().single().getBody(); } @@ -858,11 +828,8 @@ private ServiceResponse> listPasswordCredentia * Updates passwordCredentials associated with an existing application. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type. * * @param applicationObjectId Application object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updatePasswordCredentials(String applicationObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void updatePasswordCredentials(String applicationObjectId) { updatePasswordCredentialsWithServiceResponseAsync(applicationObjectId).toBlocking().single().getBody(); } @@ -930,11 +897,8 @@ public Observable> call(Response response) { * * @param applicationObjectId Application object id * @param value PasswordCredential list. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updatePasswordCredentials(String applicationObjectId, List value) throws GraphErrorException, IOException, IllegalArgumentException { + public void updatePasswordCredentials(String applicationObjectId, List value) { updatePasswordCredentialsWithServiceResponseAsync(applicationObjectId, value).toBlocking().single().getBody(); } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/GroupsInner.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/GroupsInner.java index 909a198bd288..16952a222ca2 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/GroupsInner.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/GroupsInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.graphrbac.GroupGetMemberGroupsParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -114,12 +113,9 @@ interface GroupsService { * Checks whether the specified user, group, contact, or service principal is a direct or a transitive member of the specified group. * * @param parameters Check group membership parameters. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CheckGroupMembershipResultInner object if successful. */ - public CheckGroupMembershipResultInner isMemberOf(CheckGroupMembershipParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public CheckGroupMembershipResultInner isMemberOf(CheckGroupMembershipParametersInner parameters) { return isMemberOfWithServiceResponseAsync(parameters).toBlocking().single().getBody(); } @@ -192,11 +188,8 @@ private ServiceResponse isMemberOfDelegate(Resp * * @param groupObjectId Group object id * @param memberObjectId Member Object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void removeMember(String groupObjectId, String memberObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void removeMember(String groupObjectId, String memberObjectId) { removeMemberWithServiceResponseAsync(groupObjectId, memberObjectId).toBlocking().single().getBody(); } @@ -274,11 +267,8 @@ private ServiceResponse removeMemberDelegate(Response respon * * @param groupObjectId Group object id * @param url Member Object Url as "https://graph.windows.net/0b1f9851-1bf0-433f-aec3-cb9272f093dc/directoryObjects/f260bbc4-c254-447b-94cf-293b5ec434dd", where "0b1f9851-1bf0-433f-aec3-cb9272f093dc" is the tenantId and "f260bbc4-c254-447b-94cf-293b5ec434dd" is the objectId of the member (user, application, servicePrincipal, group) to be added. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void addMember(String groupObjectId, String url) throws GraphErrorException, IOException, IllegalArgumentException { + public void addMember(String groupObjectId, String url) { addMemberWithServiceResponseAsync(groupObjectId, url).toBlocking().single().getBody(); } @@ -357,11 +347,8 @@ private ServiceResponse addMemberDelegate(Response response) * Delete a group in the directory. Reference: http://msdn.microsoft.com/en-us/library/azure/dn151676.aspx. * * @param groupObjectId Object id - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String groupObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void delete(String groupObjectId) { deleteWithServiceResponseAsync(groupObjectId).toBlocking().single().getBody(); } @@ -432,12 +419,9 @@ private ServiceResponse deleteDelegate(Response response) th * Create a group in the directory. Reference: http://msdn.microsoft.com/en-us/library/azure/dn151676.aspx. * * @param parameters Parameters to create a group - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ADGroupInner object if successful. */ - public ADGroupInner create(GroupCreateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public ADGroupInner create(GroupCreateParametersInner parameters) { return createWithServiceResponseAsync(parameters).toBlocking().single().getBody(); } @@ -508,16 +492,13 @@ private ServiceResponse createDelegate(Response resp /** * Gets list of groups for the current tenant. * - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ADGroupInner> object if successful. */ - public PagedList list() throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -606,16 +587,13 @@ public Observable>> call(Response list(final String filter) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list(final String filter) { ServiceResponse> response = listSinglePageAsync(filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -714,16 +692,13 @@ private ServiceResponse> listDelegate(Response getGroupMembers(final String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList getGroupMembers(final String objectId) { ServiceResponse> response = getGroupMembersSinglePageAsync(objectId).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return getGroupMembersNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -825,12 +800,9 @@ private ServiceResponse> getGroupMembersDelegate(Respo * Gets group information from the directory. * * @param objectId User objectId to get group information. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ADGroupInner object if successful. */ - public ADGroupInner get(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public ADGroupInner get(String objectId) { return getWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -902,12 +874,9 @@ private ServiceResponse getDelegate(Response respons * * @param objectId Group filtering parameters. * @param securityEnabledOnly If true only membership in security enabled groups should be checked. Otherwise membership in all groups should be checked - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<String> object if successful. */ - public List getMemberGroups(String objectId, boolean securityEnabledOnly) throws GraphErrorException, IOException, IllegalArgumentException { + public List getMemberGroups(String objectId, boolean securityEnabledOnly) { return getMemberGroupsWithServiceResponseAsync(objectId, securityEnabledOnly).toBlocking().single().getBody(); } @@ -984,16 +953,13 @@ private ServiceResponse> getMemberGroupsDelegate(Response listNext(final String nextLink) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextLink) { ServiceResponse> response = listNextSinglePageAsync(nextLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -1096,16 +1062,13 @@ private ServiceResponse> listNextDelegate(Response getGroupMembersNext(final String nextLink) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList getGroupMembersNext(final String nextLink) { ServiceResponse> response = getGroupMembersNextSinglePageAsync(nextLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return getGroupMembersNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ObjectsInner.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ObjectsInner.java index 98ae94a7696e..8acffcf122a2 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ObjectsInner.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ObjectsInner.java @@ -61,12 +61,9 @@ interface ObjectsService { /** * Gets the details for current logged in user. * - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AADObjectInner object if successful. */ - public AADObjectInner getCurrentUser() throws GraphErrorException, IOException, IllegalArgumentException { + public AADObjectInner getCurrentUser() { return getCurrentUserWithServiceResponseAsync().toBlocking().single().getBody(); } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsInner.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsInner.java index 963ea8bfe284..2dc922bc25f9 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsInner.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.graphrbac.PasswordCredentialsUpdateParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -107,12 +106,9 @@ interface ServicePrincipalsService { * Creates a service principal in the directory. * * @param parameters Parameters to create a service principal. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServicePrincipalInner object if successful. */ - public ServicePrincipalInner create(ServicePrincipalCreateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public ServicePrincipalInner create(ServicePrincipalCreateParametersInner parameters) { return createWithServiceResponseAsync(parameters).toBlocking().single().getBody(); } @@ -183,16 +179,13 @@ private ServiceResponse createDelegate(Response list() throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -281,16 +274,13 @@ public Observable>> call(Response list(final String filter) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list(final String filter) { ServiceResponse> response = listSinglePageAsync(filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -389,11 +379,8 @@ private ServiceResponse> listDelegate(Response< * Deletes service principal from the directory. * * @param objectId Object id to delete service principal information. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void delete(String objectId) { deleteWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -464,12 +451,9 @@ private ServiceResponse deleteDelegate(Response response) th * Gets service principal information from the directory. * * @param objectId Object id to get service principal information. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServicePrincipalInner object if successful. */ - public ServicePrincipalInner get(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public ServicePrincipalInner get(String objectId) { return getWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -540,12 +524,9 @@ private ServiceResponse getDelegate(Response listKeyCredentials(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public List listKeyCredentials(String objectId) { return listKeyCredentialsWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -617,11 +598,8 @@ private ServiceResponse> listKeyCredentialsDelegate * Update keyCredentials associated with an existing service principal. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#keycredential-type. * * @param objectId Object id to get service principal information. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updateKeyCredentials(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void updateKeyCredentials(String objectId) { updateKeyCredentialsWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -689,11 +667,8 @@ public Observable> call(Response response) { * * @param objectId Object id to get service principal information. * @param value KeyCredential list. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updateKeyCredentials(String objectId, List value) throws GraphErrorException, IOException, IllegalArgumentException { + public void updateKeyCredentials(String objectId, List value) { updateKeyCredentialsWithServiceResponseAsync(objectId, value).toBlocking().single().getBody(); } @@ -770,12 +745,9 @@ private ServiceResponse updateKeyCredentialsDelegate(Response listPasswordCredentials(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public List listPasswordCredentials(String objectId) { return listPasswordCredentialsWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -847,11 +819,8 @@ private ServiceResponse> listPasswordCredentia * Updates passwordCredentials associated with an existing service principal. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/entity-and-complex-type-reference#passwordcredential-type. * * @param objectId Object id to get service principal information. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updatePasswordCredentials(String objectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void updatePasswordCredentials(String objectId) { updatePasswordCredentialsWithServiceResponseAsync(objectId).toBlocking().single().getBody(); } @@ -919,11 +888,8 @@ public Observable> call(Response response) { * * @param objectId Object id to get service principal information. * @param value PasswordCredential list. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void updatePasswordCredentials(String objectId, List value) throws GraphErrorException, IOException, IllegalArgumentException { + public void updatePasswordCredentials(String objectId, List value) { updatePasswordCredentialsWithServiceResponseAsync(objectId, value).toBlocking().single().getBody(); } @@ -1000,16 +966,13 @@ private ServiceResponse updatePasswordCredentialsDelegate(Response listNext(final String nextLink) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextLink) { ServiceResponse> response = listNextSinglePageAsync(nextLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersInner.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersInner.java index 91499376d8cd..729686e710d1 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersInner.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersInner.java @@ -17,7 +17,6 @@ import com.microsoft.azure.management.graphrbac.UserGetMemberGroupsParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,9 @@ interface UsersService { * Create a new user. Reference: https://msdn.microsoft.com/library/azure/ad/graph/api/users-operations#CreateUser. * * @param parameters Parameters to create a user. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner create(UserCreateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public UserInner create(UserCreateParametersInner parameters) { return createWithServiceResponseAsync(parameters).toBlocking().single().getBody(); } @@ -174,16 +170,13 @@ private ServiceResponse createDelegate(Response respons /** * Gets list of users for the current tenant. Reference https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#GetUsers. * - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UserInner> object if successful. */ - public PagedList list() throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -272,16 +265,13 @@ public Observable>> call(Response * Gets list of users for the current tenant. Reference https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#GetUsers. * * @param filter The filter to apply on the operation. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UserInner> object if successful. */ - public PagedList list(final String filter) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList list(final String filter) { ServiceResponse> response = listSinglePageAsync(filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; @@ -380,12 +370,9 @@ private ServiceResponse> listDelegate(Response getDelegate(Response response) * * @param upnOrObjectId User object Id or user principal name to get user information. * @param parameters Parameters to update an exisitng user. - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void update(String upnOrObjectId, UserUpdateParametersInner parameters) throws GraphErrorException, IOException, IllegalArgumentException { + public void update(String upnOrObjectId, UserUpdateParametersInner parameters) { updateWithServiceResponseAsync(upnOrObjectId, parameters).toBlocking().single().getBody(); } @@ -539,11 +523,8 @@ private ServiceResponse updateDelegate(Response response) th * Delete a user. Reference: https://msdn.microsoft.com/en-us/library/azure/ad/graph/api/users-operations#DeleteUser. * * @param upnOrObjectId user object id or user principal name (upn) - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String upnOrObjectId) throws GraphErrorException, IOException, IllegalArgumentException { + public void delete(String upnOrObjectId) { deleteWithServiceResponseAsync(upnOrObjectId).toBlocking().single().getBody(); } @@ -615,12 +596,9 @@ private ServiceResponse deleteDelegate(Response response) th * * @param objectId User filtering parameters. * @param securityEnabledOnly If true only membership in security enabled groups should be checked. Otherwise membership in all groups should be checked - * @throws GraphErrorException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<String> object if successful. */ - public List getMemberGroups(String objectId, boolean securityEnabledOnly) throws GraphErrorException, IOException, IllegalArgumentException { + public List getMemberGroups(String objectId, boolean securityEnabledOnly) { return getMemberGroupsWithServiceResponseAsync(objectId, securityEnabledOnly).toBlocking().single().getBody(); } @@ -697,16 +675,13 @@ private ServiceResponse> getMemberGroupsDelegate(Response listNext(final String nextLink) throws GraphErrorException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextLink) { ServiceResponse> response = listNextSinglePageAsync(nextLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { return listNextSinglePageAsync(nextLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsInner.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsInner.java index 33bc29b7c489..91572f5f50a4 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsInner.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.keyvault.implementation; +import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceCall; import com.microsoft.azure.AzureServiceResponseBuilder; @@ -15,28 +16,24 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; +import java.io.IOException; +import java.util.List; import okhttp3.ResponseBody; -import retrofit2.Response; -import retrofit2.Retrofit; import retrofit2.http.Body; import retrofit2.http.GET; -import retrofit2.http.HTTP; import retrofit2.http.Header; import retrofit2.http.Headers; -import retrofit2.http.PUT; +import retrofit2.http.HTTP; import retrofit2.http.Path; +import retrofit2.http.PUT; import retrofit2.http.Query; -import retrofit2.http.Url; -import rx.Observable; +import retrofit2.Response; import rx.functions.Func1; - -import java.io.IOException; -import java.util.List; +import rx.Observable; /** * An instance of this class provides access to all the operations defined @@ -85,12 +82,12 @@ interface VaultsService { Observable> list(@Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("$top") Integer top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET - Observable> listByResourceGroupNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listByResourceGroupNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); @Headers("Content-Type: application/json; charset=utf-8") - @GET - Observable> listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @GET("{nextLink}") + Observable> listNext(@Path(value = "nextLink", encoded = true) String nextPageLink, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); } @@ -100,12 +97,9 @@ interface VaultsService { * @param resourceGroupName The name of the Resource Group to which the server belongs. * @param vaultName Name of the vault * @param parameters Parameters to create or update the vault - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VaultInner object if successful. */ - public VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultCreateOrUpdateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VaultInner createOrUpdate(String resourceGroupName, String vaultName, VaultCreateOrUpdateParametersInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, vaultName, parameters).toBlocking().single().getBody(); } @@ -191,11 +185,8 @@ private ServiceResponse createOrUpdateDelegate(Response deleteDelegate(Response response) th * * @param resourceGroupName The name of the Resource Group to which the vault belongs. * @param vaultName The name of the vault. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VaultInner object if successful. */ - public VaultInner get(String resourceGroupName, String vaultName) throws CloudException, IOException, IllegalArgumentException { + public VaultInner get(String resourceGroupName, String vaultName) { return getWithServiceResponseAsync(resourceGroupName, vaultName).toBlocking().single().getBody(); } @@ -354,16 +342,13 @@ private ServiceResponse getDelegate(Response response) * The List operation gets information about the vaults associated with the subscription and within the specified resource group. * * @param resourceGroupName The name of the Resource Group to which the vault belongs. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VaultInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroup(final String resourceGroupName) { ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -460,16 +445,13 @@ public Observable>> call(Response * * @param resourceGroupName The name of the Resource Group to which the vault belongs. * @param top Maximum number of results to return. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VaultInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroup(final String resourceGroupName, final Integer top) { ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -574,16 +556,13 @@ private ServiceResponse> listByResourceGroupDelegate(Respon /** * The List operation gets information about the vaults associated with the subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VaultInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -671,16 +650,13 @@ public Observable>> call(Response * The List operation gets information about the vaults associated with the subscription. * * @param top Maximum number of results to return. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VaultInner> object if successful. */ - public PagedList list(final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final Integer top) { ServiceResponse> response = listSinglePageAsync(top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -778,16 +754,13 @@ private ServiceResponse> listDelegate(Response listByResourceGroupNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroupNext(final String nextPageLink) { ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -884,16 +857,13 @@ private ServiceResponse> listByResourceGroupNextDelegate(Re * The List operation gets information about the vaults associated with the subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VaultInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java index 8ccbe1c3793e..664ea62d4a07 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ApplicationGatewaysInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -122,12 +121,8 @@ interface ApplicationGatewaysService { * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String applicationGatewayName) { deleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().getBody(); } @@ -188,11 +183,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String applicationGatewayName) { beginDeleteWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().getBody(); } @@ -271,12 +263,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationGatewayInner object if successful. */ - public ApplicationGatewayInner get(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException { + public ApplicationGatewayInner get(String resourceGroupName, String applicationGatewayName) { return getWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().getBody(); } @@ -355,13 +344,9 @@ private ServiceResponse getDelegate(Response> createOrUpdateWithSe * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the ApplicationGateway. * @param parameters Parameters supplied to the create/delete ApplicationGateway operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ApplicationGatewayInner object if successful. */ - public ApplicationGatewayInner beginCreateOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ApplicationGatewayInner beginCreateOrUpdate(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters).toBlocking().single().getBody(); } @@ -520,16 +502,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Res * The List ApplicationGateway operation retrieves all the application gateways in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -630,16 +609,13 @@ private ServiceResponse> listDelegate(Response /** * The List ApplicationGateway operation retrieves all the application gateways in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -735,12 +711,8 @@ private ServiceResponse> listAllDelegate(Respo * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void start(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void start(String resourceGroupName, String applicationGatewayName) { startWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().getBody(); } @@ -801,11 +773,8 @@ public Observable> startWithServiceResponseAsync(String re * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStart(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException { + public void beginStart(String resourceGroupName, String applicationGatewayName) { beginStartWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().getBody(); } @@ -883,12 +852,8 @@ private ServiceResponse beginStartDelegate(Response response * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void stop(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void stop(String resourceGroupName, String applicationGatewayName) { stopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().last().getBody(); } @@ -949,11 +914,8 @@ public Observable> stopWithServiceResponseAsync(String res * * @param resourceGroupName The name of the resource group. * @param applicationGatewayName The name of the application gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginStop(String resourceGroupName, String applicationGatewayName) throws CloudException, IOException, IllegalArgumentException { + public void beginStop(String resourceGroupName, String applicationGatewayName) { beginStopWithServiceResponseAsync(resourceGroupName, applicationGatewayName).toBlocking().single().getBody(); } @@ -1030,16 +992,13 @@ private ServiceResponse beginStopDelegate(Response response) * The List ApplicationGateway operation retrieves all the application gateways in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1136,16 +1095,13 @@ private ServiceResponse> listNextDelegate(Resp * The List ApplicationGateway operation retrieves all the application gateways in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ApplicationGatewayInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java index 3314682ab258..a15094a6a269 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitAuthorizationsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface ExpressRouteCircuitAuthorizationsService { * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String circuitName, String authorizationName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String circuitName, String authorizationName) { deleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String circuitName, String authorizationName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String circuitName, String authorizationName) { beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitAuthorizationInner object if successful. */ - public ExpressRouteCircuitAuthorizationInner get(String resourceGroupName, String circuitName, String authorizationName) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitAuthorizationInner get(String resourceGroupName, String circuitName, String authorizationName) { return getWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName).toBlocking().single().getBody(); } @@ -352,13 +341,9 @@ private ServiceResponse getDelegate(Respo * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. * @param authorizationParameters Parameters supplied to the create/update ExpressRouteCircuitAuthorization operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ExpressRouteCircuitAuthorizationInner object if successful. */ - public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).toBlocking().last().getBody(); } @@ -434,12 +419,9 @@ public Observable> create * @param circuitName The name of the express route circuit. * @param authorizationName The name of the authorization. * @param authorizationParameters Parameters supplied to the create/update ExpressRouteCircuitAuthorization operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitAuthorizationInner object if successful. */ - public ExpressRouteCircuitAuthorizationInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitAuthorizationInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).toBlocking().single().getBody(); } @@ -531,16 +513,13 @@ private ServiceResponse beginCreateOrUpda * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitAuthorizationInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String circuitName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String circuitName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -649,16 +628,13 @@ private ServiceResponse> listDel * The List authorization operation retrieves all the authorizations in an ExpressRouteCircuit. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitAuthorizationInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java index 185f29fe45ca..4ca5a6ef8aad 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitPeeringsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface ExpressRouteCircuitPeeringsService { * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String circuitName, String peeringName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String circuitName, String peeringName) { deleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String circuitName, String peeringName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String circuitName, String peeringName) { beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitPeeringInner object if successful. */ - public ExpressRouteCircuitPeeringInner get(String resourceGroupName, String circuitName, String peeringName) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitPeeringInner get(String resourceGroupName, String circuitName, String peeringName) { return getWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().getBody(); } @@ -352,13 +341,9 @@ private ServiceResponse getDelegate(Response> createOrUpda * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param peeringParameters Parameters supplied to the create/update ExpressRouteCircuit Peering operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitPeeringInner object if successful. */ - public ExpressRouteCircuitPeeringInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitPeeringInner beginCreateOrUpdate(String resourceGroupName, String circuitName, String peeringName, ExpressRouteCircuitPeeringInner peeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, peeringParameters).toBlocking().single().getBody(); } @@ -531,16 +513,13 @@ private ServiceResponse beginCreateOrUpdateDele * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitPeeringInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String circuitName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String circuitName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, circuitName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -649,16 +628,13 @@ private ServiceResponse> listDelegate( * The List peering operation retrieves all the peerings in an ExpressRouteCircuit. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitPeeringInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java index 3019ec44955e..3a913c807e0b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteCircuitsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -138,12 +137,8 @@ interface ExpressRouteCircuitsService { * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route Circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String circuitName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String circuitName) { deleteWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().last().getBody(); } @@ -204,11 +199,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route Circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String circuitName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String circuitName) { beginDeleteWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().getBody(); } @@ -287,12 +279,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitInner object if successful. */ - public ExpressRouteCircuitInner get(String resourceGroupName, String circuitName) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitInner get(String resourceGroupName, String circuitName) { return getWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().getBody(); } @@ -371,13 +360,9 @@ private ServiceResponse getDelegate(Response> createOrUpdateWithS * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. * @param parameters Parameters supplied to the create/delete ExpressRouteCircuit operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitInner object if successful. */ - public ExpressRouteCircuitInner beginCreateOrUpdate(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitInner beginCreateOrUpdate(String resourceGroupName, String circuitName, ExpressRouteCircuitInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, parameters).toBlocking().single().getBody(); } @@ -539,13 +521,9 @@ private ServiceResponse beginCreateOrUpdateDelegate(Re * @param circuitName The name of the circuit. * @param peeringName The name of the peering. * @param devicePath The path of the device. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. */ - public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ExpressRouteCircuitsArpTableListResultInner listArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return listArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().getBody(); } @@ -620,12 +598,9 @@ public Observable> * @param circuitName The name of the circuit. * @param peeringName The name of the peering. * @param devicePath The path of the device. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitsArpTableListResultInner object if successful. */ - public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitsArpTableListResultInner beginListArpTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return beginListArpTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().single().getBody(); } @@ -718,13 +693,9 @@ private ServiceResponse beginListAr * @param circuitName The name of the circuit. * @param peeringName The name of the peering. * @param devicePath The path of the device. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ExpressRouteCircuitsRoutesTableListResultInner object if successful. */ - public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ExpressRouteCircuitsRoutesTableListResultInner listRoutesTable(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return listRoutesTableWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().getBody(); } @@ -799,12 +770,9 @@ public Observable beginLis * @param circuitName The name of the circuit. * @param peeringName The name of the peering. * @param devicePath The path of the device. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ExpressRouteCircuitsRoutesTableSummaryListResultInner object if successful. */ - public ExpressRouteCircuitsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String circuitName, String peeringName, String devicePath) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ExpressRouteCircuitsRoutesTableSummaryListResultInner listRoutesTableSummary(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return listRoutesTableSummaryWithServiceResponseAsync(resourceGroupName, circuitName, peeringName, devicePath).toBlocking().last().getBody(); } @@ -978,12 +942,9 @@ public Observable b * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitStatsInner object if successful. */ - public ExpressRouteCircuitStatsInner getStats(String resourceGroupName, String circuitName) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitStatsInner getStats(String resourceGroupName, String circuitName) { return getStatsWithServiceResponseAsync(resourceGroupName, circuitName).toBlocking().single().getBody(); } @@ -1158,12 +1116,9 @@ private ServiceResponse getStatsDelegate(Response * @param resourceGroupName The name of the resource group. * @param circuitName The name of the circuit. * @param peeringName The name of the peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ExpressRouteCircuitStatsInner object if successful. */ - public ExpressRouteCircuitStatsInner getPeeringStats(String resourceGroupName, String circuitName, String peeringName) throws CloudException, IOException, IllegalArgumentException { + public ExpressRouteCircuitStatsInner getPeeringStats(String resourceGroupName, String circuitName, String peeringName) { return getPeeringStatsWithServiceResponseAsync(resourceGroupName, circuitName, peeringName).toBlocking().single().getBody(); } @@ -1246,16 +1201,13 @@ private ServiceResponse getPeeringStatsDelegate(R * The List ExpressRouteCircuit operation retrieves all the ExpressRouteCircuits in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1356,16 +1308,13 @@ private ServiceResponse> listDelegate(Respons /** * The List ExpressRouteCircuit operation retrieves all the ExpressRouteCircuits in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1460,16 +1409,13 @@ private ServiceResponse> listAllDelegate(Resp * The List ExpressRouteCircuit operation retrieves all the ExpressRouteCircuits in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1566,16 +1512,13 @@ private ServiceResponse> listNextDelegate(Res * The List ExpressRouteCircuit operation retrieves all the ExpressRouteCircuits in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteCircuitInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java index 7891dbb853d4..9ec55ea02bf7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ExpressRouteServiceProvidersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -70,16 +69,13 @@ interface ExpressRouteServiceProvidersService { /** * The List ExpressRouteServiceProvider operation retrieves all the available ExpressRouteServiceProviders. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteServiceProviderInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -174,16 +170,13 @@ private ServiceResponse> listDelegate * The List ExpressRouteServiceProvider operation retrieves all the available ExpressRouteServiceProviders. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ExpressRouteServiceProviderInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java index 3c7ac58f7bb7..17b151070513 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendIPConfigurationInner.java @@ -8,12 +8,13 @@ package com.microsoft.azure.management.network.implementation; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.network.IPAllocationMethod; -import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; +import java.util.List; + /** * Frontend IP address of the load balancer. */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java index 6502f15a306d..379dad1e819b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -105,12 +104,8 @@ interface LoadBalancersService { * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the loadBalancer. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String loadBalancerName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String loadBalancerName) { deleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the loadBalancer. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String loadBalancerName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String loadBalancerName) { beginDeleteWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().getBody(); } @@ -254,12 +246,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the loadBalancer. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the LoadBalancerInner object if successful. */ - public LoadBalancerInner get(String resourceGroupName, String loadBalancerName) throws CloudException, IOException, IllegalArgumentException { + public LoadBalancerInner get(String resourceGroupName, String loadBalancerName) { return getWithServiceResponseAsync(resourceGroupName, loadBalancerName).toBlocking().single().getBody(); } @@ -332,12 +321,9 @@ public Observable> call(Response getDelegate(Response re * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the loadBalancer. * @param parameters Parameters supplied to the create/delete LoadBalancer operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the LoadBalancerInner object if successful. */ - public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().last().getBody(); } @@ -494,12 +476,9 @@ public Observable> createOrUpdateWithServiceR * @param resourceGroupName The name of the resource group. * @param loadBalancerName The name of the loadBalancer. * @param parameters Parameters supplied to the create/delete LoadBalancer operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the LoadBalancerInner object if successful. */ - public LoadBalancerInner beginCreateOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) throws CloudException, IOException, IllegalArgumentException { + public LoadBalancerInner beginCreateOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().single().getBody(); } @@ -583,16 +562,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response< /** * The List loadBalancer operation retrieves all the load balancers in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<LoadBalancerInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -687,16 +663,13 @@ private ServiceResponse> listAllDelegate(Response list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -798,16 +771,13 @@ private ServiceResponse> listDelegate(Response listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -904,16 +874,13 @@ private ServiceResponse> listAllNextDelegate(Respons * The List loadBalancer operation retrieves all the load balancers in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<LoadBalancerInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java index afe6f8c0570b..01316714ecfb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LocalNetworkGatewaysInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,13 +97,9 @@ interface LocalNetworkGatewaysService { * @param resourceGroupName The name of the resource group. * @param localNetworkGatewayName The name of the local network gateway. * @param parameters Parameters supplied to the Begin Create or update Local Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the LocalNetworkGatewayInner object if successful. */ - public LocalNetworkGatewayInner createOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public LocalNetworkGatewayInner createOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).toBlocking().last().getBody(); } @@ -173,12 +168,9 @@ public Observable> createOrUpdateWithS * @param resourceGroupName The name of the resource group. * @param localNetworkGatewayName The name of the local network gateway. * @param parameters Parameters supplied to the Begin Create or update Local Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the LocalNetworkGatewayInner object if successful. */ - public LocalNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException { + public LocalNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String localNetworkGatewayName, LocalNetworkGatewayInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName, parameters).toBlocking().single().getBody(); } @@ -264,12 +256,9 @@ private ServiceResponse beginCreateOrUpdateDelegate(Re * * @param resourceGroupName The name of the resource group. * @param localNetworkGatewayName The name of the local network gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the LocalNetworkGatewayInner object if successful. */ - public LocalNetworkGatewayInner get(String resourceGroupName, String localNetworkGatewayName) throws CloudException, IOException, IllegalArgumentException { + public LocalNetworkGatewayInner get(String resourceGroupName, String localNetworkGatewayName) { return getWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().getBody(); } @@ -347,12 +336,8 @@ private ServiceResponse getDelegate(Response> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param localNetworkGatewayName The name of the local network gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String localNetworkGatewayName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String localNetworkGatewayName) { beginDeleteWithServiceResponseAsync(resourceGroupName, localNetworkGatewayName).toBlocking().single().getBody(); } @@ -495,16 +477,13 @@ private ServiceResponse beginDeleteDelegate(Response respons * The List LocalNetworkGateways operation retrieves all the local network gateways stored. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<LocalNetworkGatewayInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -606,16 +585,13 @@ private ServiceResponse> listDelegate(Respons * The List LocalNetworkGateways operation retrieves all the local network gateways stored. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<LocalNetworkGatewayInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java index e17f787dad1a..6ab2a6ebd577 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceIPConfigurationInner.java @@ -8,12 +8,13 @@ package com.microsoft.azure.management.network.implementation; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.SubResource; import com.microsoft.azure.management.network.IPAllocationMethod; import com.microsoft.azure.management.network.IPVersion; -import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; + +import java.util.List; /** * IPConfiguration in a NetworkInterface. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java index dc7cedfe2591..8f9483316890 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceInner.java @@ -8,12 +8,13 @@ package com.microsoft.azure.management.network.implementation; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Resource; import com.microsoft.azure.SubResource; -import java.util.List; import com.microsoft.azure.management.network.NetworkInterfaceDnsSettings; -import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.Resource; + +import java.util.List; /** * A NetworkInterface in a resource group. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java index 9e8077df408a..9c85af68efed 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -142,12 +141,8 @@ interface NetworkInterfacesService { * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String networkInterfaceName) { deleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().getBody(); } @@ -208,11 +203,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String networkInterfaceName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().getBody(); } @@ -291,12 +283,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkInterfaceInner object if successful. */ - public NetworkInterfaceInner get(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException { + public NetworkInterfaceInner get(String resourceGroupName, String networkInterfaceName) { return getWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().getBody(); } @@ -369,12 +358,9 @@ public Observable> call(Response getDelegate(Response> createOrUpdateWithServ * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. * @param parameters Parameters supplied to the create/update NetworkInterface operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkInterfaceInner object if successful. */ - public NetworkInterfaceInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) throws CloudException, IOException, IllegalArgumentException { + public NetworkInterfaceInner beginCreateOrUpdate(String resourceGroupName, String networkInterfaceName, NetworkInterfaceInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkInterfaceName, parameters).toBlocking().single().getBody(); } @@ -623,16 +602,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respo * @param resourceGroupName The name of the resource group. * @param virtualMachineScaleSetName The name of the virtual machine scale set. * @param virtualmachineIndex The virtual machine index. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetVMNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) throws CloudException, IOException, IllegalArgumentException { + public PagedList listVirtualMachineScaleSetVMNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName, final String virtualmachineIndex) { ServiceResponse> response = listVirtualMachineScaleSetVMNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -749,16 +725,13 @@ private ServiceResponse> listVirtualMachineScale * * @param resourceGroupName The name of the resource group. * @param virtualMachineScaleSetName The name of the virtual machine scale set. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listVirtualMachineScaleSetNetworkInterfaces(final String resourceGroupName, final String virtualMachineScaleSetName) { ServiceResponse> response = listVirtualMachineScaleSetNetworkInterfacesSinglePageAsync(resourceGroupName, virtualMachineScaleSetName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -870,12 +843,9 @@ private ServiceResponse> listVirtualMachineScale * @param virtualMachineScaleSetName The name of the virtual machine scale set. * @param virtualmachineIndex The virtual machine index. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkInterfaceInner object if successful. */ - public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException { + public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName) { return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName).toBlocking().single().getBody(); } @@ -962,12 +932,9 @@ public Observable> call(Response getVirtualMachineScaleSetNetworkI /** * The List networkInterfaces operation retrieves all the networkInterfaces in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1162,16 +1126,13 @@ private ServiceResponse> listAllDelegate(Respons * The List networkInterfaces operation retrieves all the networkInterfaces in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1274,13 +1235,9 @@ private ServiceResponse> listDelegate(Response> getEffectiveRo * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the EffectiveRouteListResultInner object if successful. */ - public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException { + public EffectiveRouteListResultInner beginGetEffectiveRouteTable(String resourceGroupName, String networkInterfaceName) { return beginGetEffectiveRouteTableWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().getBody(); } @@ -1425,13 +1379,9 @@ private ServiceResponse beginGetEffectiveRouteTab * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. */ - public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public EffectiveNetworkSecurityGroupListResultInner listEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { return listEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().last().getBody(); } @@ -1492,12 +1442,9 @@ public Observable> * * @param resourceGroupName The name of the resource group. * @param networkInterfaceName The name of the network interface. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the EffectiveNetworkSecurityGroupListResultInner object if successful. */ - public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) throws CloudException, IOException, IllegalArgumentException { + public EffectiveNetworkSecurityGroupListResultInner beginListEffectiveNetworkSecurityGroups(String resourceGroupName, String networkInterfaceName) { return beginListEffectiveNetworkSecurityGroupsWithServiceResponseAsync(resourceGroupName, networkInterfaceName).toBlocking().single().getBody(); } @@ -1575,16 +1522,13 @@ private ServiceResponse beginListE * The list network interface operation retrieves information about all network interfaces in a virtual machine from a virtual machine scale set. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetVMNetworkInterfacesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listVirtualMachineScaleSetVMNetworkInterfacesNext(final String nextPageLink) { ServiceResponse> response = listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listVirtualMachineScaleSetVMNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1681,16 +1625,13 @@ private ServiceResponse> listVirtualMachineScale * The list network interface operation retrieves information about all network interfaces in a virtual machine scale set. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listVirtualMachineScaleSetNetworkInterfacesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listVirtualMachineScaleSetNetworkInterfacesNext(final String nextPageLink) { ServiceResponse> response = listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listVirtualMachineScaleSetNetworkInterfacesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1787,16 +1728,13 @@ private ServiceResponse> listVirtualMachineScale * The List networkInterfaces operation retrieves all the networkInterfaces in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1893,16 +1831,13 @@ private ServiceResponse> listAllNextDelegate(Res * The List networkInterfaces operation retrieves all the networkInterfaces in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkInterfaceInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java index 62ca97b891b5..bf3f064bddb8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkManagementClientImpl.java @@ -488,12 +488,9 @@ interface NetworkManagementClientService { * Checks whether a domain name in the cloudapp.net zone is available for use. * * @param location The location of the domain name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DnsNameAvailabilityResultInner object if successful. */ - public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location) throws CloudException, IOException, IllegalArgumentException { + public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location) { return checkDnsNameAvailabilityWithServiceResponseAsync(location).toBlocking().single().getBody(); } @@ -559,12 +556,9 @@ public Observable> call(Response * * @param location The location of the domain name * @param domainNameLabel The domain name to be verified. It must conform to the following regular expression: ^[a-z][a-z0-9-]{1,61}[a-z0-9]$. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DnsNameAvailabilityResultInner object if successful. */ - public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, String domainNameLabel) throws CloudException, IOException, IllegalArgumentException { + public DnsNameAvailabilityResultInner checkDnsNameAvailability(String location, String domainNameLabel) { return checkDnsNameAvailabilityWithServiceResponseAsync(location, domainNameLabel).toBlocking().single().getBody(); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java index 4280a092e30a..403bdfe1ab71 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -105,12 +104,8 @@ interface NetworkSecurityGroupsService { * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String networkSecurityGroupName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String networkSecurityGroupName) { deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String networkSecurityGroupName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String networkSecurityGroupName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().getBody(); } @@ -254,12 +246,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkSecurityGroupInner object if successful. */ - public NetworkSecurityGroupInner get(String resourceGroupName, String networkSecurityGroupName) throws CloudException, IOException, IllegalArgumentException { + public NetworkSecurityGroupInner get(String resourceGroupName, String networkSecurityGroupName) { return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single().getBody(); } @@ -332,12 +321,9 @@ public Observable> call(Response getDelegate(Response> createOrUpdateWith * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param parameters Parameters supplied to the create/update Network Security Group operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkSecurityGroupInner object if successful. */ - public NetworkSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) throws CloudException, IOException, IllegalArgumentException { + public NetworkSecurityGroupInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, NetworkSecurityGroupInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, parameters).toBlocking().single().getBody(); } @@ -583,16 +562,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(R /** * The list NetworkSecurityGroups returns all network security groups in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkSecurityGroupInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -687,16 +663,13 @@ private ServiceResponse> listAllDelegate(Res * The list NetworkSecurityGroups returns all network security groups in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkSecurityGroupInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -798,16 +771,13 @@ private ServiceResponse> listDelegate(Respon * The list NetworkSecurityGroups returns all network security groups in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkSecurityGroupInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -904,16 +874,13 @@ private ServiceResponse> listAllNextDelegate * The list NetworkSecurityGroups returns all network security groups in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NetworkSecurityGroupInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java index 62be22e6e6de..9a0a7f915d46 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIPAddressesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -105,12 +104,8 @@ interface PublicIPAddressesService { * * @param resourceGroupName The name of the resource group. * @param publicIpAddressName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String publicIpAddressName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String publicIpAddressName) { deleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param publicIpAddressName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String publicIpAddressName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String publicIpAddressName) { beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().getBody(); } @@ -254,12 +246,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param publicIpAddressName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PublicIPAddressInner object if successful. */ - public PublicIPAddressInner get(String resourceGroupName, String publicIpAddressName) throws CloudException, IOException, IllegalArgumentException { + public PublicIPAddressInner get(String resourceGroupName, String publicIpAddressName) { return getWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().getBody(); } @@ -332,12 +321,9 @@ public Observable> call(Response getDelegate(Response * @param resourceGroupName The name of the resource group. * @param publicIpAddressName The name of the publicIpAddress. * @param parameters Parameters supplied to the create/update PublicIPAddress operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the PublicIPAddressInner object if successful. */ - public PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public PublicIPAddressInner createOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).toBlocking().last().getBody(); } @@ -494,12 +476,9 @@ public Observable> createOrUpdateWithServi * @param resourceGroupName The name of the resource group. * @param publicIpAddressName The name of the publicIpAddress. * @param parameters Parameters supplied to the create/update PublicIPAddress operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PublicIPAddressInner object if successful. */ - public PublicIPAddressInner beginCreateOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) throws CloudException, IOException, IllegalArgumentException { + public PublicIPAddressInner beginCreateOrUpdate(String resourceGroupName, String publicIpAddressName, PublicIPAddressInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, publicIpAddressName, parameters).toBlocking().single().getBody(); } @@ -583,16 +562,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respon /** * The List publicIpAddress operation retrieves all the publicIpAddresses in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<PublicIPAddressInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -687,16 +663,13 @@ private ServiceResponse> listAllDelegate(Response * The List publicIpAddress operation retrieves all the publicIpAddresses in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<PublicIPAddressInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -798,16 +771,13 @@ private ServiceResponse> listDelegate(Response listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -904,16 +874,13 @@ private ServiceResponse> listAllNextDelegate(Resp * The List publicIpAddress operation retrieves all the publicIpAddresses in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<PublicIPAddressInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java index 42ea56a7090a..16e2dca8733b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RouteTablesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -105,12 +104,8 @@ interface RouteTablesService { * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String routeTableName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String routeTableName) { deleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String routeTableName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String routeTableName) { beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().getBody(); } @@ -254,12 +246,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RouteTableInner object if successful. */ - public RouteTableInner get(String resourceGroupName, String routeTableName) throws CloudException, IOException, IllegalArgumentException { + public RouteTableInner get(String resourceGroupName, String routeTableName) { return getWithServiceResponseAsync(resourceGroupName, routeTableName).toBlocking().single().getBody(); } @@ -332,12 +321,9 @@ public Observable> call(Response * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param expand expand references resources. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RouteTableInner object if successful. */ - public RouteTableInner get(String resourceGroupName, String routeTableName, String expand) throws CloudException, IOException, IllegalArgumentException { + public RouteTableInner get(String resourceGroupName, String routeTableName, String expand) { return getWithServiceResponseAsync(resourceGroupName, routeTableName, expand).toBlocking().single().getBody(); } @@ -419,13 +405,9 @@ private ServiceResponse getDelegate(Response resp * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param parameters Parameters supplied to the create/update Route Table operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the RouteTableInner object if successful. */ - public RouteTableInner createOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public RouteTableInner createOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().last().getBody(); } @@ -494,12 +476,9 @@ public Observable> createOrUpdateWithServiceRes * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param parameters Parameters supplied to the create/update Route Table operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RouteTableInner object if successful. */ - public RouteTableInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) throws CloudException, IOException, IllegalArgumentException { + public RouteTableInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, RouteTableInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, parameters).toBlocking().single().getBody(); } @@ -584,16 +563,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -694,16 +670,13 @@ private ServiceResponse> listDelegate(Response listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -798,16 +771,13 @@ private ServiceResponse> listAllDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -904,16 +874,13 @@ private ServiceResponse> listNextDelegate(Response listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java index b01e15aa293d..e0c87908f24e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/RoutesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface RoutesService { * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param routeName The name of the route. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String routeTableName, String routeName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String routeTableName, String routeName) { deleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param routeName The name of the route. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String routeTableName, String routeName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String routeTableName, String routeName) { beginDeleteWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param routeTableName The name of the route table. * @param routeName The name of the route. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RouteInner object if successful. */ - public RouteInner get(String resourceGroupName, String routeTableName, String routeName) throws CloudException, IOException, IllegalArgumentException { + public RouteInner get(String resourceGroupName, String routeTableName, String routeName) { return getWithServiceResponseAsync(resourceGroupName, routeTableName, routeName).toBlocking().single().getBody(); } @@ -352,13 +341,9 @@ private ServiceResponse getDelegate(Response response) * @param routeTableName The name of the route table. * @param routeName The name of the route. * @param routeParameters Parameters supplied to the create/update route operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the RouteInner object if successful. */ - public RouteInner createOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public RouteInner createOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).toBlocking().last().getBody(); } @@ -434,12 +419,9 @@ public Observable> createOrUpdateWithServiceResponse * @param routeTableName The name of the route table. * @param routeName The name of the route. * @param routeParameters Parameters supplied to the create/update route operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RouteInner object if successful. */ - public RouteInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) throws CloudException, IOException, IllegalArgumentException { + public RouteInner beginCreateOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).toBlocking().single().getBody(); } @@ -531,16 +513,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response list(final String resourceGroupName, final String routeTableName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String routeTableName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, routeTableName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -649,16 +628,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java index df8a4050396a..40312ea096e7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SecurityRulesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface SecurityRulesService { * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param securityRuleName The name of the security rule. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { deleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param securityRuleName The name of the security rule. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { beginDeleteWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. * @param securityRuleName The name of the security rule. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SecurityRuleInner object if successful. */ - public SecurityRuleInner get(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) throws CloudException, IOException, IllegalArgumentException { + public SecurityRuleInner get(String resourceGroupName, String networkSecurityGroupName, String securityRuleName) { return getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName).toBlocking().single().getBody(); } @@ -352,13 +341,9 @@ private ServiceResponse getDelegate(Response re * @param networkSecurityGroupName The name of the network security group. * @param securityRuleName The name of the security rule. * @param securityRuleParameters Parameters supplied to the create/update network security rule operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SecurityRuleInner object if successful. */ - public SecurityRuleInner createOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SecurityRuleInner createOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).toBlocking().last().getBody(); } @@ -434,12 +419,9 @@ public Observable> createOrUpdateWithServiceR * @param networkSecurityGroupName The name of the network security group. * @param securityRuleName The name of the security rule. * @param securityRuleParameters Parameters supplied to the create/update network security rule operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SecurityRuleInner object if successful. */ - public SecurityRuleInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) throws CloudException, IOException, IllegalArgumentException { + public SecurityRuleInner beginCreateOrUpdate(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, SecurityRuleInner securityRuleParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName, securityRuleParameters).toBlocking().single().getBody(); } @@ -531,16 +513,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response< * * @param resourceGroupName The name of the resource group. * @param networkSecurityGroupName The name of the network security group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SecurityRuleInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String networkSecurityGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String networkSecurityGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, networkSecurityGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -649,16 +628,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java index fa90a39596b4..0a7b87da6418 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetInner.java @@ -8,10 +8,11 @@ package com.microsoft.azure.management.network.implementation; -import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; -import com.microsoft.rest.serializer.JsonFlatten; import com.microsoft.azure.SubResource; +import com.microsoft.rest.serializer.JsonFlatten; + +import java.util.List; /** * Subnet in a VirtualNework resource. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java index 9201f3b6bb85..6a42a897d3f4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface SubnetsService { * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String virtualNetworkName, String subnetName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String virtualNetworkName, String subnetName) { deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String virtualNetworkName, String subnetName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String virtualNetworkName, String subnetName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SubnetInner object if successful. */ - public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName) throws CloudException, IOException, IllegalArgumentException { + public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName).toBlocking().single().getBody(); } @@ -346,12 +335,9 @@ public Observable> call(Response resp * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param expand expand references resources. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SubnetInner object if successful. */ - public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName, String expand) throws CloudException, IOException, IllegalArgumentException { + public SubnetInner get(String resourceGroupName, String virtualNetworkName, String subnetName, String expand) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, expand).toBlocking().single().getBody(); } @@ -440,13 +426,9 @@ private ServiceResponse getDelegate(Response response * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param subnetParameters Parameters supplied to the create/update Subnet operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SubnetInner object if successful. */ - public SubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SubnetInner createOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).toBlocking().last().getBody(); } @@ -522,12 +504,9 @@ public Observable> createOrUpdateWithServiceRespons * @param virtualNetworkName The name of the virtual network. * @param subnetName The name of the subnet. * @param subnetParameters Parameters supplied to the create/update Subnet operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SubnetInner object if successful. */ - public SubnetInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) throws CloudException, IOException, IllegalArgumentException { + public SubnetInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String subnetName, SubnetInner subnetParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, subnetName, subnetParameters).toBlocking().single().getBody(); } @@ -619,16 +598,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response list(final String resourceGroupName, final String virtualNetworkName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String virtualNetworkName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -737,16 +713,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java index 47531e7fc6db..66bbf13f953d 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/UsagesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -71,16 +70,13 @@ interface UsagesService { * Lists compute usages for a subscription. * * @param location The location upon which resource usage is queried. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList list(final String location) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String location) { ServiceResponse> response = listSinglePageAsync(location).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -182,16 +178,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java index 939777b93fc6..b40ee946f6c7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewayConnectionsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -119,13 +118,9 @@ interface VirtualNetworkGatewayConnectionsService { * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @param parameters Parameters supplied to the Begin Create or update Virtual Network Gateway connection operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualNetworkGatewayConnectionInner object if successful. */ - public VirtualNetworkGatewayConnectionInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualNetworkGatewayConnectionInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().last().getBody(); } @@ -194,12 +189,9 @@ public Observable> createO * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @param parameters Parameters supplied to the Begin Create or update Virtual Network Gateway connection operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkGatewayConnectionInner object if successful. */ - public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkGatewayConnectionInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayConnectionName, VirtualNetworkGatewayConnectionInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, parameters).toBlocking().single().getBody(); } @@ -285,12 +277,9 @@ private ServiceResponse beginCreateOrUpdat * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkGatewayConnectionInner object if successful. */ - public VirtualNetworkGatewayConnectionInner get(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkGatewayConnectionInner get(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().getBody(); } @@ -368,12 +357,8 @@ private ServiceResponse getDelegate(Respon * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String virtualNetworkGatewayConnectionName) { deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().getBody(); } @@ -434,11 +419,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String virtualNetworkGatewayConnectionName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().getBody(); } @@ -517,12 +499,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param connectionSharedKeyName The virtual network gateway connection shared key name. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionSharedKeyResultInner object if successful. */ - public ConnectionSharedKeyResultInner getSharedKey(String resourceGroupName, String connectionSharedKeyName) throws CloudException, IOException, IllegalArgumentException { + public ConnectionSharedKeyResultInner getSharedKey(String resourceGroupName, String connectionSharedKeyName) { return getSharedKeyWithServiceResponseAsync(resourceGroupName, connectionSharedKeyName).toBlocking().single().getBody(); } @@ -599,16 +578,13 @@ private ServiceResponse getSharedKeyDelegate(Res * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkGatewayConnectionInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -711,13 +687,9 @@ private ServiceResponse> listDele * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ConnectionResetSharedKeyInner object if successful. */ - public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().getBody(); } @@ -781,13 +753,9 @@ public Observable> resetSharedKey * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. * @param keyLength The virtual network connection reset shared key length - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ConnectionResetSharedKeyInner object if successful. */ - public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, Long keyLength) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ConnectionResetSharedKeyInner resetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, Long keyLength) { return resetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().last().getBody(); } @@ -853,12 +821,9 @@ public Observable> resetSharedKey * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionResetSharedKeyInner object if successful. */ - public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException { + public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().getBody(); } @@ -933,12 +898,9 @@ public Observable> call(Response< * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection reset shared key Name. * @param keyLength The virtual network connection reset shared key length - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionResetSharedKeyInner object if successful. */ - public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, Long keyLength) throws CloudException, IOException, IllegalArgumentException { + public ConnectionResetSharedKeyInner beginResetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, Long keyLength) { return beginResetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, keyLength).toBlocking().single().getBody(); } @@ -1022,13 +984,9 @@ private ServiceResponse beginResetSharedKeyDelega * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ConnectionSharedKeyInner object if successful. */ - public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().last().getBody(); } @@ -1092,13 +1050,9 @@ public Observable> setSharedKeyWithSer * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. * @param value The virtual network connection shared key value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ConnectionSharedKeyInner object if successful. */ - public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ConnectionSharedKeyInner setSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName, String value) { return setSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName, value).toBlocking().last().getBody(); } @@ -1164,12 +1118,9 @@ public Observable> setSharedKeyWithSer * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The virtual network gateway connection name. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionSharedKeyInner object if successful. */ - public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) throws CloudException, IOException, IllegalArgumentException { + public ConnectionSharedKeyInner beginSetSharedKey(String resourceGroupName, String virtualNetworkGatewayConnectionName) { return beginSetSharedKeyWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayConnectionName).toBlocking().single().getBody(); } @@ -1244,12 +1195,9 @@ public Observable> call(Response beginSetSharedKeyDelegate(Resp * The List VirtualNetworkGatewayConnections operation retrieves all the virtual network gateways connections created. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkGatewayConnectionInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java index eefb70202de6..d082e3ddeacb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkGatewaysInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.network.VpnClientParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -113,13 +112,9 @@ interface VirtualNetworkGatewaysService { * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the Begin Create or update Virtual Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualNetworkGatewayInner createOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().getBody(); } @@ -188,12 +183,9 @@ public Observable> createOrUpdateWit * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the Begin Create or update Virtual Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkGatewayInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().getBody(); } @@ -279,12 +271,9 @@ private ServiceResponse beginCreateOrUpdateDelegate( * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner get(String resourceGroupName, String virtualNetworkGatewayName) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkGatewayInner get(String resourceGroupName, String virtualNetworkGatewayName) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().getBody(); } @@ -362,12 +351,8 @@ private ServiceResponse getDelegate(Response> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String virtualNetworkGatewayName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String virtualNetworkGatewayName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().getBody(); } @@ -510,16 +492,13 @@ private ServiceResponse beginDeleteDelegate(Response respons * The List VirtualNetworkGateways operation retrieves all the virtual network gateways stored. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkGatewayInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -623,13 +602,9 @@ private ServiceResponse> listDelegate(Respo * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the Begin Reset Virtual Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualNetworkGatewayInner reset(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { return resetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().last().getBody(); } @@ -698,12 +673,9 @@ public Observable> resetWithServiceR * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param parameters Parameters supplied to the Begin Reset Virtual Network Gateway operation through Network resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkGatewayInner object if successful. */ - public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkGatewayInner beginReset(String resourceGroupName, String virtualNetworkGatewayName, VirtualNetworkGatewayInner parameters) { return beginResetWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, parameters).toBlocking().single().getBody(); } @@ -789,12 +761,9 @@ private ServiceResponse beginResetDelegate(Response< * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the String object if successful. */ - public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName) throws CloudException, IOException, IllegalArgumentException { + public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName).toBlocking().single().getBody(); } @@ -869,12 +838,9 @@ public Observable> call(Response response) * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayName The name of the virtual network gateway. * @param processorArchitecture VPN client Processor Architecture -Amd64/X86. Possible values include: 'Amd64', 'X86' - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the String object if successful. */ - public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, ProcessorArchitecture processorArchitecture) throws CloudException, IOException, IllegalArgumentException { + public String generatevpnclientpackage(String resourceGroupName, String virtualNetworkGatewayName, ProcessorArchitecture processorArchitecture) { return generatevpnclientpackageWithServiceResponseAsync(resourceGroupName, virtualNetworkGatewayName, processorArchitecture).toBlocking().single().getBody(); } @@ -956,16 +922,13 @@ private ServiceResponse generatevpnclientpackageDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java index fc5f01c86e0a..b68559fb5041 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworkPeeringsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -98,12 +97,8 @@ interface VirtualNetworkPeeringsService { * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param virtualNetworkPeeringName The name of the virtual network peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().last().getBody(); } @@ -171,11 +166,8 @@ public Observable> deleteWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param virtualNetworkPeeringName The name of the virtual network peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().single().getBody(); } @@ -261,12 +253,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param virtualNetworkPeeringName The name of the virtual network peering. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkPeeringInner object if successful. */ - public VirtualNetworkPeeringInner get(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkPeeringInner get(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName).toBlocking().single().getBody(); } @@ -352,13 +341,9 @@ private ServiceResponse getDelegate(Response> createOrUpdateWit * @param virtualNetworkName The name of the virtual network. * @param virtualNetworkPeeringName The name of the peering. * @param virtualNetworkPeeringParameters Parameters supplied to the create/update virtual network peering operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkPeeringInner object if successful. */ - public VirtualNetworkPeeringInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkPeeringInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, String virtualNetworkPeeringName, VirtualNetworkPeeringInner virtualNetworkPeeringParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, virtualNetworkPeeringParameters).toBlocking().single().getBody(); } @@ -531,16 +513,13 @@ private ServiceResponse beginCreateOrUpdateDelegate( * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkPeeringInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String virtualNetworkName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String virtualNetworkName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, virtualNetworkName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -649,16 +628,13 @@ private ServiceResponse> listDelegate(Respo * The List virtual network peerings operation retrieves all the peerings in a virtual network. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkPeeringInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java index 3c61a7a70813..2d037a0ae6e4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/VirtualNetworksInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -109,12 +108,8 @@ interface VirtualNetworksService { * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String virtualNetworkName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String virtualNetworkName) { deleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().last().getBody(); } @@ -175,11 +170,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String virtualNetworkName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String virtualNetworkName) { beginDeleteWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().getBody(); } @@ -258,12 +250,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkInner object if successful. */ - public VirtualNetworkInner get(String resourceGroupName, String virtualNetworkName) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkInner get(String resourceGroupName, String virtualNetworkName) { return getWithServiceResponseAsync(resourceGroupName, virtualNetworkName).toBlocking().single().getBody(); } @@ -336,12 +325,9 @@ public Observable> call(Response getDelegate(Response * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param parameters Parameters supplied to the create/update Virtual Network operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the VirtualNetworkInner object if successful. */ - public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public VirtualNetworkInner createOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().last().getBody(); } @@ -498,12 +480,9 @@ public Observable> createOrUpdateWithServic * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param parameters Parameters supplied to the create/update Virtual Network operation - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualNetworkInner object if successful. */ - public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) throws CloudException, IOException, IllegalArgumentException { + public VirtualNetworkInner beginCreateOrUpdate(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters).toBlocking().single().getBody(); } @@ -587,16 +566,13 @@ private ServiceResponse beginCreateOrUpdateDelegate(Respons /** * The list VirtualNetwork returns all Virtual Networks in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -691,16 +667,13 @@ private ServiceResponse> listAllDelegate(Response< * The list VirtualNetwork returns all Virtual Networks in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -803,12 +776,9 @@ private ServiceResponse> listDelegate(Response> call(Respon * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param ipAddress The private IP address to be verified. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the IPAddressAvailabilityResultInner object if successful. */ - public IPAddressAvailabilityResultInner checkIPAddressAvailability(String resourceGroupName, String virtualNetworkName, String ipAddress) throws CloudException, IOException, IllegalArgumentException { + public IPAddressAvailabilityResultInner checkIPAddressAvailability(String resourceGroupName, String virtualNetworkName, String ipAddress) { return checkIPAddressAvailabilityWithServiceResponseAsync(resourceGroupName, virtualNetworkName, ipAddress).toBlocking().single().getBody(); } @@ -966,16 +933,13 @@ private ServiceResponse checkIPAddressAvailabi * The list VirtualNetwork returns all Virtual Networks in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkInner> object if successful. */ - public PagedList listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1072,16 +1036,13 @@ private ServiceResponse> listAllNextDelegate(Respo * The list VirtualNetwork returns all Virtual Networks in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<VirtualNetworkInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/SkuFamily.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/SkuFamily.java index 0c37984ddee5..4027ed51be40 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/SkuFamily.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/SkuFamily.java @@ -56,4 +56,4 @@ public boolean equals(Object obj) { return value.equals(rhs.value); } } -} \ No newline at end of file +} diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java index 8f30dc7df61b..a9c2ee749926 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/PatchSchedulesInner.java @@ -78,12 +78,9 @@ interface PatchSchedulesService { * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param scheduleEntries List of patch schedules for redis cache. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RedisPatchSchedulesResponseInner object if successful. */ - public RedisPatchSchedulesResponseInner createOrUpdate(String resourceGroupName, String name, List scheduleEntries) throws CloudException, IOException, IllegalArgumentException { + public RedisPatchSchedulesResponseInner createOrUpdate(String resourceGroupName, String name, List scheduleEntries) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, scheduleEntries).toBlocking().single().getBody(); } @@ -170,11 +167,8 @@ private ServiceResponse createOrUpdateDelegate * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public void delete(String resourceGroupName, String name) { deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -251,12 +245,9 @@ private ServiceResponse deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RedisPatchSchedulesResponseInner object if successful. */ - public RedisPatchSchedulesResponseInner get(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public RedisPatchSchedulesResponseInner get(String resourceGroupName, String name) { return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } diff --git a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java index 2582e709acfc..e55d69c5f485 100644 --- a/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java +++ b/azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java @@ -18,7 +18,6 @@ import com.microsoft.azure.management.redis.RedisRegenerateKeyParameters; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -129,12 +128,9 @@ interface RedisService { * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Parameters supplied to the CreateOrUpdate redis operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RedisResourceWithAccessKeyInner object if successful. */ - public RedisResourceWithAccessKeyInner createOrUpdate(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public RedisResourceWithAccessKeyInner createOrUpdate(String resourceGroupName, String name, RedisCreateOrUpdateParametersInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -220,11 +216,8 @@ private ServiceResponse createOrUpdateDelegate( * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public void delete(String resourceGroupName, String name) { deleteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -302,12 +295,9 @@ private ServiceResponse deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RedisResourceInner object if successful. */ - public RedisResourceInner get(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public RedisResourceInner get(String resourceGroupName, String name) { return getWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -384,16 +374,13 @@ private ServiceResponse getDelegate(Response r * Gets all redis caches in a resource group. * * @param resourceGroupName The name of the resource group. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<RedisResourceInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroup(final String resourceGroupName) { ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -494,16 +481,13 @@ private ServiceResponse> listByResourceGroupDelegat /** * Gets all redis caches in the specified subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<RedisResourceInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -599,12 +583,9 @@ private ServiceResponse> listDelegate(Response listKeysDelegate(Response regenerateKeyDelegate(Response * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Specifies which redis node(s) to reboot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void forceReboot(String resourceGroupName, String name, RedisRebootParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public void forceReboot(String resourceGroupName, String name, RedisRebootParametersInner parameters) { forceRebootWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -865,12 +840,8 @@ private ServiceResponse forceRebootDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Parameters for redis import operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void importMethod(String resourceGroupName, String name, ImportRDBParametersInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void importMethod(String resourceGroupName, String name, ImportRDBParametersInner parameters) { importMethodWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } @@ -939,11 +910,8 @@ public Observable> importMethodWithServiceResponseAsync(St * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Parameters for redis import operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginImport(String resourceGroupName, String name, ImportRDBParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public void beginImport(String resourceGroupName, String name, ImportRDBParametersInner parameters) { beginImportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -1028,12 +996,8 @@ private ServiceResponse beginImportDelegate(Response respons * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Parameters for redis export operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void export(String resourceGroupName, String name, ExportRDBParametersInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void export(String resourceGroupName, String name, ExportRDBParametersInner parameters) { exportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().last().getBody(); } @@ -1102,11 +1066,8 @@ public Observable> exportWithServiceResponseAsync(String r * @param resourceGroupName The name of the resource group. * @param name The name of the redis cache. * @param parameters Parameters for redis export operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginExport(String resourceGroupName, String name, ExportRDBParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public void beginExport(String resourceGroupName, String name, ExportRDBParametersInner parameters) { beginExportWithServiceResponseAsync(resourceGroupName, name, parameters).toBlocking().single().getBody(); } @@ -1189,16 +1150,13 @@ private ServiceResponse beginExportDelegate(Response respons * Gets all redis caches in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<RedisResourceInner> object if successful. */ - public PagedList listByResourceGroupNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listByResourceGroupNext(final String nextPageLink) { ServiceResponse> response = listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listByResourceGroupNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1295,16 +1253,13 @@ private ServiceResponse> listByResourceGroupNextDel * Gets all redis caches in the specified subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<RedisResourceInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsInner.java index e19d40052394..7db21a2484cd 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -78,12 +77,9 @@ interface DeploymentOperationsService { * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. * @param operationId Operation Id. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentOperationInner object if successful. */ - public DeploymentOperationInner get(String resourceGroupName, String deploymentName, String operationId) throws CloudException, IOException, IllegalArgumentException { + public DeploymentOperationInner get(String resourceGroupName, String deploymentName, String operationId) { return getWithServiceResponseAsync(resourceGroupName, deploymentName, operationId).toBlocking().single().getBody(); } @@ -167,16 +163,13 @@ private ServiceResponse getDelegate(Response list(final String resourceGroupName, final String deploymentName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String deploymentName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, deploymentName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -281,16 +274,13 @@ public Observable>> call(Response * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. * @param top Query parameters. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentOperationInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String deploymentName, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String deploymentName, final Integer top) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, deploymentName, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -403,16 +393,13 @@ private ServiceResponse> listDelegate(Respons * Gets a list of deployments operations. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentOperationInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsInner.java index e2e5578be901..123f7ba6b5a6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsInner.java @@ -8,7 +8,6 @@ package com.microsoft.azure.management.resources.implementation; -import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceCall; import com.microsoft.azure.AzureServiceResponseBuilder; @@ -16,27 +15,28 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.Validator; -import java.io.IOException; -import java.util.List; import okhttp3.ResponseBody; +import retrofit2.Response; +import retrofit2.Retrofit; import retrofit2.http.Body; import retrofit2.http.GET; import retrofit2.http.HEAD; +import retrofit2.http.HTTP; import retrofit2.http.Header; import retrofit2.http.Headers; -import retrofit2.http.HTTP; -import retrofit2.http.Path; import retrofit2.http.POST; import retrofit2.http.PUT; +import retrofit2.http.Path; import retrofit2.http.Query; -import retrofit2.Response; -import rx.functions.Func1; import rx.Observable; +import rx.functions.Func1; + +import java.io.IOException; +import java.util.List; /** * An instance of this class provides access to all the operations defined @@ -115,12 +115,8 @@ interface DeploymentsService { * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment to be deleted. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void delete(String resourceGroupName, String deploymentName) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void delete(String resourceGroupName, String deploymentName) { deleteWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().last().getBody(); } @@ -181,11 +177,8 @@ public Observable> deleteWithServiceResponseAsync(String r * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment to be deleted. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName, String deploymentName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName, String deploymentName) { beginDeleteWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().single().getBody(); } @@ -263,12 +256,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * * @param resourceGroupName The name of the resource group to check. The name is case insensitive. * @param deploymentName The name of the deployment. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the boolean object if successful. */ - public boolean checkExistence(String resourceGroupName, String deploymentName) throws CloudException, IOException, IllegalArgumentException { + public boolean checkExistence(String resourceGroupName, String deploymentName) { return checkExistenceWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().single().getBody(); } @@ -348,13 +338,9 @@ private ServiceResponse checkExistenceDelegate(Response response) * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. * @param parameters Additional parameters supplied to the operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the DeploymentExtendedInner object if successful. */ - public DeploymentExtendedInner createOrUpdate(String resourceGroupName, String deploymentName, DeploymentInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public DeploymentExtendedInner createOrUpdate(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).toBlocking().last().getBody(); } @@ -423,12 +409,9 @@ public Observable> createOrUpdateWithSe * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. * @param parameters Additional parameters supplied to the operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentExtendedInner object if successful. */ - public DeploymentExtendedInner beginCreateOrUpdate(String resourceGroupName, String deploymentName, DeploymentInner parameters) throws CloudException, IOException, IllegalArgumentException { + public DeploymentExtendedInner beginCreateOrUpdate(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).toBlocking().single().getBody(); } @@ -514,12 +497,9 @@ private ServiceResponse beginCreateOrUpdateDelegate(Res * * @param resourceGroupName The name of the resource group to get. The name is case insensitive. * @param deploymentName The name of the deployment. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentExtendedInner object if successful. */ - public DeploymentExtendedInner get(String resourceGroupName, String deploymentName) throws CloudException, IOException, IllegalArgumentException { + public DeploymentExtendedInner get(String resourceGroupName, String deploymentName) { return getWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().single().getBody(); } @@ -597,11 +577,8 @@ private ServiceResponse getDelegate(Response cancelDelegate(Response response) th * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. * @param parameters Deployment to validate. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentValidateResultInner object if successful. */ - public DeploymentValidateResultInner validate(String resourceGroupName, String deploymentName, DeploymentInner parameters) throws CloudException, IOException, IllegalArgumentException { + public DeploymentValidateResultInner validate(String resourceGroupName, String deploymentName, DeploymentInner parameters) { return validateWithServiceResponseAsync(resourceGroupName, deploymentName, parameters).toBlocking().single().getBody(); } @@ -770,12 +744,9 @@ private ServiceResponse validateDelegate(Response * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param deploymentName The name of the deployment. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentExportResultInner object if successful. */ - public DeploymentExportResultInner exportTemplate(String resourceGroupName, String deploymentName) throws CloudException, IOException, IllegalArgumentException { + public DeploymentExportResultInner exportTemplate(String resourceGroupName, String deploymentName) { return exportTemplateWithServiceResponseAsync(resourceGroupName, deploymentName).toBlocking().single().getBody(); } @@ -852,16 +823,13 @@ private ServiceResponse exportTemplateDelegate(Resp * Get a list of deployments. * * @param resourceGroupName The name of the resource group to filter by. The name is case insensitive. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentExtendedInner> object if successful. */ - public PagedList list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName) { ServiceResponse> response = listSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -960,16 +928,13 @@ public Observable>> call(Response< * @param resourceGroupName The name of the resource group to filter by. The name is case insensitive. * @param filter The filter to apply on the operation. * @param top Query parameters. If null is passed returns all deployments. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentExtendedInner> object if successful. */ - public PagedList list(final String resourceGroupName, final String filter, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceGroupName, final String filter, final Integer top) { ServiceResponse> response = listSinglePageAsync(resourceGroupName, filter, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1079,16 +1044,13 @@ private ServiceResponse> listDelegate(Response * Get a list of deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentExtendedInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInner.java index 275cc84dad32..96ad58a00821 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -88,16 +87,13 @@ interface FeaturesService { /** * Gets a list of previewed features for all the providers in the current subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<FeatureResultInner> object if successful. */ - public PagedList listAll() throws CloudException, IOException, IllegalArgumentException { + public PagedList listAll() { ServiceResponse> response = listAllSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -192,16 +188,13 @@ private ServiceResponse> listAllDelegate(Response list(final String resourceProviderNamespace) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String resourceProviderNamespace) { ServiceResponse> response = listSinglePageAsync(resourceProviderNamespace).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -304,12 +297,9 @@ private ServiceResponse> listDelegate(Response getDelegate(Response r * * @param resourceProviderNamespace Namespace of the resource provider. * @param featureName Previewed feature name in the resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the FeatureResultInner object if successful. */ - public FeatureResultInner register(String resourceProviderNamespace, String featureName) throws CloudException, IOException, IllegalArgumentException { + public FeatureResultInner register(String resourceProviderNamespace, String featureName) { return registerWithServiceResponseAsync(resourceProviderNamespace, featureName).toBlocking().single().getBody(); } @@ -469,16 +456,13 @@ private ServiceResponse registerDelegate(Response listAllNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listAllNext(final String nextPageLink) { ServiceResponse> response = listAllNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listAllNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -575,16 +559,13 @@ private ServiceResponse> listAllNextDelegate(Respon * Gets a list of previewed features of a resource provider. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<FeatureResultInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersInner.java index 3d20ded7ca85..9e29aa6f8eed 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -85,12 +84,9 @@ interface ProvidersService { * Unregisters provider from a subscription. * * @param resourceProviderNamespace Namespace of the resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ProviderInner object if successful. */ - public ProviderInner unregister(String resourceProviderNamespace) throws CloudException, IOException, IllegalArgumentException { + public ProviderInner unregister(String resourceProviderNamespace) { return unregisterWithServiceResponseAsync(resourceProviderNamespace).toBlocking().single().getBody(); } @@ -161,12 +157,9 @@ private ServiceResponse unregisterDelegate(Response * Registers provider to be used with a subscription. * * @param resourceProviderNamespace Namespace of the resource provider. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ProviderInner object if successful. */ - public ProviderInner register(String resourceProviderNamespace) throws CloudException, IOException, IllegalArgumentException { + public ProviderInner register(String resourceProviderNamespace) { return registerWithServiceResponseAsync(resourceProviderNamespace).toBlocking().single().getBody(); } @@ -236,16 +229,13 @@ private ServiceResponse registerDelegate(Response r /** * Gets a list of resource providers. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ProviderInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -336,16 +326,13 @@ public Observable>> call(Response list(final Integer top, final String expand) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final Integer top, final String expand) { ServiceResponse> response = listSinglePageAsync(top, expand).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -448,12 +435,9 @@ private ServiceResponse> listDelegate(Response> call(Response re * * @param resourceProviderNamespace Namespace of the resource provider. * @param expand The $expand query parameter. e.g. To include property aliases in response, use $expand=resourceTypes/aliases. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ProviderInner object if successful. */ - public ProviderInner get(String resourceProviderNamespace, String expand) throws CloudException, IOException, IllegalArgumentException { + public ProviderInner get(String resourceProviderNamespace, String expand) { return getWithServiceResponseAsync(resourceProviderNamespace, expand).toBlocking().single().getBody(); } @@ -598,16 +579,13 @@ private ServiceResponse getDelegate(Response respon * Gets a list of resource providers. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ProviderInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java index 62b80c03dbd4..5d9c6339bfeb 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -115,16 +114,13 @@ interface ResourceGroupsService { * Get all of the resources under a subscription. * * @param resourceGroupName Query parameters. If null is passed returns all resource groups. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<GenericResourceInner> object if successful. */ - public PagedList listResources(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList listResources(final String resourceGroupName) { ServiceResponse> response = listResourcesSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listResourcesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -225,16 +221,13 @@ public Observable>> call(Response listResources(final String resourceGroupName, final String filter, final String expand, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList listResources(final String resourceGroupName, final String filter, final String expand, final Integer top) { ServiceResponse> response = listResourcesSinglePageAsync(resourceGroupName, filter, expand, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listResourcesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -348,12 +341,9 @@ private ServiceResponse> listResourcesDelegate(Re * Checks whether resource group exists. * * @param resourceGroupName The name of the resource group to check. The name is case insensitive. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the boolean object if successful. */ - public boolean checkExistence(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public boolean checkExistence(String resourceGroupName) { return checkExistenceWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -426,12 +416,9 @@ private ServiceResponse checkExistenceDelegate(Response response) * * @param resourceGroupName The name of the resource group to be created or updated. * @param parameters Parameters supplied to the create or update resource group service operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceGroupInner object if successful. */ - public ResourceGroupInner createOrUpdate(String resourceGroupName, ResourceGroupInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ResourceGroupInner createOrUpdate(String resourceGroupName, ResourceGroupInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, parameters).toBlocking().single().getBody(); } @@ -510,12 +497,8 @@ private ServiceResponse createOrUpdateDelegate(Response> deleteWithServiceResponseAsync(String r * Delete resource group. * * @param resourceGroupName The name of the resource group to be deleted. The name is case insensitive. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginDelete(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public void beginDelete(String resourceGroupName) { beginDeleteWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -644,12 +624,9 @@ private ServiceResponse beginDeleteDelegate(Response respons * Get a resource group. * * @param resourceGroupName The name of the resource group to get. The name is case insensitive. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceGroupInner object if successful. */ - public ResourceGroupInner get(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public ResourceGroupInner get(String resourceGroupName) { return getWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -721,12 +698,9 @@ private ServiceResponse getDelegate(Response r * * @param resourceGroupName The name of the resource group to be created or updated. The name is case insensitive. * @param parameters Parameters supplied to the update state resource group service operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceGroupInner object if successful. */ - public ResourceGroupInner patch(String resourceGroupName, ResourceGroupInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ResourceGroupInner patch(String resourceGroupName, ResourceGroupInner parameters) { return patchWithServiceResponseAsync(resourceGroupName, parameters).toBlocking().single().getBody(); } @@ -805,12 +779,9 @@ private ServiceResponse patchDelegate(Response * * @param resourceGroupName The name of the resource group to be created or updated. * @param parameters Parameters supplied to the export template resource group operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceGroupExportResultInner object if successful. */ - public ResourceGroupExportResultInner exportTemplate(String resourceGroupName, ExportTemplateRequestInner parameters) throws CloudException, IOException, IllegalArgumentException { + public ResourceGroupExportResultInner exportTemplate(String resourceGroupName, ExportTemplateRequestInner parameters) { return exportTemplateWithServiceResponseAsync(resourceGroupName, parameters).toBlocking().single().getBody(); } @@ -887,16 +858,13 @@ private ServiceResponse exportTemplateDelegate(R /** * Gets a collection of resource groups. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceGroupInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -987,16 +955,13 @@ public Observable>> call(Response list(final String filter, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String filter, final Integer top) { ServiceResponse> response = listSinglePageAsync(filter, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1099,16 +1064,13 @@ private ServiceResponse> listDelegate(Response listResourcesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listResourcesNext(final String nextPageLink) { ServiceResponse> response = listResourcesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listResourcesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1205,16 +1167,13 @@ private ServiceResponse> listResourcesNextDelegat * Gets a collection of resource groups. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceGroupInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java index 0934350db883..bb2c32959fb3 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourcesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -103,12 +102,8 @@ interface ResourcesService { * * @param sourceResourceGroupName Source resource group name. * @param parameters move resources' parameters. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted */ - public void moveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public void moveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { moveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().last().getBody(); } @@ -170,11 +165,8 @@ public Observable> moveResourcesWithServiceResponseAsync(S * * @param sourceResourceGroupName Source resource group name. * @param parameters move resources' parameters. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) throws CloudException, IOException, IllegalArgumentException { + public void beginMoveResources(String sourceResourceGroupName, ResourcesMoveInfoInner parameters) { beginMoveResourcesWithServiceResponseAsync(sourceResourceGroupName, parameters).toBlocking().single().getBody(); } @@ -251,16 +243,13 @@ private ServiceResponse beginMoveResourcesDelegate(Response /** * Get all of the resources under a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<GenericResourceInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -353,16 +342,13 @@ public Observable>> call(Response list(final String filter, final String expand, final Integer top) throws CloudException, IOException, IllegalArgumentException { + public PagedList list(final String filter, final String expand, final Integer top) { ServiceResponse> response = listSinglePageAsync(filter, expand, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -474,12 +460,9 @@ private ServiceResponse> listDelegate(Response checkExistenceDelegate(Response response) * @param resourceType Resource identity. * @param resourceName Resource identity. * @param apiVersion the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) throws CloudException, IOException, IllegalArgumentException { + public void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { deleteWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion).toBlocking().single().getBody(); } @@ -692,12 +672,9 @@ private ServiceResponse deleteDelegate(Response response) th * @param resourceName Resource identity. * @param apiVersion the String value * @param parameters Create or update resource parameters. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the GenericResourceInner object if successful. */ - public GenericResourceInner createOrUpdate(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) throws CloudException, IOException, IllegalArgumentException { + public GenericResourceInner createOrUpdate(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion, GenericResourceInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion, parameters).toBlocking().single().getBody(); } @@ -808,12 +785,9 @@ private ServiceResponse createOrUpdateDelegate(Response getDelegate(Response * Get all of the resources under a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<GenericResourceInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java index f345f8365800..259fa24a190e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -80,12 +79,9 @@ interface SubscriptionsService { * Gets a list of the subscription locations. * * @param subscriptionId Id of the subscription - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<LocationInner> object if successful. */ - public List listLocations(String subscriptionId) throws CloudException, IOException, IllegalArgumentException { + public List listLocations(String subscriptionId) { return listLocationsWithServiceResponseAsync(subscriptionId).toBlocking().single().getBody(); } @@ -154,12 +150,9 @@ private ServiceResponse> listLocationsDelegate(Response< * Gets details about particular subscription. * * @param subscriptionId Id of the subscription. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SubscriptionInner object if successful. */ - public SubscriptionInner get(String subscriptionId) throws CloudException, IOException, IllegalArgumentException { + public SubscriptionInner get(String subscriptionId) { return getWithServiceResponseAsync(subscriptionId).toBlocking().single().getBody(); } @@ -226,16 +219,13 @@ private ServiceResponse getDelegate(Response re /** * Gets a list of the subscriptionIds. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SubscriptionInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -327,16 +317,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagsInner.java index 4aac409cf588..954125cd55c3 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TagsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -91,11 +90,8 @@ interface TagsService { * * @param tagName The name of the tag. * @param tagValue The value of the tag. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void deleteValue(String tagName, String tagValue) throws CloudException, IOException, IllegalArgumentException { + public void deleteValue(String tagName, String tagValue) { deleteValueWithServiceResponseAsync(tagName, tagValue).toBlocking().single().getBody(); } @@ -173,12 +169,9 @@ private ServiceResponse deleteValueDelegate(Response respons * * @param tagName The name of the tag. * @param tagValue The value of the tag. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the TagValueInner object if successful. */ - public TagValueInner createOrUpdateValue(String tagName, String tagValue) throws CloudException, IOException, IllegalArgumentException { + public TagValueInner createOrUpdateValue(String tagName, String tagValue) { return createOrUpdateValueWithServiceResponseAsync(tagName, tagValue).toBlocking().single().getBody(); } @@ -256,12 +249,9 @@ private ServiceResponse createOrUpdateValueDelegate(Response createOrUpdateDelegate(Response deleteDelegate(Response response) th /** * Get a list of subscription resource tags. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TagDetailsInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -511,16 +495,13 @@ private ServiceResponse> listDelegate(Response listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsInner.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsInner.java index 53bdf83d2939..b1f43fac8b23 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsInner.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceResponse; import java.io.IOException; @@ -70,16 +69,13 @@ interface TenantsService { /** * Gets a list of the tenantIds. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TenantIdDescriptionInner> object if successful. */ - public PagedList list() throws CloudException, IOException, IllegalArgumentException { + public PagedList list() { ServiceResponse> response = listSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -171,16 +167,13 @@ private ServiceResponse> listDelegate(Respon * Gets a list of the tenantIds. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TenantIdDescriptionInner> object if successful. */ - public PagedList listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listNext(final String nextPageLink) { ServiceResponse> response = listNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/AdminKeysInner.java b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/AdminKeysInner.java index 85da65d20eec..7c1c774fa31a 100644 --- a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/AdminKeysInner.java +++ b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/AdminKeysInner.java @@ -63,12 +63,9 @@ interface AdminKeysService { * * @param resourceGroupName The name of the resource group within the current subscription. * @param serviceName The name of the Search service for which to list admin keys. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AdminKeyResultInner object if successful. */ - public AdminKeyResultInner list(String resourceGroupName, String serviceName) throws CloudException, IOException, IllegalArgumentException { + public AdminKeyResultInner list(String resourceGroupName, String serviceName) { return listWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/QueryKeysInner.java b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/QueryKeysInner.java index d26f37d6fd85..b4f8bfed27af 100644 --- a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/QueryKeysInner.java +++ b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/QueryKeysInner.java @@ -63,12 +63,9 @@ interface QueryKeysService { * * @param resourceGroupName The name of the resource group within the current subscription. * @param serviceName The name of the Search service for which to list query keys. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ListQueryKeysResultInner object if successful. */ - public ListQueryKeysResultInner list(String resourceGroupName, String serviceName) throws CloudException, IOException, IllegalArgumentException { + public ListQueryKeysResultInner list(String resourceGroupName, String serviceName) { return listWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/ServicesInner.java b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/ServicesInner.java index a53415ec9817..e4e9f4eea96c 100644 --- a/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/ServicesInner.java +++ b/azure-mgmt-search/src/main/java/com/microsoft/azure/management/search/implementation/ServicesInner.java @@ -76,12 +76,9 @@ interface ServicesService { * @param resourceGroupName The name of the resource group within the current subscription. * @param serviceName The name of the Search service to create or update. * @param parameters The properties to set or update on the Search service. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SearchServiceResourceInner object if successful. */ - public SearchServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName, SearchServiceCreateOrUpdateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public SearchServiceResourceInner createOrUpdate(String resourceGroupName, String serviceName, SearchServiceCreateOrUpdateParametersInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serviceName, parameters).toBlocking().single().getBody(); } @@ -167,11 +164,8 @@ private ServiceResponse createOrUpdateDelegate(Respo * * @param resourceGroupName The name of the resource group within the current subscription. * @param serviceName The name of the Search service to delete. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void delete(String resourceGroupName, String serviceName) throws CloudException, IOException, IllegalArgumentException { + public void delete(String resourceGroupName, String serviceName) { deleteWithServiceResponseAsync(resourceGroupName, serviceName).toBlocking().single().getBody(); } @@ -249,12 +243,9 @@ private ServiceResponse deleteDelegate(Response response) th * Returns a list of all Search services in the given resource group. * * @param resourceGroupName The name of the resource group within the current subscription. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SearchServiceListResultInner object if successful. */ - public SearchServiceListResultInner list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public SearchServiceListResultInner list(String resourceGroupName) { return listWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java index 0079054677b1..1d2e4ac31dfb 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; @@ -21,7 +20,6 @@ import com.microsoft.azure.management.storage.implementation.StorageAccountInner; import org.joda.time.DateTime; -import java.io.IOException; import java.util.List; /** @@ -102,34 +100,26 @@ public interface StorageAccount extends /** * @return the access keys for this storage account - * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ @LangMethodDefinition(AsType = LangMethodType.Method) - List keys() throws CloudException, IOException; + List keys(); /** * Fetch the up-to-date access keys from Azure for this storage account. * * @return the access keys for this storage account - * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ @LangMethodDefinition(AsType = LangMethodType.Method) - List refreshKeys() throws CloudException, IOException; + List refreshKeys(); /** * Regenerates the access keys for this storage account. * * @param keyName if the key name * @return the generated access keys for this storage account - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ @LangMethodDefinition(AsType = LangMethodType.Method) - List regenerateKey(String keyName) throws CloudException, IOException; + List regenerateKey(String keyName); /************************************************************** * Fluent interfaces to provision a StorageAccount diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java index 6c6c8ff49b2c..109b71c84896 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java @@ -114,7 +114,7 @@ public AccessTier accessTier() { } @Override - public List keys() throws CloudException, IOException { + public List keys() { if (cachedAccountKeys == null) { cachedAccountKeys = refreshKeys(); } @@ -122,7 +122,7 @@ public List keys() throws CloudException, IOException { } @Override - public List refreshKeys() throws CloudException, IOException { + public List refreshKeys() { StorageAccountListKeysResultInner response = this.client.listKeys(this.resourceGroupName(), this.name()); cachedAccountKeys = response.keys(); @@ -130,7 +130,7 @@ public List refreshKeys() throws CloudException, IOException } @Override - public List regenerateKey(String keyName) throws CloudException, IOException { + public List regenerateKey(String keyName) { StorageAccountListKeysResultInner response = this.client.regenerateKey(this.resourceGroupName(), this.name(), keyName); cachedAccountKeys = response.keys(); diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java index acb1ccbdae17..531ead4b3a31 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsInner.java @@ -107,12 +107,9 @@ interface StorageAccountsService { * Checks that account name is valid and is not in use. * * @param name the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CheckNameAvailabilityResultInner object if successful. */ - public CheckNameAvailabilityResultInner checkNameAvailability(String name) throws CloudException, IOException, IllegalArgumentException { + public CheckNameAvailabilityResultInner checkNameAvailability(String name) { return checkNameAvailabilityWithServiceResponseAsync(name).toBlocking().single().getBody(); } @@ -187,13 +184,9 @@ private ServiceResponse checkNameAvailabilityD * @param resourceGroupName The name of the resource group within the user's subscription. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the StorageAccountInner object if successful. */ - public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public StorageAccountInner create(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { return createWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().last().getBody(); } @@ -262,12 +255,9 @@ public Observable> createWithServiceRespons * @param resourceGroupName The name of the resource group within the user's subscription. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param parameters The parameters to provide for the created account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StorageAccountInner object if successful. */ - public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public StorageAccountInner beginCreate(String resourceGroupName, String accountName, StorageAccountCreateParametersInner parameters) { return beginCreateWithServiceResponseAsync(resourceGroupName, accountName, parameters).toBlocking().single().getBody(); } @@ -353,11 +343,8 @@ private ServiceResponse beginCreateDelegate(Response deleteDelegate(Response response) th * * @param resourceGroupName The name of the resource group within the user's subscription. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StorageAccountInner object if successful. */ - public StorageAccountInner getProperties(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public StorageAccountInner getProperties(String resourceGroupName, String accountName) { return getPropertiesWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -519,12 +503,9 @@ private ServiceResponse getPropertiesDelegate(Response updateDelegate(Response list() throws CloudException, IOException, IllegalArgumentException { + public List list() { return listWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -678,12 +656,9 @@ private ServiceResponse> listDelegate(Response listByResourceGroup(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public List listByResourceGroup(String resourceGroupName) { return listByResourceGroupWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -756,12 +731,9 @@ private ServiceResponse> listByResourceGroupDelega * * @param resourceGroupName The name of the resource group. * @param accountName The name of the storage account. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StorageAccountListKeysResultInner object if successful. */ - public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName) throws CloudException, IOException, IllegalArgumentException { + public StorageAccountListKeysResultInner listKeys(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().getBody(); } @@ -840,12 +812,9 @@ private ServiceResponse listKeysDelegate(Resp * @param resourceGroupName The name of the resource group within the user's subscription. * @param accountName The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only. * @param keyName the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StorageAccountListKeysResultInner object if successful. */ - public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) throws CloudException, IOException, IllegalArgumentException { + public StorageAccountListKeysResultInner regenerateKey(String resourceGroupName, String accountName, String keyName) { return regenerateKeyWithServiceResponseAsync(resourceGroupName, accountName, keyName).toBlocking().single().getBody(); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java index 3b72461bbabc..fa7b6da95ef8 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesInner.java @@ -62,12 +62,9 @@ interface UsagesService { /** * Gets the current usage count and the limit for the resources under the subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<UsageInner> object if successful. */ - public List list() throws CloudException, IOException, IllegalArgumentException { + public List list() { return listWithServiceResponseAsync().toBlocking().single().getBody(); } From 4950754624d352fea7e53b9dfd5a80ec626c1870 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 15 Sep 2016 00:02:00 -0700 Subject: [PATCH 3/5] Remove throws on many methods --- .../management/compute/VirtualMachine.java | 70 +- .../implementation/AvailabilitySetImpl.java | 2 +- .../implementation/AvailabilitySetsImpl.java | 13 +- ...VirtualMachineExtensionImageTypesImpl.java | 5 +- ...tualMachineExtensionImageVersionsImpl.java | 5 +- .../VirtualMachineExtensionImpl.java | 2 +- .../VirtualMachineImagesInSkuImpl.java | 2 +- .../implementation/VirtualMachineImpl.java | 41 +- .../VirtualMachineOffersImpl.java | 5 +- .../VirtualMachineSkusImpl.java | 5 +- .../implementation/VirtualMachinesImpl.java | 8 +- .../implementation/ServicePrincipalImpl.java | 2 +- .../implementation/ServicePrincipalsImpl.java | 2 +- .../graphrbac/implementation/UserImpl.java | 2 +- .../graphrbac/implementation/UsersImpl.java | 3 +- .../keyvault/implementation/VaultImpl.java | 2 +- .../keyvault/implementation/VaultsImpl.java | 11 +- .../management/network/NetworkInterface.java | 8 +- .../network/NicIpConfiguration.java | 11 +- .../implementation/LoadBalancerImpl.java | 2 +- .../implementation/LoadBalancersImpl.java | 11 +- .../network/implementation/NetworkImpl.java | 2 +- .../implementation/NetworkInterfaceImpl.java | 6 +- .../implementation/NetworkInterfacesImpl.java | 10 +- .../NetworkSecurityGroupImpl.java | 2 +- .../NetworkSecurityGroupsImpl.java | 10 +- .../network/implementation/NetworksImpl.java | 10 +- .../NicIpConfigurationImpl.java | 6 +- .../implementation/PublicIpAddressImpl.java | 2 +- .../implementation/PublicIpAddressesImpl.java | 11 +- .../network/model/HasNetworkInterfaces.java | 12 +- .../collection/SupportsDeletingByGroup.java | 3 +- .../collection/SupportsGettingByGroup.java | 2 +- .../arm/collection/SupportsGettingById.java | 2 +- .../arm/collection/SupportsGettingByName.java | 7 +- .../collection/SupportsListingByGroup.java | 7 +- .../CreatableResourcesImpl.java | 2 +- .../GroupableResourcesImpl.java | 7 +- .../implementation/ReadableWrappersImpl.java | 8 +- .../models/implementation/GroupPagedList.java | 14 +- .../collection/SupportsListing.java | 2 +- .../fluentcore/model/Refreshable.java | 3 +- .../IndexableRefreshableImpl.java | 2 +- .../fluentcore/utils/PagedListConverter.java | 4 +- .../implementation/DeploymentImpl.java | 2 +- .../DeploymentOperationImpl.java | 2 +- .../DeploymentOperationsImpl.java | 7 +- .../implementation/DeploymentsImpl.java | 15 +- .../implementation/FeaturesImpl.java | 5 +- .../FeaturesInResourceProviderImpl.java | 5 +- .../implementation/GenericResourceImpl.java | 2 +- .../implementation/GenericResourcesImpl.java | 8 +- .../implementation/ProvidersImpl.java | 4 +- .../implementation/ResourceGroupImpl.java | 2 +- .../implementation/ResourceGroupsImpl.java | 4 +- .../implementation/SubscriptionImpl.java | 5 +- .../implementation/SubscriptionsImpl.java | 8 +- .../resources/implementation/TenantsImpl.java | 5 +- .../resources/GroupPagedListTests.java | 7 +- .../resources/childresource/PulletImpl.java | 2 +- .../implementation/StorageAccountImpl.java | 4 +- .../implementation/StorageAccountsImpl.java | 8 +- .../storage/implementation/UsagesImpl.java | 5 +- .../CertificateOrdersInner.java | 99 +- .../implementation/CertificatesInner.java | 60 +- .../ClassicMobileServicesInner.java | 25 +- .../website/implementation/DomainsInner.java | 45 +- .../GlobalCertificateOrdersInner.java | 20 +- .../GlobalDomainRegistrationsInner.java | 49 +- .../GlobalResourceGroupsInner.java | 5 +- .../website/implementation/GlobalsInner.java | 143 +- .../HostingEnvironmentsInner.java | 469 ++----- .../ManagedHostingEnvironmentsInner.java | 112 +- .../implementation/ProvidersInner.java | 35 +- .../implementation/RecommendationsInner.java | 35 +- .../implementation/ServerFarmsInner.java | 168 +-- .../website/implementation/SitesInner.java | 1166 ++++------------- .../implementation/TopLevelDomainsInner.java | 41 +- .../website/implementation/UsagesInner.java | 5 +- .../java/com/microsoft/azure/PagedList.java | 23 +- .../com/microsoft/azure/PagedListTests.java | 3 +- 81 files changed, 745 insertions(+), 2204 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index 11cdde960a85..9a62a82739d3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -1,23 +1,21 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; -import com.microsoft.azure.management.compute.implementation.VirtualMachineInner; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.compute.implementation.VirtualMachineInner; import com.microsoft.azure.management.network.Network; import com.microsoft.azure.management.network.NetworkInterface; import com.microsoft.azure.management.network.PublicIpAddress; import com.microsoft.azure.management.network.model.HasNetworkInterfaces; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; +import com.microsoft.azure.management.resources.fluentcore.model.Appliable; +import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; -import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.fluentcore.model.Updatable; -import com.microsoft.azure.management.resources.fluentcore.model.Creatable; -import com.microsoft.azure.management.resources.fluentcore.model.Appliable; +import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.storage.StorageAccount; -import java.io.IOException; import java.util.List; import java.util.Map; @@ -38,67 +36,40 @@ public interface VirtualMachine extends * Shuts down the Virtual Machine and releases the compute resources. *

* You are not billed for the compute resources that this Virtual Machine uses - * - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException thrown for IO exception. - * @throws InterruptedException exception thrown when the operation is interrupted */ - void deallocate() throws CloudException, IOException, InterruptedException; + void deallocate(); /** * Generalize the Virtual Machine. - * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ - void generalize() throws CloudException, IOException; + void generalize(); /** * Power off (stop) the virtual machine. *

* You will be billed for the compute resources that this Virtual Machine uses. - * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void powerOff() throws CloudException, IOException, InterruptedException; + void powerOff(); /** * Restart the virtual machine. - * - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted - */ - void restart() throws CloudException, IOException, InterruptedException; += */ + void restart(); /** * Start the virtual machine. - * - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void start() throws CloudException, IOException, InterruptedException; + void start(); /** * Redeploy the virtual machine. - * - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void redeploy() throws CloudException, IOException, InterruptedException; + void redeploy(); /** * List of all available virtual machine sizes this virtual machine can resized to. - * - * @return the virtual machine sizes - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization */ - PagedList availableSizes() throws CloudException, IOException; + PagedList availableSizes(); /** * Captures the virtual machine by copying virtual hard disks of the VM and returns template as json @@ -107,11 +78,8 @@ public interface VirtualMachine extends * @param containerName destination container name to store the captured Vhd * @param overwriteVhd whether to overwrites destination vhd if it exists * @return the template as json string - * @throws CloudException thrown for an invalid response from the service - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - String capture(String containerName, boolean overwriteVhd) throws CloudException, IOException, InterruptedException; + String capture(String containerName, boolean overwriteVhd); /** * Refreshes the virtual machine instance view to sync with Azure. @@ -119,10 +87,8 @@ public interface VirtualMachine extends * this will caches the instance view which can be later retrieved using {@link VirtualMachine#instanceView()}. * * @return the refreshed instance view - * @throws CloudException thrown for an invalid response from the service - * @throws IOException exception thrown from serialization/deserialization */ - VirtualMachineInstanceView refreshInstanceView() throws CloudException, IOException; + VirtualMachineInstanceView refreshInstanceView(); // Getters // @@ -168,10 +134,8 @@ public interface VirtualMachine extends * note that this method makes a rest API call to fetch the resource. * * @return the public IP of the primary network interface - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - PublicIpAddress primaryPublicIpAddress() throws CloudException, IOException; + PublicIpAddress primaryPublicIpAddress(); /** * Returns id to the availability set this virtual machine associated with. @@ -247,10 +211,8 @@ public interface VirtualMachine extends * this method returns the cached instance view, to refresh the cache call {@link VirtualMachine#refreshInstanceView()}. * * @return the virtual machine instance view - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - VirtualMachineInstanceView instanceView() throws CloudException, IOException; + VirtualMachineInstanceView instanceView(); // Setters // diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetImpl.java index 3271a73bafcb..317c712563b8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetImpl.java @@ -73,7 +73,7 @@ public List statuses() { } @Override - public AvailabilitySet refresh() throws Exception { + public AvailabilitySet refresh() { AvailabilitySetInner response = client.get(this.resourceGroupName(), this.name()); this.setInner(response); this.idOfVMsInSet = null; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java index 985317572a93..39aff4bd430d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.AvailabilitySet; @@ -13,9 +12,7 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupPagedList; -import com.microsoft.rest.RestException; -import java.io.IOException; import java.util.List; /** @@ -38,22 +35,22 @@ class AvailabilitySetsImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { return new GroupPagedList(this.myManager.resourceManager().resourceGroups().list()) { @Override - public List listNextGroup(String resourceGroupName) throws RestException, IOException { + public List listNextGroup(String resourceGroupName) { return wrapList(innerCollection.list(resourceGroupName)); } }; } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public AvailabilitySetImpl getByGroup(String groupName, String name) throws CloudException, IOException { + public AvailabilitySetImpl getByGroup(String groupName, String name) { AvailabilitySetInner response = this.innerCollection.get(groupName, name); return wrapModel(response); } @@ -69,7 +66,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageTypesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageTypesImpl.java index a330474a0c99..39e9aa7e32a7 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageTypesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageTypesImpl.java @@ -1,14 +1,11 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageType; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageTypes; import com.microsoft.azure.management.compute.VirtualMachinePublisher; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineExtensionImageTypes}. */ @@ -24,7 +21,7 @@ class VirtualMachineExtensionImageTypesImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.client.listTypes(this.publisher.region().toString(), this.publisher.name())); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionsImpl.java index 764f865ac5df..e8146c46de18 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionsImpl.java @@ -1,14 +1,11 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageType; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageVersion; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageVersions; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineExtensionImageVersions}. */ @@ -24,7 +21,7 @@ public class VirtualMachineExtensionImageVersionsImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.client.listVersions(this.type.regionName(), this.type.publisher().name(), this.type.name())); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImpl.java index 13519bb0fa48..885693bc7463 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImpl.java @@ -199,7 +199,7 @@ public VirtualMachineImpl attach() { } @Override - public VirtualMachineExtensionImpl refresh() throws Exception { + public VirtualMachineExtensionImpl refresh() { VirtualMachineExtensionInner inner = this.client.get(this.parent.resourceGroupName(), this.parent.name(), this.name()); this.setInner(inner); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInSkuImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInSkuImpl.java index d609afb17076..bc66c1fdb311 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInSkuImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInSkuImpl.java @@ -26,7 +26,7 @@ class VirtualMachineImagesInSkuImpl implements VirtualMachineImagesInSku { this.innerCollection = innerCollection; } - public PagedList list() throws RestException, IOException { + public PagedList list() { final List images = new ArrayList<>(); for (VirtualMachineImageResourceInner inner : innerCollection.list( diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java index b18ccb132927..a564307a9263 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java @@ -1,7 +1,7 @@ package com.microsoft.azure.management.compute.implementation; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.azure.CloudException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.SubResource; @@ -49,11 +49,10 @@ import com.microsoft.azure.management.resources.implementation.PageImpl; import com.microsoft.azure.management.storage.StorageAccount; import com.microsoft.azure.management.storage.implementation.StorageManager; -import com.microsoft.rest.RestException; import rx.Observable; +import rx.exceptions.Exceptions; import rx.functions.Func1; -import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -146,7 +145,7 @@ public VirtualMachineSize typeConvert(VirtualMachineSizeInner inner) { // Verbs @Override - public VirtualMachine refresh() throws Exception { + public VirtualMachine refresh() { VirtualMachineInner response = this.client.get(this.resourceGroupName(), this.name()); this.setInner(response); @@ -162,61 +161,65 @@ public Observable applyAsync() { } @Override - public void deallocate() throws CloudException, IOException, InterruptedException { + public void deallocate() { this.client.deallocate(this.resourceGroupName(), this.name()); } @Override - public void generalize() throws CloudException, IOException { + public void generalize() { this.client.generalize(this.resourceGroupName(), this.name()); } @Override - public void powerOff() throws CloudException, IOException, InterruptedException { + public void powerOff() { this.client.powerOff(this.resourceGroupName(), this.name()); } @Override - public void restart() throws CloudException, IOException, InterruptedException { + public void restart() { this.client.restart(this.resourceGroupName(), this.name()); } @Override - public void start() throws CloudException, IOException, InterruptedException { + public void start() { this.client.start(this.resourceGroupName(), this.name()); } @Override - public void redeploy() throws CloudException, IOException, InterruptedException { + public void redeploy() { this.client.redeploy(this.resourceGroupName(), this.name()); } @Override - public PagedList availableSizes() throws CloudException, IOException { + public PagedList availableSizes() { PageImpl page = new PageImpl<>(); page.setItems(this.client.listAvailableSizes(this.resourceGroupName(), this.name())); page.setNextPageLink(null); return this.virtualMachineSizeConverter.convert(new PagedList(page) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return null; } }); } @Override - public String capture(String containerName, boolean overwriteVhd) throws CloudException, IOException, InterruptedException { + public String capture(String containerName, boolean overwriteVhd) { VirtualMachineCaptureParametersInner parameters = new VirtualMachineCaptureParametersInner(); parameters.withDestinationContainerName(containerName); parameters.withOverwriteVhds(overwriteVhd); VirtualMachineCaptureResultInner captureResult = this.client.capture(this.resourceGroupName(), this.name(), parameters); ObjectMapper mapper = new ObjectMapper(); //Object to JSON string - return mapper.writeValueAsString(captureResult.output()); + try { + return mapper.writeValueAsString(captureResult.output()); + } catch (JsonProcessingException e) { + throw Exceptions.propagate(e); + } } @Override - public VirtualMachineInstanceView refreshInstanceView() throws CloudException, IOException { + public VirtualMachineInstanceView refreshInstanceView() { this.virtualMachineInstanceView = this.client.get(this.resourceGroupName(), this.name(), InstanceViewTypes.INSTANCE_VIEW).instanceView(); @@ -754,7 +757,7 @@ public List dataDisks() { } @Override - public NetworkInterface primaryNetworkInterface() throws CloudException, IOException { + public NetworkInterface primaryNetworkInterface() { if (this.primaryNetworkInterface == null) { String primaryNicId = primaryNetworkInterfaceId(); this.primaryNetworkInterface = this.networkManager.networkInterfaces().getById(primaryNicId); @@ -763,7 +766,7 @@ public NetworkInterface primaryNetworkInterface() throws CloudException, IOExcep } @Override - public PublicIpAddress primaryPublicIpAddress() throws CloudException, IOException { + public PublicIpAddress primaryPublicIpAddress() { if (this.primaryPublicIpAddress == null) { this.primaryPublicIpAddress = this.primaryNetworkInterface().primaryPublicIpAddress(); } @@ -857,7 +860,7 @@ public String vmId() { } @Override - public VirtualMachineInstanceView instanceView() throws CloudException, IOException { + public VirtualMachineInstanceView instanceView() { if (this.virtualMachineInstanceView == null) { this.refreshInstanceView(); } @@ -981,7 +984,7 @@ private void setHardwareProfileDefaults() { } } - private void handleStorageSettings() throws Exception { + private void handleStorageSettings() { StorageAccount storageAccount = null; if (this.creatableStorageAccountKey != null) { storageAccount = (StorageAccount) this.createdResource(this.creatableStorageAccountKey); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineOffersImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineOffersImpl.java index d93038360043..e768bde345ad 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineOffersImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineOffersImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.VirtualMachineOffer; @@ -13,8 +12,6 @@ import com.microsoft.azure.management.compute.VirtualMachinePublisher; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineOffers}. */ @@ -37,7 +34,7 @@ protected VirtualMachineOfferImpl wrapModel(VirtualMachineImageResourceInner inn } @Override - public PagedList list() throws CloudException, IllegalArgumentException, IOException { + public PagedList list() { return wrapList(innerCollection.listOffers(publisher.region().toString(), publisher.name())); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSkusImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSkusImpl.java index 5f9f8f97a60a..45e2002a9638 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSkusImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSkusImpl.java @@ -11,9 +11,6 @@ import com.microsoft.azure.management.compute.VirtualMachineSkus; import com.microsoft.azure.management.compute.VirtualMachineSku; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import com.microsoft.rest.RestException; - -import java.io.IOException; /** * The implementation for {@link VirtualMachineSkus}. @@ -32,7 +29,7 @@ class VirtualMachineSkusImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { return wrapList(innerCollection.listSkus( offer.region().toString(), offer.publisher().name(), diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java index 813c6d2af303..58c937fd8dd5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java @@ -59,17 +59,17 @@ class VirtualMachinesImpl // Actions @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public VirtualMachine getByGroup(String groupName, String name) throws CloudException, IOException { + public VirtualMachine getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -79,7 +79,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalImpl.java index c3d44c2b99f7..0dbe0d5258fd 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalImpl.java @@ -68,7 +68,7 @@ public ServicePrincipalImpl withAccountEnabled(boolean enabled) { } @Override - public ServicePrincipal refresh() throws Exception { + public ServicePrincipal refresh() { return null; } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java index 1268109be659..469c16af2cd9 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java @@ -41,7 +41,7 @@ class ServicePrincipalsImpl } @Override - public PagedList list() throws GraphErrorException, IOException { + public PagedList list() { return wrapList(this.innerCollection.list()); } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UserImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UserImpl.java index 1180a58cac48..9779e5c7fd70 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UserImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UserImpl.java @@ -101,7 +101,7 @@ public UserImpl withPassword(String password, boolean forceChangePasswordNextLog } @Override - public User refresh() throws Exception { + public User refresh() { return null; } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java index 6f4504497f9f..c292aee5f2e6 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.graphrbac.User; import com.microsoft.azure.management.graphrbac.Users; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.CreatableWrappersImpl; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -40,7 +39,7 @@ class UsersImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { return wrapList(this.innerCollection.list()); } diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultImpl.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultImpl.java index bfb4d8b76283..597c5a48078a 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultImpl.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultImpl.java @@ -257,7 +257,7 @@ public Observable call(Object o) { } @Override - public VaultImpl refresh() throws Exception { + public VaultImpl refresh() { setInner(client.get(resourceGroupName(), name())); return this; } diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java index be66f6aa2336..0594b1a947cb 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.keyvault.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.graphrbac.implementation.GraphRbacManager; import com.microsoft.azure.management.keyvault.SkuName; @@ -15,9 +14,7 @@ import com.microsoft.azure.management.keyvault.Vaults; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import com.microsoft.rest.RestException; -import java.io.IOException; import java.util.UUID; /** @@ -45,17 +42,17 @@ class VaultsImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { return wrapList(this.innerCollection.list()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.listByResourceGroup(groupName)); } @Override - public Vault getByGroup(String groupName, String name) throws CloudException, IOException { + public Vault getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -65,7 +62,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java index fc8018ae87fe..41caacdc8108 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java @@ -77,10 +77,8 @@ public interface NetworkInterface extends * This method makes a rest API call to fetch the public IP. * * @return the public IP associated with this network interface - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - PublicIpAddress primaryPublicIpAddress() throws CloudException, IOException; + PublicIpAddress primaryPublicIpAddress(); /** * @return the resource id of the virtual network subnet associated with this network interface. @@ -93,10 +91,8 @@ public interface NetworkInterface extends * This method makes a rest API call to fetch the virtual network. * * @return the virtual network associated with this network interface. - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - Network primaryNetwork() throws CloudException, IOException; + Network primaryNetwork(); /** * Gets the private IP address allocated to this network interface's primary IP configuration. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java index c03849b10410..3f9fd39d8a74 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.network; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; @@ -10,8 +9,6 @@ import com.microsoft.azure.management.resources.fluentcore.model.Settable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; -import java.io.IOException; - /** * An IP configuration in a network interface. */ @@ -35,10 +32,8 @@ public interface NicIpConfiguration extends * This method makes a rest API call to fetch the public IP. * * @return the public IP associated with this IP configuration or null if there is no public IP associated - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - PublicIpAddress publicIpAddress() throws CloudException, IOException; + PublicIpAddress publicIpAddress(); /** * @return the resource id of the virtual network subnet associated with this IP configuration. @@ -51,10 +46,8 @@ public interface NicIpConfiguration extends * This method makes a rest API call to fetch the public IP. * * @return the virtual network associated with this this IP configuration. - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - Network network() throws CloudException, IOException; + Network network(); // Setters (fluent) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java index 9d64084ff1e8..4611b6ee9212 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java @@ -76,7 +76,7 @@ class LoadBalancerImpl // Verbs @Override - public LoadBalancerImpl refresh() throws Exception { + public LoadBalancerImpl refresh() { LoadBalancerInner inner = this.innerCollection.get(this.resourceGroupName(), this.name()); this.setInner(inner); initializeChildrenFromInner(); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java index 33253d1dfa4b..429f9441a9da 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.LoadBalancer; @@ -13,8 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; - /** * Implementation for {@link LoadBalancers}. */ @@ -35,17 +32,17 @@ class LoadBalancersImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public LoadBalancerImpl getByGroup(String groupName, String name) throws CloudException, IOException { + public LoadBalancerImpl getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -55,7 +52,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkImpl.java index 2f59b64bda3f..8ba739be3969 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkImpl.java @@ -58,7 +58,7 @@ protected void initializeChildrenFromInner() { // Verbs @Override - public NetworkImpl refresh() throws Exception { + public NetworkImpl refresh() { VirtualNetworkInner inner = this.innerCollection.get(this.resourceGroupName(), this.name()); this.setInner(inner); initializeChildrenFromInner(); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java index fa3a62aa490f..dfdeee4106a5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java @@ -80,7 +80,7 @@ class NetworkInterfaceImpl // Verbs @Override - public NetworkInterface refresh() throws Exception { + public NetworkInterface refresh() { NetworkInterfaceInner inner = this.innerCollection.get(this.resourceGroupName(), this.name()); this.setInner(inner); clearCachedRelatedResources(); @@ -278,7 +278,7 @@ public List dnsServers() { } @Override - public PublicIpAddress primaryPublicIpAddress() throws CloudException, IOException { + public PublicIpAddress primaryPublicIpAddress() { if (this.primaryPublicIp == null) { this.primaryPublicIp = this.primaryIpConfiguration().publicIpAddress(); } @@ -291,7 +291,7 @@ public String primarySubnetId() { } @Override - public Network primaryNetwork() throws CloudException, IOException { + public Network primaryNetwork() { if (this.primaryNetwork == null) { this.primaryNetwork = this.primaryIpConfiguration().network(); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java index 33ee1e3f9637..433fad1c4181 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.NetworkInterface; @@ -9,7 +8,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; import java.util.ArrayList; /** @@ -32,17 +30,17 @@ class NetworkInterfacesImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(innerCollection.list(groupName)); } @Override - public NetworkInterface getByGroup(String groupName, String name) throws CloudException, IOException { + public NetworkInterface getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -52,7 +50,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupImpl.java index 24c04d6f4764..e94871b845c2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupImpl.java @@ -80,7 +80,7 @@ public NetworkSecurityRuleImpl defineRule(String name) { } @Override - public NetworkSecurityGroupImpl refresh() throws Exception { + public NetworkSecurityGroupImpl refresh() { NetworkSecurityGroupInner response = this.innerCollection.get(this.resourceGroupName(), this.name()); this.setInner(response); initializeChildrenFromInner(); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java index b60be34f07c6..3147439c7d74 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.NetworkSecurityGroup; @@ -13,7 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; import java.util.ArrayList; /** @@ -36,17 +34,17 @@ class NetworkSecurityGroupsImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public NetworkSecurityGroupImpl getByGroup(String groupName, String name) throws CloudException, IOException { + public NetworkSecurityGroupImpl getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -56,7 +54,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java index 30eab4179fb2..7a4233fb1af5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.AddressSpace; @@ -15,7 +14,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; import java.util.ArrayList; /** @@ -38,17 +36,17 @@ class NetworksImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public NetworkImpl getByGroup(String groupName, String name) throws CloudException, IOException { + public NetworkImpl getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -58,7 +56,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java index 7ac23a2aca97..16ffde7d2319 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.IPAllocationMethod; @@ -13,7 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.ChildResourceImpl; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; -import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; @@ -92,7 +90,7 @@ public String publicIpAddressId() { } @Override - public PublicIpAddress publicIpAddress() throws CloudException, IOException { + public PublicIpAddress publicIpAddress() { String id = publicIpAddressId(); if (id == null) { return null; @@ -108,7 +106,7 @@ public String subnetId() { } @Override - public Network network() throws CloudException, IOException { + public Network network() { String id = subnetId(); return this.networkManager.networks().getByGroup(ResourceUtils.groupFromResourceId(id), ResourceUtils.extractFromResourceId(id, "virtualNetworks")); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressImpl.java index 213ecd3d2ea8..3f35f853c2ac 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressImpl.java @@ -45,7 +45,7 @@ public Observable applyAsync() { } @Override - public PublicIpAddress refresh() throws Exception { + public PublicIpAddress refresh() { PublicIPAddressInner response = this.client.get(this.resourceGroupName(), this.name()); this.setInner(response); return this; diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java index a7421e734ae3..26a167b62ba7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.network.PublicIPAddressDnsSettings; import com.microsoft.azure.management.network.PublicIpAddress; @@ -14,8 +13,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; - /** * Implementation for {@link PublicIpAddresses}. */ @@ -36,17 +33,17 @@ class PublicIpAddressesImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.listAll()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.list(groupName)); } @Override - public PublicIpAddressImpl getByGroup(String groupName, String name) throws CloudException, IOException { + public PublicIpAddressImpl getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.get(groupName, name)); } @@ -56,7 +53,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasNetworkInterfaces.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasNetworkInterfaces.java index cfb0bf322bb2..05981f1ce71e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasNetworkInterfaces.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasNetworkInterfaces.java @@ -5,12 +5,10 @@ */ package com.microsoft.azure.management.network.model; -import java.io.IOException; -import java.util.List; - -import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.network.NetworkInterface; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.network.NetworkInterface; + +import java.util.List; /** * Interface exposing a list of network interfaces. @@ -23,10 +21,8 @@ public interface HasNetworkInterfaces { * Note that this method can result in a call to the cloud to fetch the network interface information. * * @return the primary network interface associated with this resource - * @throws CloudException exceptions thrown from the cloud - * @throws IOException exceptions thrown from serialization/deserialization. */ - NetworkInterface primaryNetworkInterface() throws CloudException, IOException; + NetworkInterface primaryNetworkInterface(); /** * @return the resource id of the primary network interface associated with this resource diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsDeletingByGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsDeletingByGroup.java index c7431e958fc6..6dacc8134db5 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsDeletingByGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsDeletingByGroup.java @@ -21,7 +21,6 @@ public interface SupportsDeletingByGroup { * * @param groupName The group the resource is part of * @param name The name of the resource - * @throws Exception error to throw */ - void delete(String groupName, String name) throws Exception; + void delete(String groupName, String name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java index b3774800bb0b..9a8740a76e83 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java @@ -30,5 +30,5 @@ public interface SupportsGettingByGroup { * @throws CloudException exceptions thrown from the cloud. * @throws IOException exceptions thrown from serialization/deserialization. */ - T getByGroup(String resourceGroupName, String name) throws CloudException, IOException; + T getByGroup(String resourceGroupName, String name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java index db84ecfb284f..f994ab3a6298 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java @@ -29,5 +29,5 @@ public interface SupportsGettingById { * @throws IOException exceptions thrown from serialization/deserialization * @throws IllegalArgumentException exceptions thrown when something is wrong with the input parameters */ - T getById(String id) throws CloudException, IllegalArgumentException, IOException; + T getById(String id); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByName.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByName.java index ca590d17b3fd..37555808413e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByName.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByName.java @@ -7,12 +7,9 @@ package com.microsoft.azure.management.resources.fluentcore.arm.collection; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; -import java.io.IOException; - /** * Provides access to getting a specific Azure resource based on its name within the current resource group. * @@ -25,8 +22,6 @@ public interface SupportsGettingByName { * * @param name the name of the resource. (Note, this is not the resource ID.) * @return an immutable representation of the resource - * @throws CloudException exceptions thrown from the cloud - * @throws IOException exceptions thrown from serialization/deserialization */ - T getByName(String name) throws CloudException, IOException; + T getByName(String name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsListingByGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsListingByGroup.java index 973acc2d694a..feae0361c09e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsListingByGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsListingByGroup.java @@ -6,13 +6,10 @@ package com.microsoft.azure.management.resources.fluentcore.arm.collection; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; -import java.io.IOException; - /** * Provides access to listing Azure resources of a specific type in a specific resource group. * @@ -27,8 +24,6 @@ public interface SupportsListingByGroup { * * @param resourceGroupName the name of the resource group to list the resources from * @return the list of resources - * @throws CloudException exception thrown from the cloud - * @throws IOException exception thrown from serialization/deserialization */ - PagedList listByGroup(String resourceGroupName) throws CloudException, IOException; + PagedList listByGroup(String resourceGroupName); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java index d3e7c3d1ca81..1f9ec0342b1f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java @@ -306,7 +306,7 @@ public CreatableResourcesRoot createResource() { // resources. @Override - public CreatableResourcesRoot refresh() throws Exception { + public CreatableResourcesRoot refresh() { return null; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java index 3cb20c9a11e6..a73a47671799 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/GroupableResourcesImpl.java @@ -5,9 +5,6 @@ */ package com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation; -import java.io.IOException; - -import com.microsoft.azure.CloudException; import com.microsoft.azure.Resource; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; @@ -45,10 +42,10 @@ protected GroupableResourcesImpl( } @Override - public abstract T getByGroup(String groupName, String name) throws CloudException, IOException; + public abstract T getByGroup(String groupName, String name); @Override - public T getById(String id) throws CloudException, IOException { + public T getById(String id) { return this.getByGroup( ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/ReadableWrappersImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/ReadableWrappersImpl.java index 6bc8e90766d0..79cf88793a92 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/ReadableWrappersImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/ReadableWrappersImpl.java @@ -5,14 +5,12 @@ */ package com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation; -import java.io.IOException; -import java.util.List; - import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; import com.microsoft.azure.management.resources.implementation.PageImpl; -import com.microsoft.rest.RestException; + +import java.util.List; /** * Base class for readable wrapper collections, i.e. those whose models can only be read, not created. @@ -49,7 +47,7 @@ protected PagedList wrapList(List list) { page.setNextPageLink(null); PagedList pagedList = new PagedList(page) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return null; } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupPagedList.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupPagedList.java index 2ad8436c5039..4c79130be6e6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupPagedList.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/implementation/GroupPagedList.java @@ -10,9 +10,7 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.ResourceGroup; import com.microsoft.azure.management.resources.implementation.PageImpl; -import com.microsoft.rest.RestException; -import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; @@ -32,15 +30,11 @@ public abstract class GroupPagedList extends PagedList { */ public GroupPagedList(PagedList resourceGroupList) { this.resourceGroupItr = resourceGroupList.iterator(); - try { - setCurrentPage(nextPage("dummy")); - } catch (IOException e) { - throw new RuntimeException(e); - } + setCurrentPage(nextPage("dummy")); } @Override - public Page nextPage(String s) throws RestException, IOException { + public Page nextPage(String s) { if (resourceGroupItr.hasNext()) { ResourceGroup resourceGroup = resourceGroupItr.next(); PageImpl page = new PageImpl<>(); @@ -60,8 +54,6 @@ public Page nextPage(String s) throws RestException, IOException { * * @param resourceGroupName the name of the resource group * @return the list of resources in this group. - * @throws RestException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ - public abstract List listNextGroup(String resourceGroupName) throws RestException, IOException; + public abstract List listNextGroup(String resourceGroupName); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java index df35181f8576..7c0b1d7929a4 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java @@ -29,5 +29,5 @@ public interface SupportsListing { * @throws RestException exceptions thrown from the cloud. * @throws IOException exceptions thrown from serialization/deserialization. */ - PagedList list() throws RestException, IOException; + PagedList list(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java index c57e34a4983d..8975687a4046 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java @@ -19,7 +19,6 @@ public interface Refreshable { * Refreshes the resource to sync with Azure. * * @return the refreshed resource - * @throws Exception exceptions thrown from Azure */ - T refresh() throws Exception; + T refresh(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/IndexableRefreshableImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/IndexableRefreshableImpl.java index 56e00e6a4300..b7408ac4d2e4 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/IndexableRefreshableImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/implementation/IndexableRefreshableImpl.java @@ -22,5 +22,5 @@ protected IndexableRefreshableImpl() { } @Override - public abstract T refresh() throws Exception; + public abstract T refresh(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java index 8e84d87007c0..9d8a23de785d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java @@ -9,9 +9,7 @@ import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.implementation.PageImpl; -import com.microsoft.rest.RestException; -import java.io.IOException; import java.util.ArrayList; /** @@ -49,7 +47,7 @@ public PagedList convert(final PagedList uList) { } return new PagedList(vPage) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { Page uPage = uList.nextPage(nextPageLink); PageImpl vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.getNextPageLink()); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java index 25bd884bc15a..dfd2dfa3875c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java @@ -308,7 +308,7 @@ public Observable call(ResourceGroup resourceGroup) { } @Override - public Deployment refresh() throws Exception { + public Deployment refresh() { return null; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationImpl.java index 4ae2346c25d6..ea8a11c0d990 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationImpl.java @@ -77,7 +77,7 @@ public TargetResource targetResource() { } @Override - public DeploymentOperation refresh() throws Exception { + public DeploymentOperation refresh() { this.setInner(client.get(resourceGroupName, deploymentName, operationId())); return this; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsImpl.java index 0dba4a4aa4c6..44cede39c6c6 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentOperationsImpl.java @@ -6,15 +6,12 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Deployment; import com.microsoft.azure.management.resources.DeploymentOperation; import com.microsoft.azure.management.resources.DeploymentOperations; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation of {@link DeploymentOperations}. */ @@ -31,12 +28,12 @@ final class DeploymentOperationsImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(client.list(deployment.resourceGroupName(), deployment.name())); } @Override - public DeploymentOperation getById(String operationId) throws CloudException, IllegalArgumentException, IOException { + public DeploymentOperation getById(String operationId) { return wrapModel(client.get(deployment.resourceGroupName(), deployment.name(), operationId)); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java index ed2ca9d51b2b..e66360703b22 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java @@ -14,7 +14,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupPagedList; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import com.microsoft.rest.RestException; import java.io.IOException; import java.util.List; @@ -45,22 +44,22 @@ public Deployment typeConvert(DeploymentExtendedInner deploymentInner) { } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { return new GroupPagedList(this.resourceManager.resourceGroups().list()) { @Override - public List listNextGroup(String resourceGroupName) throws RestException, IOException { + public List listNextGroup(String resourceGroupName) { return converter.convert(client.list(resourceGroupName)); } }; } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return converter.convert(client.list(groupName)); } @Override - public Deployment getByName(String name) throws IOException, CloudException { + public Deployment getByName(String name) { for (ResourceGroup group : this.resourceManager.resourceGroups().list()) { DeploymentExtendedInner inner = client.get(group.name(), name); if (inner != null) { @@ -71,7 +70,7 @@ public Deployment getByName(String name) throws IOException, CloudException { } @Override - public Deployment getByGroup(String groupName, String name) throws IOException, CloudException { + public Deployment getByGroup(String groupName, String name) { return createFluentModel(client.get(groupName, name)); } @@ -81,7 +80,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { client.delete(groupName, name); } @@ -108,7 +107,7 @@ protected DeploymentImpl createFluentModel(DeploymentExtendedInner deploymentExt } @Override - public Deployment getById(String id) throws CloudException, IllegalArgumentException, IOException { + public Deployment getById(String id) { return this.getByGroup( ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesImpl.java index 34ade7e2cfcb..fd893f990e11 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesImpl.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Feature; import com.microsoft.azure.management.resources.Features; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation of {@link Features}. */ @@ -27,7 +24,7 @@ final class FeaturesImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(client.listAll()); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java index c1be1b5bbdf0..f896288c975d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java @@ -11,7 +11,6 @@ import com.microsoft.azure.management.resources.Feature; import com.microsoft.azure.management.resources.Features; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import com.microsoft.rest.RestException; import java.io.IOException; @@ -29,7 +28,7 @@ final class FeaturesInResourceProviderImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { PagedListConverter converter = new PagedListConverter() { @Override public Feature typeConvert(FeatureResultInner tenantInner) { @@ -45,7 +44,7 @@ public Feature register(String featureName) throws IOException, CloudException { } @Override - public Feature getByName(String name) throws CloudException, IOException { + public Feature getByName(String name) { return new FeatureImpl(client.get(resourceProviderNamespace, name)); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java index 578aab023e54..c4b4669c2b5b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourceImpl.java @@ -72,7 +72,7 @@ public Object properties() { } @Override - public GenericResource refresh() throws Exception { + public GenericResource refresh() { return null; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java index d683cb6c4443..233225f7df45 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java @@ -37,7 +37,7 @@ final class GenericResourcesImpl } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.serviceClient.resourceGroups().listResources(groupName)); } @@ -63,7 +63,7 @@ public boolean checkExistence(String resourceGroupName, String resourceProviderN } @Override - public GenericResource getById(String id) throws CloudException, IOException { + public GenericResource getById(String id) { return this.get( ResourceUtils.groupFromResourceId(id), ResourceUtils.resourceProviderFromResourceId(id), @@ -76,7 +76,7 @@ public GenericResource get( String resourceGroupName, String providerNamespace, String resourceType, - String name) throws CloudException, IOException { + String name) { PagedList genericResources = this.listByGroup(resourceGroupName); for (GenericResource resource : genericResources) { @@ -166,7 +166,7 @@ protected GenericResourceImpl wrapModel(GenericResourceInner inner) { } @Override - public GenericResource getByGroup(String groupName, String name) throws CloudException, IOException { + public GenericResource getByGroup(String groupName, String name) { // Not needed, can't be supported, provided only to satisfy GroupableResourceImpl's requirements return null; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java index 480e4cca4d79..648ce3de6f2b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java @@ -27,7 +27,7 @@ final class ProvidersImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(client.list()); } @@ -42,7 +42,7 @@ public Provider register(String resourceProviderNamespace) throws CloudException } @Override - public Provider getByName(String resourceProviderNamespace) throws CloudException, IOException { + public Provider getByName(String resourceProviderNamespace) { return wrapModel(client.get(resourceProviderNamespace)); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java index 4cd3d09c1d1e..bb73064c5587 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java @@ -120,7 +120,7 @@ public Observable applyAsync() { } @Override - public ResourceGroupImpl refresh() throws Exception { + public ResourceGroupImpl refresh() { this.setInner(client.get(this.key)); return this; } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java index f609c088d309..703629854d0b 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java @@ -34,12 +34,12 @@ final class ResourceGroupsImpl } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(client.list()); } @Override - public ResourceGroupImpl getByName(String name) throws CloudException, IOException { + public ResourceGroupImpl getByName(String name) { return wrapModel(client.get(name)); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java index 9226c2ed18ee..cb7118897913 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java @@ -11,10 +11,9 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Location; import com.microsoft.azure.management.resources.Subscription; +import com.microsoft.azure.management.resources.SubscriptionPolicies; import com.microsoft.azure.management.resources.fluentcore.model.implementation.IndexableWrapperImpl; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import com.microsoft.azure.management.resources.SubscriptionPolicies; -import com.microsoft.rest.RestException; import java.io.IOException; import java.util.List; @@ -71,7 +70,7 @@ private PagedList toPagedList(List list) { page.setNextPageLink(null); return new PagedList(page) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return null; } }; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsImpl.java index 948704d62b41..0ebea48117e2 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionsImpl.java @@ -6,14 +6,10 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Subscription; import com.microsoft.azure.management.resources.Subscriptions; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import com.microsoft.rest.RestException; - -import java.io.IOException; /** * The implementation of {@link Subscriptions}. @@ -27,7 +23,7 @@ final class SubscriptionsImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { PagedListConverter converter = new PagedListConverter() { @Override public Subscription typeConvert(SubscriptionInner subscriptionInner) { @@ -39,7 +35,7 @@ public Subscription typeConvert(SubscriptionInner subscriptionInner) { @Override // Gets a specific resource group - public SubscriptionImpl getByName(String name) throws CloudException, IOException { + public SubscriptionImpl getByName(String name) { SubscriptionInner subscription = client.get(name); return new SubscriptionImpl(subscription, client); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsImpl.java index 4d760e5b6f0c..9ab02bc03364 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/TenantsImpl.java @@ -10,9 +10,6 @@ import com.microsoft.azure.management.resources.Tenant; import com.microsoft.azure.management.resources.Tenants; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import com.microsoft.rest.RestException; - -import java.io.IOException; /** * Implementation for {@link Tenants}. @@ -26,7 +23,7 @@ final class TenantsImpl } @Override - public PagedList list() throws RestException, IOException { + public PagedList list() { PagedListConverter converter = new PagedListConverter() { @Override public Tenant typeConvert(TenantIdDescriptionInner tenantInner) { diff --git a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java index 31e258ae08a1..dbc779b656eb 100644 --- a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java +++ b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java @@ -7,7 +7,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupPagedList; import com.microsoft.azure.management.resources.implementation.PageImpl; import com.microsoft.azure.management.resources.implementation.ResourceGroupInner; -import com.microsoft.rest.RestException; import org.junit.Assert; import org.junit.Test; @@ -85,7 +84,7 @@ public void isResourceLoadedLazily() { PagedList pagedResourceList = new PagedList(pages.get(0)) { @Override - public Page nextPage(String nextLink) throws RestException, IOException { + public Page nextPage(String nextLink) { Assert.assertSame(itr.next(), nextLink); int index = Integer.parseInt(nextLink); return pages.get(index); @@ -94,7 +93,7 @@ public Page nextPage(String nextLink) throws RestException, IOExc GroupPagedList groupedResourceList = new GroupPagedList(pagedResourceList) { @Override - public List listNextGroup(String s) throws RestException, IOException { + public List listNextGroup(String s) { List groupItems = new ArrayList<>(); groupItems.add(s + "Vm1"); groupItems.add(s + "Vm2"); @@ -159,7 +158,7 @@ public String key() { } @Override - public ResourceGroup refresh() throws Exception { + public ResourceGroup refresh() { return null; } diff --git a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/childresource/PulletImpl.java b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/childresource/PulletImpl.java index 0a5dc17baf34..db55a6c340f8 100644 --- a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/childresource/PulletImpl.java +++ b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/childresource/PulletImpl.java @@ -81,7 +81,7 @@ public Observable deleteAsync() { } @Override - public PulletImpl refresh() throws Exception { + public PulletImpl refresh() { return null; } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java index 109b71c84896..508795dce67a 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.storage.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupableResourceImpl; import com.microsoft.azure.management.storage.AccessTier; import com.microsoft.azure.management.storage.CustomDomain; @@ -23,7 +22,6 @@ import rx.functions.Action1; import rx.functions.Func1; -import java.io.IOException; import java.util.List; /** @@ -138,7 +136,7 @@ public List regenerateKey(String keyName) { } @Override - public StorageAccountImpl refresh() throws Exception { + public StorageAccountImpl refresh() { StorageAccountInner response = this.client.getProperties(this.resourceGroupName(), this.name()); this.setInner(response); diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java index 42394d94ea0b..dd5e5a813d21 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java @@ -41,17 +41,17 @@ public CheckNameAvailabilityResult checkNameAvailability(String name) throws Clo } @Override - public PagedList list() throws CloudException, IOException { + public PagedList list() { return wrapList(this.innerCollection.list()); } @Override - public PagedList listByGroup(String groupName) throws CloudException, IOException { + public PagedList listByGroup(String groupName) { return wrapList(this.innerCollection.listByResourceGroup(groupName)); } @Override - public StorageAccount getByGroup(String groupName, String name) throws CloudException, IOException { + public StorageAccount getByGroup(String groupName, String name) { return wrapModel(this.innerCollection.getProperties(groupName, name)); } @@ -61,7 +61,7 @@ public void delete(String id) throws Exception { } @Override - public void delete(String groupName, String name) throws Exception { + public void delete(String groupName, String name) { this.innerCollection.delete(groupName, name); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesImpl.java index 55ccef9406e6..9b9e27843c6e 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/UsagesImpl.java @@ -1,13 +1,10 @@ package com.microsoft.azure.management.storage.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; import com.microsoft.azure.management.storage.StorageUsage; import com.microsoft.azure.management.storage.Usages; -import java.io.IOException; - /** * The implementation of {@link Usages}. */ @@ -20,7 +17,7 @@ class UsagesImpl extends ReadableWrappersImpl list() throws CloudException, IOException { + public PagedList list() { return wrapList(client.usages().list()); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java index 00544c2f9e8c..a81e24655eae 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificateOrdersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -144,12 +143,9 @@ interface CertificateOrdersService { * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateOrderCertificateInner object if successful. */ - public CertificateOrderCertificateInner getCertificate(String resourceGroupName, String certificateOrderName, String name) throws CloudException, IOException, IllegalArgumentException { + public CertificateOrderCertificateInner getCertificate(String resourceGroupName, String certificateOrderName, String name) { return getCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); } @@ -235,12 +231,9 @@ private ServiceResponse getCertificateDelegate * @param certificateOrderName Certificate name * @param name Certificate name * @param keyVaultCertificate Key Vault secret csm Id - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateOrderCertificateInner object if successful. */ - public CertificateOrderCertificateInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) throws CloudException, IOException, IllegalArgumentException { + public CertificateOrderCertificateInner createOrUpdateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { return createOrUpdateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().getBody(); } @@ -332,12 +325,9 @@ private ServiceResponse createOrUpdateCertific * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name * @param name Certificate name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteCertificate(String resourceGroupName, String certificateOrderName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteCertificate(String resourceGroupName, String certificateOrderName, String name) { return deleteCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).toBlocking().single().getBody(); } @@ -423,12 +413,9 @@ private ServiceResponse deleteCertificateDelegate(Response * @param certificateOrderName Certificate name * @param name Certificate name * @param keyVaultCertificate Key Vault secret csm Id - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateOrderCertificateInner object if successful. */ - public CertificateOrderCertificateInner updateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) throws CloudException, IOException, IllegalArgumentException { + public CertificateOrderCertificateInner updateCertificate(String resourceGroupName, String certificateOrderName, String name, CertificateOrderCertificateInner keyVaultCertificate) { return updateCertificateWithServiceResponseAsync(resourceGroupName, certificateOrderName, name, keyVaultCertificate).toBlocking().single().getBody(); } @@ -519,12 +506,9 @@ private ServiceResponse updateCertificateDeleg * * @param resourceGroupName Azure resource group name * @param name Certificate name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateOrderInner object if successful. */ - public CertificateOrderInner getCertificateOrder(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public CertificateOrderInner getCertificateOrder(String resourceGroupName, String name) { return getCertificateOrderWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -603,12 +587,9 @@ private ServiceResponse getCertificateOrderDelegate(Respo * @param resourceGroupName Azure resource group name * @param name Certificate name * @param certificateDistinguishedName Distinguished name to be used for purchasing certificate - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateOrderInner object if successful. */ - public CertificateOrderInner createOrUpdateCertificateOrder(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) throws CloudException, IOException, IllegalArgumentException { + public CertificateOrderInner createOrUpdateCertificateOrder(String resourceGroupName, String name, CertificateOrderInner certificateDistinguishedName) { return createOrUpdateCertificateOrderWithServiceResponseAsync(resourceGroupName, name, certificateDistinguishedName).toBlocking().single().getBody(); } @@ -693,12 +674,9 @@ private ServiceResponse createOrUpdateCertificateOrderDel * * @param resourceGroupName Azure resource group name * @param name Certificate name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteCertificateOrder(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteCertificateOrder(String resourceGroupName, String name) { return deleteCertificateOrderWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -777,12 +755,9 @@ private ServiceResponse deleteCertificateOrderDelegate(Response updateCertificateOrderDelegate(Re * Get certificate orders in a resource group. * * @param resourceGroupName Azure resource group name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateOrderInner> object if successful. */ - public PagedList getCertificateOrders(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificateOrders(final String resourceGroupName) { ServiceResponse> response = getCertificateOrdersSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -978,16 +950,13 @@ private ServiceResponse> getCertificateOrdersDel * * @param resourceGroupName Azure resource group name * @param certificateOrderName Certificate name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateOrderCertificateInner> object if successful. */ - public PagedList getCertificates(final String resourceGroupName, final String certificateOrderName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificates(final String resourceGroupName, final String certificateOrderName) { ServiceResponse> response = getCertificatesSinglePageAsync(resourceGroupName, certificateOrderName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1098,12 +1067,9 @@ private ServiceResponse> getCertifica * @param resourceGroupName Azure resource group name * @param name Certificate name * @param reissueCertificateOrderRequest Reissue parameters - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object reissueCertificateOrder(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) throws CloudException, IOException, IllegalArgumentException { + public Object reissueCertificateOrder(String resourceGroupName, String name, ReissueCertificateOrderRequestInner reissueCertificateOrderRequest) { return reissueCertificateOrderWithServiceResponseAsync(resourceGroupName, name, reissueCertificateOrderRequest).toBlocking().single().getBody(); } @@ -1189,12 +1155,9 @@ private ServiceResponse reissueCertificateOrderDelegate(Response renewCertificateOrderDelegate(Response retrieveCertificateActions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public List retrieveCertificateActions(String resourceGroupName, String name) { return retrieveCertificateActionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1362,12 +1322,9 @@ private ServiceResponse> retrieveCertificateAc * * @param resourceGroupName Azure resource group name * @param name Certificate order name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<CertificateEmailInner> object if successful. */ - public List retrieveCertificateEmailHistory(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public List retrieveCertificateEmailHistory(String resourceGroupName, String name) { return retrieveCertificateEmailHistoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1445,12 +1402,9 @@ private ServiceResponse> retrieveCertificateEmailHis * * @param resourceGroupName Azure resource group name * @param name Certificate order name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object resendCertificateEmail(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object resendCertificateEmail(String resourceGroupName, String name) { return resendCertificateEmailWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1528,12 +1482,9 @@ private ServiceResponse resendCertificateEmailDelegate(Response verifyDomainOwnershipDelegate(Response getCertificateOrdersNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificateOrdersNext(final String nextPageLink) { ServiceResponse> response = getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1716,16 +1664,13 @@ private ServiceResponse> getCertificateOrdersNex * List all certificates associated with a certificate order (only one certificate can be associated with an order at a time). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateOrderCertificateInner> object if successful. */ - public PagedList getCertificatesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificatesNext(final String nextPageLink) { ServiceResponse> response = getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java index 621783bc44e5..3bb4718d7373 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/CertificatesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -113,16 +112,13 @@ interface CertificatesService { * Get certificates for a subscription in the specified resource group. * * @param resourceGroupName Name of the resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getCertificates(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificates(final String resourceGroupName) { ServiceResponse> response = getCertificatesSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -225,12 +221,9 @@ private ServiceResponse> getCertificatesDelegate(Resp * * @param resourceGroupName Name of the resource group * @param name Name of the certificate. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateInner object if successful. */ - public CertificateInner getCertificate(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public CertificateInner getCertificate(String resourceGroupName, String name) { return getCertificateWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -309,12 +302,9 @@ private ServiceResponse getCertificateDelegate(Response createOrUpdateCertificateDelegate(Resp * * @param resourceGroupName Name of the resource group * @param name Name of the certificate to be deleted. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteCertificate(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteCertificate(String resourceGroupName, String name) { return deleteCertificateWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -483,12 +470,9 @@ private ServiceResponse deleteCertificateDelegate(Response * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @param certificateEnvelope Details of certificate if it exists already. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CertificateInner object if successful. */ - public CertificateInner updateCertificate(String resourceGroupName, String name, CertificateInner certificateEnvelope) throws CloudException, IOException, IllegalArgumentException { + public CertificateInner updateCertificate(String resourceGroupName, String name, CertificateInner certificateEnvelope) { return updateCertificateWithServiceResponseAsync(resourceGroupName, name, certificateEnvelope).toBlocking().single().getBody(); } @@ -572,12 +556,9 @@ private ServiceResponse updateCertificateDelegate(Response getCsrs(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public List getCsrs(String resourceGroupName) { return getCsrsWithServiceResponseAsync(resourceGroupName).toBlocking().single().getBody(); } @@ -649,12 +630,9 @@ private ServiceResponse> getCsrsDelegate(Response r * * @param resourceGroupName Name of the resource group * @param name Name of the certificate. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CsrInner object if successful. */ - public CsrInner getCsr(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public CsrInner getCsr(String resourceGroupName, String name) { return getCsrWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -733,12 +711,9 @@ private ServiceResponse getCsrDelegate(Response response * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @param csrEnvelope Details of certificate signing request if it exists already. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CsrInner object if successful. */ - public CsrInner createOrUpdateCsr(String resourceGroupName, String name, CsrInner csrEnvelope) throws CloudException, IOException, IllegalArgumentException { + public CsrInner createOrUpdateCsr(String resourceGroupName, String name, CsrInner csrEnvelope) { return createOrUpdateCsrWithServiceResponseAsync(resourceGroupName, name, csrEnvelope).toBlocking().single().getBody(); } @@ -823,12 +798,9 @@ private ServiceResponse createOrUpdateCsrDelegate(Response deleteCsrDelegate(Response respons * @param resourceGroupName Name of the resource group * @param name Name of the certificate. * @param csrEnvelope Details of certificate signing request if it exists already. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the CsrInner object if successful. */ - public CsrInner updateCsr(String resourceGroupName, String name, CsrInner csrEnvelope) throws CloudException, IOException, IllegalArgumentException { + public CsrInner updateCsr(String resourceGroupName, String name, CsrInner csrEnvelope) { return updateCsrWithServiceResponseAsync(resourceGroupName, name, csrEnvelope).toBlocking().single().getBody(); } @@ -996,16 +965,13 @@ private ServiceResponse updateCsrDelegate(Response respo * Get certificates for a subscription in the specified resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getCertificatesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getCertificatesNext(final String nextPageLink) { ServiceResponse> response = getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java index c89646225005..a42a748e3ee0 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ClassicMobileServicesInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -81,16 +80,13 @@ interface ClassicMobileServicesService { * Get all mobile services in a resource group. * * @param resourceGroupName Name of resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ClassicMobileServiceInner> object if successful. */ - public PagedList getClassicMobileServices(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getClassicMobileServices(final String resourceGroupName) { ServiceResponse> response = getClassicMobileServicesSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -193,12 +189,9 @@ private ServiceResponse> getClassicMobileSer * * @param resourceGroupName Name of resource group * @param name Name of mobile service - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ClassicMobileServiceInner object if successful. */ - public ClassicMobileServiceInner getClassicMobileService(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ClassicMobileServiceInner getClassicMobileService(String resourceGroupName, String name) { return getClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -276,12 +269,9 @@ private ServiceResponse getClassicMobileServiceDelega * * @param resourceGroupName Name of resource group * @param name Name of mobile service - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteClassicMobileService(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteClassicMobileService(String resourceGroupName, String name) { return deleteClassicMobileServiceWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -358,16 +348,13 @@ private ServiceResponse deleteClassicMobileServiceDelegate(Response getClassicMobileServicesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getClassicMobileServicesNext(final String nextPageLink) { ServiceResponse> response = getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java index e80333101335..b2ee42f85103 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/DomainsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -97,16 +96,13 @@ interface DomainsService { * Lists domains under a resource group. * * @param resourceGroupName Name of the resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DomainInner> object if successful. */ - public PagedList getDomains(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDomains(final String resourceGroupName) { ServiceResponse> response = getDomainsSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -209,12 +205,9 @@ private ServiceResponse> getDomainsDelegate(Response getDomainDelegate(Response re * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain * @param domain Domain registration information - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DomainInner object if successful. */ - public DomainInner createOrUpdateDomain(String resourceGroupName, String domainName, DomainInner domain) throws CloudException, IOException, IllegalArgumentException { + public DomainInner createOrUpdateDomain(String resourceGroupName, String domainName, DomainInner domain) { return createOrUpdateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().getBody(); } @@ -384,12 +374,9 @@ private ServiceResponse createOrUpdateDomainDelegate(Response> call(Response response) * @param resourceGroupName Name of the resource group * @param domainName Name of the domain * @param forceHardDeleteDomain If true then the domain will be deleted immediately instead of after 24 hours - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteDomain(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) throws CloudException, IOException, IllegalArgumentException { + public Object deleteDomain(String resourceGroupName, String domainName, Boolean forceHardDeleteDomain) { return deleteDomainWithServiceResponseAsync(resourceGroupName, domainName, forceHardDeleteDomain).toBlocking().single().getBody(); } @@ -549,12 +533,9 @@ private ServiceResponse deleteDomainDelegate(Response resp * @param resourceGroupName &gt;Name of the resource group * @param domainName Name of the domain * @param domain Domain registration information - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DomainInner object if successful. */ - public DomainInner updateDomain(String resourceGroupName, String domainName, DomainInner domain) throws CloudException, IOException, IllegalArgumentException { + public DomainInner updateDomain(String resourceGroupName, String domainName, DomainInner domain) { return updateDomainWithServiceResponseAsync(resourceGroupName, domainName, domain).toBlocking().single().getBody(); } @@ -641,12 +622,9 @@ private ServiceResponse updateDomainDelegate(Response * @param resourceGroupName Name of the resource group * @param domainName Name of the domain * @param operationId Domain purchase operation Id - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DomainInner object if successful. */ - public DomainInner getDomainOperation(String resourceGroupName, String domainName, String operationId) throws CloudException, IOException, IllegalArgumentException { + public DomainInner getDomainOperation(String resourceGroupName, String domainName, String operationId) { return getDomainOperationWithServiceResponseAsync(resourceGroupName, domainName, operationId).toBlocking().single().getBody(); } @@ -731,16 +709,13 @@ private ServiceResponse getDomainOperationDelegate(Response getDomainsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDomainsNext(final String nextPageLink) { ServiceResponse> response = getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java index b3fb022c9eb5..9f256a3dd253 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalCertificateOrdersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -78,16 +77,13 @@ interface GlobalCertificateOrdersService { /** * Lists all domains in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateOrderInner> object if successful. */ - public PagedList getAllCertificateOrders() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllCertificateOrders() { ServiceResponse> response = getAllCertificateOrdersSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -182,12 +178,9 @@ private ServiceResponse> getAllCertificateOrders * Validate certificate purchase information. * * @param certificateOrder Certificate order - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object validateCertificatePurchaseInformation(CertificateOrderInner certificateOrder) throws CloudException, IOException, IllegalArgumentException { + public Object validateCertificatePurchaseInformation(CertificateOrderInner certificateOrder) { return validateCertificatePurchaseInformationWithServiceResponseAsync(certificateOrder).toBlocking().single().getBody(); } @@ -259,16 +252,13 @@ private ServiceResponse validateCertificatePurchaseInformationDelegate(R * Lists all domains in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateOrderInner> object if successful. */ - public PagedList getAllCertificateOrdersNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllCertificateOrdersNext(final String nextPageLink) { ServiceResponse> response = getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllCertificateOrdersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java index 9289a98ccf23..c8a1e17a8bf2 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalDomainRegistrationsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -94,16 +93,13 @@ interface GlobalDomainRegistrationsService { /** * Lists all domains in a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DomainInner> object if successful. */ - public PagedList getAllDomains() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllDomains() { ServiceResponse> response = getAllDomainsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -197,12 +193,9 @@ private ServiceResponse> getAllDomainsDelegate(Response getDomainControlCent * Validates domain registration information. * * @param domainRegistrationInput Domain registration information - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object validateDomainPurchaseInformation(DomainRegistrationInputInner domainRegistrationInput) throws CloudException, IOException, IllegalArgumentException { + public Object validateDomainPurchaseInformation(DomainRegistrationInputInner domainRegistrationInput) { return validateDomainPurchaseInformationWithServiceResponseAsync(domainRegistrationInput).toBlocking().single().getBody(); } @@ -343,12 +333,9 @@ private ServiceResponse validateDomainPurchaseInformationDelegate(Respon /** * Checks if a domain is available for registration. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DomainAvailablilityCheckResultInner object if successful. */ - public DomainAvailablilityCheckResultInner checkDomainAvailability() throws CloudException, IOException, IllegalArgumentException { + public DomainAvailablilityCheckResultInner checkDomainAvailability() { return checkDomainAvailabilityWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -409,12 +396,9 @@ public Observable> call(Res * Checks if a domain is available for registration. * * @param name Name of the object - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DomainAvailablilityCheckResultInner object if successful. */ - public DomainAvailablilityCheckResultInner checkDomainAvailability(String name) throws CloudException, IOException, IllegalArgumentException { + public DomainAvailablilityCheckResultInner checkDomainAvailability(String name) { return checkDomainAvailabilityWithServiceResponseAsync(name).toBlocking().single().getBody(); } @@ -484,16 +468,13 @@ private ServiceResponse checkDomainAvailabi * Lists domain recommendations based on keywords. * * @param parameters Domain recommendation search parameters - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NameIdentifierInner> object if successful. */ - public PagedList listDomainRecommendations(final DomainRecommendationSearchParametersInner parameters) throws CloudException, IOException, IllegalArgumentException { + public PagedList listDomainRecommendations(final DomainRecommendationSearchParametersInner parameters) { ServiceResponse> response = listDomainRecommendationsSinglePageAsync(parameters).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -596,16 +577,13 @@ private ServiceResponse> listDomainRecommendations * Lists all domains in a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DomainInner> object if successful. */ - public PagedList getAllDomainsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllDomainsNext(final String nextPageLink) { ServiceResponse> response = getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -702,16 +680,13 @@ private ServiceResponse> getAllDomainsNextDelegate(Respons * Lists domain recommendations based on keywords. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<NameIdentifierInner> object if successful. */ - public PagedList listDomainRecommendationsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listDomainRecommendationsNext(final String nextPageLink) { ServiceResponse> response = listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listDomainRecommendationsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java index 06042400c71d..4e146a8fa51e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalResourceGroupsInner.java @@ -64,11 +64,8 @@ interface GlobalResourceGroupsService { * * @param resourceGroupName the String value * @param moveResourceEnvelope the CsmMoveResourceEnvelopeInner value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters */ - public void moveResources(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) throws CloudException, IOException, IllegalArgumentException { + public void moveResources(String resourceGroupName, CsmMoveResourceEnvelopeInner moveResourceEnvelope) { moveResourcesWithServiceResponseAsync(resourceGroupName, moveResourceEnvelope).toBlocking().single().getBody(); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java index fdbb078ce1d9..a0be88ef7bd9 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/GlobalsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -147,12 +146,9 @@ interface GlobalsService { /** * Gets publishing credentials for the subscription owner. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner getSubscriptionPublishingCredentials() throws CloudException, IOException, IllegalArgumentException { + public UserInner getSubscriptionPublishingCredentials() { return getSubscriptionPublishingCredentialsWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -217,12 +213,9 @@ private ServiceResponse getSubscriptionPublishingCredentialsDelegate( * Updates publishing credentials for the subscription owner. * * @param requestMessage requestMessage with new publishing credentials - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner updateSubscriptionPublishingCredentials(UserInner requestMessage) throws CloudException, IOException, IllegalArgumentException { + public UserInner updateSubscriptionPublishingCredentials(UserInner requestMessage) { return updateSubscriptionPublishingCredentialsWithServiceResponseAsync(requestMessage).toBlocking().single().getBody(); } @@ -293,16 +286,13 @@ private ServiceResponse updateSubscriptionPublishingCredentialsDelega /** * Gets list of available geo regions. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<GeoRegionInner> object if successful. */ - public PagedList getSubscriptionGeoRegions() throws CloudException, IOException, IllegalArgumentException { + public PagedList getSubscriptionGeoRegions() { ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -391,16 +381,13 @@ public Observable>> call(Response getSubscriptionGeoRegions(final String sku) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSubscriptionGeoRegions(final String sku) { ServiceResponse> response = getSubscriptionGeoRegionsSinglePageAsync(sku).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -498,16 +485,13 @@ private ServiceResponse> getSubscriptionGeoRegionsDeleg /** * Get all certificates for a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getAllCertificates() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllCertificates() { ServiceResponse> response = getAllCertificatesSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -601,16 +585,13 @@ private ServiceResponse> getAllCertificatesDelegate(R /** * Gets all App Service Plans for a subcription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getAllServerFarms() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllServerFarms() { ServiceResponse> response = getAllServerFarmsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -700,16 +681,13 @@ public Observable>> call(Respon * * @param detailed False to return a subset of App Service Plan properties, true to return all of the properties. Retrieval of all properties may increase the API latency. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getAllServerFarms(final Boolean detailed) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllServerFarms(final Boolean detailed) { ServiceResponse> response = getAllServerFarmsSinglePageAsync(detailed).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -811,16 +789,13 @@ private ServiceResponse> getAllServerFarmsD /** * Gets all Web Apps for a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getAllSites() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllSites() { ServiceResponse> response = getAllSitesSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -914,16 +889,13 @@ private ServiceResponse> getAllSitesDelegate(Response getAllHostingEnvironments() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllHostingEnvironments() { ServiceResponse> response = getAllHostingEnvironmentsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1017,16 +989,13 @@ private ServiceResponse> getAllHostingEnvironm /** * Gets all managed hosting environments for a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ManagedHostingEnvironmentInner> object if successful. */ - public PagedList getAllManagedHostingEnvironments() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllManagedHostingEnvironments() { ServiceResponse> response = getAllManagedHostingEnvironmentsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1120,16 +1089,13 @@ private ServiceResponse> getAllManagedH /** * Gets all mobile services for a subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ClassicMobileServiceInner> object if successful. */ - public PagedList getAllClassicMobileServices() throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllClassicMobileServices() { ServiceResponse> response = getAllClassicMobileServicesSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1223,12 +1189,9 @@ private ServiceResponse> getAllClassicMobile /** * List premier add on offers. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object listPremierAddOnOffers() throws CloudException, IOException, IllegalArgumentException { + public Object listPremierAddOnOffers() { return listPremierAddOnOffersWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -1293,12 +1256,9 @@ private ServiceResponse listPremierAddOnOffersDelegate(Response isHostingEnvironmentNameAvailableDelegate(Respon * Whether hosting environment name is available. * * @param name Hosting environment name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object isHostingEnvironmentWithLegacyNameAvailable(String name) throws CloudException, IOException, IllegalArgumentException { + public Object isHostingEnvironmentWithLegacyNameAvailable(String name) { return isHostingEnvironmentWithLegacyNameAvailableWithServiceResponseAsync(name).toBlocking().single().getBody(); } @@ -1445,12 +1402,9 @@ private ServiceResponse isHostingEnvironmentWithLegacyNameAvailableDeleg * Check if resource name is available. * * @param request Name availability request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceNameAvailabilityInner object if successful. */ - public ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public ResourceNameAvailabilityInner checkNameAvailability(ResourceNameAvailabilityRequestInner request) { return checkNameAvailabilityWithServiceResponseAsync(request).toBlocking().single().getBody(); } @@ -1522,16 +1476,13 @@ private ServiceResponse checkNameAvailabilityDele * Gets list of available geo regions. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<GeoRegionInner> object if successful. */ - public PagedList getSubscriptionGeoRegionsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSubscriptionGeoRegionsNext(final String nextPageLink) { ServiceResponse> response = getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSubscriptionGeoRegionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1628,16 +1579,13 @@ private ServiceResponse> getSubscriptionGeoRegionsNextD * Get all certificates for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CertificateInner> object if successful. */ - public PagedList getAllCertificatesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllCertificatesNext(final String nextPageLink) { ServiceResponse> response = getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllCertificatesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1734,16 +1682,13 @@ private ServiceResponse> getAllCertificatesNextDelega * Gets all App Service Plans for a subcription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getAllServerFarmsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllServerFarmsNext(final String nextPageLink) { ServiceResponse> response = getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1840,16 +1785,13 @@ private ServiceResponse> getAllServerFarmsN * Gets all Web Apps for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getAllSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllSitesNext(final String nextPageLink) { ServiceResponse> response = getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1946,16 +1888,13 @@ private ServiceResponse> getAllSitesNextDelegate(Response getAllHostingEnvironmentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllHostingEnvironmentsNext(final String nextPageLink) { ServiceResponse> response = getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2052,16 +1991,13 @@ private ServiceResponse> getAllHostingEnvironm * Gets all managed hosting environments for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ManagedHostingEnvironmentInner> object if successful. */ - public PagedList getAllManagedHostingEnvironmentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllManagedHostingEnvironmentsNext(final String nextPageLink) { ServiceResponse> response = getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2158,16 +2094,13 @@ private ServiceResponse> getAllManagedH * Gets all mobile services for a subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ClassicMobileServiceInner> object if successful. */ - public PagedList getAllClassicMobileServicesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getAllClassicMobileServicesNext(final String nextPageLink) { ServiceResponse> response = getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getAllClassicMobileServicesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java index 1a59eb2dcdfb..dbe31b3792bf 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/HostingEnvironmentsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -327,12 +326,9 @@ interface HostingEnvironmentsService { * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostingEnvironmentInner object if successful. */ - public HostingEnvironmentInner getHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public HostingEnvironmentInner getHostingEnvironment(String resourceGroupName, String name) { return getHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -411,13 +407,9 @@ private ServiceResponse getHostingEnvironmentDelegate(R * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the HostingEnvironmentInner object if successful. */ - public HostingEnvironmentInner createOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public HostingEnvironmentInner createOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { return createOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().last().getBody(); } @@ -486,12 +478,9 @@ public Observable> createOrUpdateHostin * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param hostingEnvironmentEnvelope Properties of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostingEnvironmentInner object if successful. */ - public HostingEnvironmentInner beginCreateOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) throws CloudException, IOException, IllegalArgumentException { + public HostingEnvironmentInner beginCreateOrUpdateHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner hostingEnvironmentEnvelope) { return beginCreateOrUpdateHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, hostingEnvironmentEnvelope).toBlocking().single().getBody(); } @@ -580,13 +569,9 @@ private ServiceResponse beginCreateOrUpdateHostingEnvir * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the Object object if successful. */ - public Object deleteHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public Object deleteHostingEnvironment(String resourceGroupName, String name) { return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } @@ -648,13 +633,9 @@ public Observable> deleteHostingEnvironmentWithServiceRe * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the Object object if successful. */ - public Object deleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public Object deleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { return deleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().getBody(); } @@ -718,12 +699,9 @@ public Observable> deleteHostingEnvironmentWithServiceRe * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginDeleteHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object beginDeleteHostingEnvironment(String resourceGroupName, String name) { return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -796,12 +774,9 @@ public Observable> call(Response response) * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param forceDelete Delete even if the hostingEnvironment (App Service Environment) contains resources - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginDeleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) throws CloudException, IOException, IllegalArgumentException { + public Object beginDeleteHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { return beginDeleteHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().getBody(); } @@ -886,12 +861,9 @@ private ServiceResponse beginDeleteHostingEnvironmentDelegate(Response getHostingEnvironmentDiagnostics(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public List getHostingEnvironmentDiagnostics(String resourceGroupName, String name) { return getHostingEnvironmentDiagnosticsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -970,12 +942,9 @@ private ServiceResponse> getHostingEnvi * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param diagnosticsName Name of the diagnostics - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostingEnvironmentDiagnosticsInner object if successful. */ - public HostingEnvironmentDiagnosticsInner getHostingEnvironmentDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) throws CloudException, IOException, IllegalArgumentException { + public HostingEnvironmentDiagnosticsInner getHostingEnvironmentDiagnosticsItem(String resourceGroupName, String name, String diagnosticsName) { return getHostingEnvironmentDiagnosticsItemWithServiceResponseAsync(resourceGroupName, name, diagnosticsName).toBlocking().single().getBody(); } @@ -1059,16 +1028,13 @@ private ServiceResponse getHostingEnvironmen * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<StampCapacityInner> object if successful. */ - public PagedList getHostingEnvironmentCapacities(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentCapacities(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentCapacitiesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1178,12 +1144,9 @@ private ServiceResponse> getHostingEnvironmentCapac * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AddressResponseInner object if successful. */ - public AddressResponseInner getHostingEnvironmentVips(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public AddressResponseInner getHostingEnvironmentVips(String resourceGroupName, String name) { return getHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1260,16 +1223,13 @@ private ServiceResponse getHostingEnvironmentVipsDelegate( * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param resourceGroupName Name of resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostingEnvironmentInner> object if successful. */ - public PagedList getHostingEnvironments(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironments(final String resourceGroupName) { ServiceResponse> response = getHostingEnvironmentsSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1372,12 +1332,9 @@ private ServiceResponse> getHostingEnvironment * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object rebootHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object rebootHostingEnvironment(String resourceGroupName, String name) { return rebootHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1458,12 +1415,9 @@ private ServiceResponse rebootHostingEnvironmentDelegate(Response getHostingEnvironmentOperationsDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param operationId operation identifier GUID - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) throws CloudException, IOException, IllegalArgumentException { + public Object getHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) { return getHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); } @@ -1634,16 +1585,13 @@ private ServiceResponse getHostingEnvironmentOperationDelegate(Response< * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMetrics(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMetrics(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1750,16 +1698,13 @@ public Observable>> call(Response getHostingEnvironmentMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { ServiceResponse> response = getHostingEnvironmentMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1877,12 +1822,9 @@ private ServiceResponse> getHostingEnvironmentMetr * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the MetricDefinitionInner object if successful. */ - public MetricDefinitionInner getHostingEnvironmentMetricDefinitions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public MetricDefinitionInner getHostingEnvironmentMetricDefinitions(String resourceGroupName, String name) { return getHostingEnvironmentMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1960,16 +1902,13 @@ private ServiceResponse getHostingEnvironmentMetricDefini * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getHostingEnvironmentUsages(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentUsages(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2074,16 +2013,13 @@ public Observable>> call(Response getHostingEnvironmentUsages(final String resourceGroupName, final String name, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentUsages(final String resourceGroupName, final String name, final String filter) { ServiceResponse> response = getHostingEnvironmentUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2197,16 +2133,13 @@ private ServiceResponse> getHostingEnvironmentUsage * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2319,16 +2252,13 @@ public Observable>> call(Response getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleMetrics(final String resourceGroupName, final String name, final String startTime, final String endTime, final String timeGrain, final Boolean details, final String filter) { ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsSinglePageAsync(resourceGroupName, name, startTime, endTime, timeGrain, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2459,16 +2389,13 @@ private ServiceResponse> getHostingEnvironmentMult * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName) { ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2583,16 +2510,13 @@ public Observable>> call(Response getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerMetrics(final String resourceGroupName, final String name, final String workerPoolName, final Boolean details, final String filter) { ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsSinglePageAsync(resourceGroupName, name, workerPoolName, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2717,16 +2641,13 @@ private ServiceResponse> getHostingEnvironmentWebW * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricDefinitions(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleMetricDefinitions(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentMultiRoleMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2837,16 +2758,13 @@ private ServiceResponse> getHostingEnvironmentMu * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerMetricDefinitions(final String resourceGroupName, final String name, final String workerPoolName) { ServiceResponse> response = getHostingEnvironmentWebWorkerMetricDefinitionsSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2963,16 +2881,13 @@ private ServiceResponse> getHostingEnvironmentWe * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleUsages(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleUsages(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentMultiRoleUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3083,16 +2998,13 @@ private ServiceResponse> getHostingEnvironmentMultiRoleUsag * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerUsages(final String resourceGroupName, final String name, final String workerPoolName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerUsages(final String resourceGroupName, final String name, final String workerPoolName) { ServiceResponse> response = getHostingEnvironmentWebWorkerUsagesSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3209,16 +3121,13 @@ private ServiceResponse> getHostingEnvironmentWebWorkerUsag * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3323,16 +3232,13 @@ public Observable>> call(Response * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param propertiesToInclude Comma separated list of site properties to include - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) { ServiceResponse> response = getHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3446,16 +3352,13 @@ private ServiceResponse> getHostingEnvironmentSitesDelegate( * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3565,16 +3468,13 @@ private ServiceResponse> getHostingEnvironm * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getHostingEnvironmentServerFarms(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentServerFarms(final String resourceGroupName, final String name) { ServiceResponse> response = getHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3684,16 +3584,13 @@ private ServiceResponse> getHostingEnvironm * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getMultiRolePools(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getMultiRolePools(final String resourceGroupName, final String name) { ServiceResponse> response = getMultiRolePoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3803,12 +3700,9 @@ private ServiceResponse> getMultiRolePoolsDelegate(Res * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the WorkerPoolInner object if successful. */ - public WorkerPoolInner getMultiRolePool(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public WorkerPoolInner getMultiRolePool(String resourceGroupName, String name) { return getMultiRolePoolWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -3887,13 +3781,9 @@ private ServiceResponse getMultiRolePoolDelegate(Response> createOrUpdateMultiRolePoolW * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param multiRolePoolEnvelope Properties of multiRole pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the WorkerPoolInner object if successful. */ - public WorkerPoolInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) throws CloudException, IOException, IllegalArgumentException { + public WorkerPoolInner beginCreateOrUpdateMultiRolePool(String resourceGroupName, String name, WorkerPoolInner multiRolePoolEnvelope) { return beginCreateOrUpdateMultiRolePoolWithServiceResponseAsync(resourceGroupName, name, multiRolePoolEnvelope).toBlocking().single().getBody(); } @@ -4056,16 +3943,13 @@ private ServiceResponse beginCreateOrUpdateMultiRolePoolDelegat * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getMultiRolePoolSkus(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getMultiRolePoolSkus(final String resourceGroupName, final String name) { ServiceResponse> response = getMultiRolePoolSkusSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -4175,16 +4059,13 @@ private ServiceResponse> getMultiRolePoolSkusDelegate(Res * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getWorkerPools(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getWorkerPools(final String resourceGroupName, final String name) { ServiceResponse> response = getWorkerPoolsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -4295,12 +4176,9 @@ private ServiceResponse> getWorkerPoolsDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the WorkerPoolInner object if successful. */ - public WorkerPoolInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) throws CloudException, IOException, IllegalArgumentException { + public WorkerPoolInner getWorkerPool(String resourceGroupName, String name, String workerPoolName) { return getWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName).toBlocking().single().getBody(); } @@ -4386,13 +4264,9 @@ private ServiceResponse getWorkerPoolDelegate(Response> createOrUpdateWorkerPoolWith * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param workerPoolEnvelope Properties of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the WorkerPoolInner object if successful. */ - public WorkerPoolInner beginCreateOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) throws CloudException, IOException, IllegalArgumentException { + public WorkerPoolInner beginCreateOrUpdateWorkerPool(String resourceGroupName, String name, String workerPoolName, WorkerPoolInner workerPoolEnvelope) { return beginCreateOrUpdateWorkerPoolWithServiceResponseAsync(resourceGroupName, name, workerPoolName, workerPoolEnvelope).toBlocking().single().getBody(); } @@ -4569,16 +4440,13 @@ private ServiceResponse beginCreateOrUpdateWorkerPoolDelegate(R * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getWorkerPoolSkus(final String resourceGroupName, final String name, final String workerPoolName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getWorkerPoolSkus(final String resourceGroupName, final String name, final String workerPoolName) { ServiceResponse> response = getWorkerPoolSkusSinglePageAsync(resourceGroupName, name, workerPoolName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -4697,12 +4565,9 @@ private ServiceResponse> getWorkerPoolSkusDelegate(Respon * @param name Name of hostingEnvironment (App Service Environment) * @param workerPoolName Name of worker pool * @param instance Name of instance in the worker pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance) throws CloudException, IOException, IllegalArgumentException { + public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance) { return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance).toBlocking().single().getBody(); } @@ -4791,12 +4656,9 @@ public Observable> call(Response response) * @param instance Name of instance in the worker pool * @param details Include instance details * @param filter Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(name.value eq 'Metric1' or name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and timeGrain eq duration'[Hour|Minute|Day]'. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException { + public Object getWorkerPoolInstanceMetrics(String resourceGroupName, String name, String workerPoolName, String instance, Boolean details, String filter) { return getWorkerPoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, workerPoolName, instance, details, filter).toBlocking().single().getBody(); } @@ -4894,12 +4756,9 @@ private ServiceResponse getWorkerPoolInstanceMetricsDelegate(Response getWorkerPoolInstanceMetricDefinitionsDelegate(R * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param instance Name of instance in the multiRole pool - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance) throws CloudException, IOException, IllegalArgumentException { + public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance) { return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); } @@ -5075,12 +4931,9 @@ public Observable> call(Response response) * @param name Name of hostingEnvironment (App Service Environment) * @param instance Name of instance in the multiRole pool * @param details Include instance details - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance, Boolean details) throws CloudException, IOException, IllegalArgumentException { + public Object getMultiRolePoolInstanceMetrics(String resourceGroupName, String name, String instance, Boolean details) { return getMultiRolePoolInstanceMetricsWithServiceResponseAsync(resourceGroupName, name, instance, details).toBlocking().single().getBody(); } @@ -5168,12 +5021,9 @@ private ServiceResponse getMultiRolePoolInstanceMetricsDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) * @param instance Name of instance in the multiRole pool&gt; - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getMultiRolePoolInstanceMetricDefinitions(String resourceGroupName, String name, String instance) throws CloudException, IOException, IllegalArgumentException { + public Object getMultiRolePoolInstanceMetricDefinitions(String resourceGroupName, String name, String instance) { return getMultiRolePoolInstanceMetricDefinitionsWithServiceResponseAsync(resourceGroupName, name, instance).toBlocking().single().getBody(); } @@ -5257,17 +5107,13 @@ private ServiceResponse getMultiRolePoolInstanceMetricDefinitionsDelegat * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the PagedList<SiteInner> object if successful. */ - public PagedList suspendHostingEnvironment(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public PagedList suspendHostingEnvironment(final String resourceGroupName, final String name) { ServiceResponse> response = suspendHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5378,16 +5224,13 @@ private ServiceResponse> suspendHostingEnvironmentDelegate(R * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList beginSuspendHostingEnvironment(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList beginSuspendHostingEnvironment(final String resourceGroupName, final String name) { ServiceResponse> response = beginSuspendHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5498,17 +5341,13 @@ private ServiceResponse> beginSuspendHostingEnvironmentDeleg * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the PagedList<SiteInner> object if successful. */ - public PagedList resumeHostingEnvironment(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public PagedList resumeHostingEnvironment(final String resourceGroupName, final String name) { ServiceResponse> response = resumeHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5619,16 +5458,13 @@ private ServiceResponse> resumeHostingEnvironmentDelegate(Re * * @param resourceGroupName Name of resource group * @param name Name of hostingEnvironment (App Service Environment) - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList beginResumeHostingEnvironment(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList beginResumeHostingEnvironment(final String resourceGroupName, final String name) { ServiceResponse> response = beginResumeHostingEnvironmentSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5738,16 +5574,13 @@ private ServiceResponse> beginResumeHostingEnvironmentDelega * Get used, available, and total worker capacity for hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<StampCapacityInner> object if successful. */ - public PagedList getHostingEnvironmentCapacitiesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentCapacitiesNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentCapacitiesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5844,16 +5677,13 @@ private ServiceResponse> getHostingEnvironmentCapac * Get all hostingEnvironments (App Service Environments) in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostingEnvironmentInner> object if successful. */ - public PagedList getHostingEnvironmentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5950,16 +5780,13 @@ private ServiceResponse> getHostingEnvironment * Get global metrics of hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMetricsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMetricsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6056,16 +5883,13 @@ private ServiceResponse> getHostingEnvironmentMetr * Get global usages of hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getHostingEnvironmentUsagesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentUsagesNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6162,16 +5986,13 @@ private ServiceResponse> getHostingEnvironmentUsage * Get metrics for a multiRole pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleMetricsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6268,16 +6089,13 @@ private ServiceResponse> getHostingEnvironmentMult * Get metrics for a worker pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerMetricsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6374,16 +6192,13 @@ private ServiceResponse> getHostingEnvironmentWebW * Get metric definitions for a multiRole pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleMetricDefinitionsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleMetricDefinitionsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6480,16 +6295,13 @@ private ServiceResponse> getHostingEnvironmentMu * Get metric definitions for a worker pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerMetricDefinitionsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerMetricDefinitionsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6586,16 +6398,13 @@ private ServiceResponse> getHostingEnvironmentWe * Get usages for a multiRole pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentMultiRoleUsagesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentMultiRoleUsagesNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentMultiRoleUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6692,16 +6501,13 @@ private ServiceResponse> getHostingEnvironmentMultiRoleUsag * Get usages for a worker pool of a hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<UsageInner> object if successful. */ - public PagedList getHostingEnvironmentWebWorkerUsagesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebWorkerUsagesNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebWorkerUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6798,16 +6604,13 @@ private ServiceResponse> getHostingEnvironmentWebWorkerUsag * Get all sites on the hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getHostingEnvironmentSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentSitesNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6904,16 +6707,13 @@ private ServiceResponse> getHostingEnvironmentSitesNextDeleg * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getHostingEnvironmentWebHostingPlansNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentWebHostingPlansNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7010,16 +6810,13 @@ private ServiceResponse> getHostingEnvironm * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getHostingEnvironmentServerFarmsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getHostingEnvironmentServerFarmsNext(final String nextPageLink) { ServiceResponse> response = getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7116,16 +6913,13 @@ private ServiceResponse> getHostingEnvironm * Get all multi role pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getMultiRolePoolsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getMultiRolePoolsNext(final String nextPageLink) { ServiceResponse> response = getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getMultiRolePoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7222,16 +7016,13 @@ private ServiceResponse> getMultiRolePoolsNextDelegate * Get available skus for scaling a multiRole pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getMultiRolePoolSkusNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getMultiRolePoolSkusNext(final String nextPageLink) { ServiceResponse> response = getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getMultiRolePoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7328,16 +7119,13 @@ private ServiceResponse> getMultiRolePoolSkusNextDelegate * Get all worker pools. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<WorkerPoolInner> object if successful. */ - public PagedList getWorkerPoolsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getWorkerPoolsNext(final String nextPageLink) { ServiceResponse> response = getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getWorkerPoolsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7434,16 +7222,13 @@ private ServiceResponse> getWorkerPoolsNextDelegate(Re * Get available skus for scaling a worker pool. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SkuInfoInner> object if successful. */ - public PagedList getWorkerPoolSkusNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getWorkerPoolSkusNext(final String nextPageLink) { ServiceResponse> response = getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getWorkerPoolSkusNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7540,17 +7325,13 @@ private ServiceResponse> getWorkerPoolSkusNextDelegate(Re * Suspends the hostingEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the PagedList<SiteInner> object if successful. */ - public PagedList suspendHostingEnvironmentNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public PagedList suspendHostingEnvironmentNext(final String nextPageLink) { ServiceResponse> response = suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return suspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7648,16 +7429,13 @@ private ServiceResponse> suspendHostingEnvironmentNextDelega * Suspends the hostingEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList beginSuspendHostingEnvironmentNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList beginSuspendHostingEnvironmentNext(final String nextPageLink) { ServiceResponse> response = beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return beginSuspendHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7755,17 +7533,13 @@ private ServiceResponse> beginSuspendHostingEnvironmentNextD * Resumes the hostingEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the PagedList<SiteInner> object if successful. */ - public PagedList resumeHostingEnvironmentNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public PagedList resumeHostingEnvironmentNext(final String nextPageLink) { ServiceResponse> response = resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return resumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7863,16 +7637,13 @@ private ServiceResponse> resumeHostingEnvironmentNextDelegat * Resumes the hostingEnvironment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList beginResumeHostingEnvironmentNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList beginResumeHostingEnvironmentNext(final String nextPageLink) { ServiceResponse> response = beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return beginResumeHostingEnvironmentNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java index f0b5aca5b651..2cb7f5a5b23c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ManagedHostingEnvironmentsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -129,12 +128,9 @@ interface ManagedHostingEnvironmentsService { * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ManagedHostingEnvironmentInner object if successful. */ - public ManagedHostingEnvironmentInner getManagedHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ManagedHostingEnvironmentInner getManagedHostingEnvironment(String resourceGroupName, String name) { return getManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -213,13 +209,9 @@ private ServiceResponse getManagedHostingEnviron * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the HostingEnvironmentInner object if successful. */ - public HostingEnvironmentInner createOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public HostingEnvironmentInner createOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { return createOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).toBlocking().last().getBody(); } @@ -288,12 +280,9 @@ public Observable> createOrUpdateManage * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param managedHostingEnvironmentEnvelope Properties of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostingEnvironmentInner object if successful. */ - public HostingEnvironmentInner beginCreateOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) throws CloudException, IOException, IllegalArgumentException { + public HostingEnvironmentInner beginCreateOrUpdateManagedHostingEnvironment(String resourceGroupName, String name, HostingEnvironmentInner managedHostingEnvironmentEnvelope) { return beginCreateOrUpdateManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, managedHostingEnvironmentEnvelope).toBlocking().single().getBody(); } @@ -381,13 +370,9 @@ private ServiceResponse beginCreateOrUpdateManagedHosti * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the Object object if successful. */ - public Object deleteManagedHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public Object deleteManagedHostingEnvironment(String resourceGroupName, String name) { return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } @@ -449,13 +434,9 @@ public Observable> deleteManagedHostingEnvironmentWithSe * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param forceDelete Delete even if the managed hosting environment contains resources - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the Object object if successful. */ - public Object deleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public Object deleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { return deleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().last().getBody(); } @@ -519,12 +500,9 @@ public Observable> deleteManagedHostingEnvironmentWithSe * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name) { return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -597,12 +575,9 @@ public Observable> call(Response response) * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param forceDelete Delete even if the managed hosting environment contains resources - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) throws CloudException, IOException, IllegalArgumentException { + public Object beginDeleteManagedHostingEnvironment(String resourceGroupName, String name, Boolean forceDelete) { return beginDeleteManagedHostingEnvironmentWithServiceResponseAsync(resourceGroupName, name, forceDelete).toBlocking().single().getBody(); } @@ -685,16 +660,13 @@ private ServiceResponse beginDeleteManagedHostingEnvironmentDelegate(Res * Get all managed hosting environments in a resource group. * * @param resourceGroupName Name of resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostingEnvironmentInner> object if successful. */ - public PagedList getManagedHostingEnvironments(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironments(final String resourceGroupName) { ServiceResponse> response = getManagedHostingEnvironmentsSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -797,12 +769,9 @@ private ServiceResponse> getManagedHostingEnvi * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the AddressResponseInner object if successful. */ - public AddressResponseInner getManagedHostingEnvironmentVips(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public AddressResponseInner getManagedHostingEnvironmentVips(String resourceGroupName, String name) { return getManagedHostingEnvironmentVipsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -881,12 +850,9 @@ private ServiceResponse getManagedHostingEnvironmentVipsDe * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param operationId operation identifier GUID - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getManagedHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) throws CloudException, IOException, IllegalArgumentException { + public Object getManagedHostingEnvironmentOperation(String resourceGroupName, String name, String operationId) { return getManagedHostingEnvironmentOperationWithServiceResponseAsync(resourceGroupName, name, operationId).toBlocking().single().getBody(); } @@ -973,16 +939,13 @@ private ServiceResponse getManagedHostingEnvironmentOperationDelegate(Re * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name) { ServiceResponse> response = getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1087,16 +1050,13 @@ public Observable>> call(Response * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment * @param propertiesToInclude Comma separated list of site properties to include - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentSites(final String resourceGroupName, final String name, final String propertiesToInclude) { ServiceResponse> response = getManagedHostingEnvironmentSitesSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1210,16 +1170,13 @@ private ServiceResponse> getManagedHostingEnvironmentSitesDe * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getManagedHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentWebHostingPlans(final String resourceGroupName, final String name) { ServiceResponse> response = getManagedHostingEnvironmentWebHostingPlansSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1329,16 +1286,13 @@ private ServiceResponse> getManagedHostingE * * @param resourceGroupName Name of resource group * @param name Name of managed hosting environment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getManagedHostingEnvironmentServerFarms(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentServerFarms(final String resourceGroupName, final String name) { ServiceResponse> response = getManagedHostingEnvironmentServerFarmsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1447,16 +1401,13 @@ private ServiceResponse> getManagedHostingE * Get all managed hosting environments in a resource group. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostingEnvironmentInner> object if successful. */ - public PagedList getManagedHostingEnvironmentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentsNext(final String nextPageLink) { ServiceResponse> response = getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1553,16 +1504,13 @@ private ServiceResponse> getManagedHostingEnvi * Get all sites on the managed hosting environment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getManagedHostingEnvironmentSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentSitesNext(final String nextPageLink) { ServiceResponse> response = getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1659,16 +1607,13 @@ private ServiceResponse> getManagedHostingEnvironmentSitesNe * Get all serverfarms (App Service Plans) on the managed hosting environment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getManagedHostingEnvironmentWebHostingPlansNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentWebHostingPlansNext(final String nextPageLink) { ServiceResponse> response = getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentWebHostingPlansNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1765,16 +1710,13 @@ private ServiceResponse> getManagedHostingE * Get all serverfarms (App Service Plans) on the managed hosting environment. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getManagedHostingEnvironmentServerFarmsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getManagedHostingEnvironmentServerFarmsNext(final String nextPageLink) { ServiceResponse> response = getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getManagedHostingEnvironmentServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java index 4a420b36327c..5d6c56a1e3d8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ProvidersInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -90,16 +89,13 @@ interface ProvidersService { /** * Gets the source controls available for Azure websites. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SourceControlInner> object if successful. */ - public PagedList getSourceControls() throws CloudException, IOException, IllegalArgumentException { + public PagedList getSourceControls() { ServiceResponse> response = getSourceControlsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -191,12 +187,9 @@ private ServiceResponse> getSourceControlsDelegate( * Gets source control token. * * @param sourceControlType Type of source control - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SourceControlInner object if successful. */ - public SourceControlInner getSourceControl(String sourceControlType) throws CloudException, IOException, IllegalArgumentException { + public SourceControlInner getSourceControl(String sourceControlType) { return getSourceControlWithServiceResponseAsync(sourceControlType).toBlocking().single().getBody(); } @@ -265,12 +258,9 @@ private ServiceResponse getSourceControlDelegate(Response updateSourceControlDelegate(Response /** * Gets publishing user. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner getPublishingUser() throws CloudException, IOException, IllegalArgumentException { + public UserInner getPublishingUser() { return getPublishingUserWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -411,12 +398,9 @@ private ServiceResponse getPublishingUserDelegate(Response updatePublishingUserDelegate(Response getSourceControlsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSourceControlsNext(final String nextPageLink) { ServiceResponse> response = getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSourceControlsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java index 95193158d53d..bb11224023b8 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/RecommendationsInner.java @@ -74,12 +74,9 @@ interface RecommendationsService { /** * Gets a list of recommendations associated with the specified subscription. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<RecommendationInner> object if successful. */ - public List getRecommendationBySubscription() throws CloudException, IOException, IllegalArgumentException { + public List getRecommendationBySubscription() { return getRecommendationBySubscriptionWithServiceResponseAsync().toBlocking().single().getBody(); } @@ -140,12 +137,9 @@ public Observable>> call(Response getRecommendationBySubscription(Boolean featured, String filter) throws CloudException, IOException, IllegalArgumentException { + public List getRecommendationBySubscription(Boolean featured, String filter) { return getRecommendationBySubscriptionWithServiceResponseAsync(featured, filter).toBlocking().single().getBody(); } @@ -218,12 +212,9 @@ private ServiceResponse> getRecommendationBySubscripti * @param resourceGroupName Resource group name * @param siteName Site name * @param name Recommendation rule name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RecommendationRuleInner object if successful. */ - public RecommendationRuleInner getRuleDetailsBySiteName(String resourceGroupName, String siteName, String name) throws CloudException, IOException, IllegalArgumentException { + public RecommendationRuleInner getRuleDetailsBySiteName(String resourceGroupName, String siteName, String name) { return getRuleDetailsBySiteNameWithServiceResponseAsync(resourceGroupName, siteName, name).toBlocking().single().getBody(); } @@ -307,12 +298,9 @@ private ServiceResponse getRuleDetailsBySiteNameDelegat * * @param resourceGroupName Resource group name * @param siteName Site name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<RecommendationInner> object if successful. */ - public List getRecommendedRulesForSite(String resourceGroupName, String siteName) throws CloudException, IOException, IllegalArgumentException { + public List getRecommendedRulesForSite(String resourceGroupName, String siteName) { return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); } @@ -389,12 +377,9 @@ public Observable>> call(Response getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) throws CloudException, IOException, IllegalArgumentException { + public List getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) { return getRecommendedRulesForSiteWithServiceResponseAsync(resourceGroupName, siteName, featured, siteSku, numSlots).toBlocking().single().getBody(); } @@ -481,12 +466,9 @@ private ServiceResponse> getRecommendedRulesForSiteDel * * @param resourceGroupName Resource group name * @param siteName Site name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<RecommendationInner> object if successful. */ - public List getRecommendationHistoryForSite(String resourceGroupName, String siteName) throws CloudException, IOException, IllegalArgumentException { + public List getRecommendationHistoryForSite(String resourceGroupName, String siteName) { return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName).toBlocking().single().getBody(); } @@ -561,12 +543,9 @@ public Observable>> call(Response getRecommendationHistoryForSite(String resourceGroupName, String siteName, String startTime, String endTime) throws CloudException, IOException, IllegalArgumentException { + public List getRecommendationHistoryForSite(String resourceGroupName, String siteName, String startTime, String endTime) { return getRecommendationHistoryForSiteWithServiceResponseAsync(resourceGroupName, siteName, startTime, endTime).toBlocking().single().getBody(); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java index c7e26dffb26d..cb07a84e5ada 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/ServerFarmsInner.java @@ -16,7 +16,6 @@ import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -166,16 +165,13 @@ interface ServerFarmsService { * Gets collection of App Service Plans in a resource group for a given subscription. * * @param resourceGroupName Name of resource group - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getServerFarms(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarms(final String resourceGroupName) { ServiceResponse> response = getServerFarmsSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -278,12 +274,9 @@ private ServiceResponse> getServerFarmsDele * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmWithRichSkuInner object if successful. */ - public ServerFarmWithRichSkuInner getServerFarm(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServerFarmWithRichSkuInner getServerFarm(String resourceGroupName, String name) { return getServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -362,13 +355,9 @@ private ServiceResponse getServerFarmDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of App Service Plan * @param serverFarmEnvelope Details of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ServerFarmWithRichSkuInner object if successful. */ - public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).toBlocking().last().getBody(); } @@ -438,13 +427,9 @@ public Observable> createOrUpdateSer * @param name Name of App Service Plan * @param serverFarmEnvelope Details of App Service Plan * @param allowPendingState OBSOLETE: If true, allow pending state for App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the ServerFarmWithRichSkuInner object if successful. */ - public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public ServerFarmWithRichSkuInner createOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope, Boolean allowPendingState) { return createOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope, allowPendingState).toBlocking().last().getBody(); } @@ -516,12 +501,9 @@ public Observable> createOrUpdateSer * @param resourceGroupName Name of resource group * @param name Name of App Service Plan * @param serverFarmEnvelope Details of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmWithRichSkuInner object if successful. */ - public ServerFarmWithRichSkuInner beginCreateOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) throws CloudException, IOException, IllegalArgumentException { + public ServerFarmWithRichSkuInner beginCreateOrUpdateServerFarm(String resourceGroupName, String name, ServerFarmWithRichSkuInner serverFarmEnvelope) { return beginCreateOrUpdateServerFarmWithServiceResponseAsync(resourceGroupName, name, serverFarmEnvelope).toBlocking().single().getBody(); } @@ -602,12 +584,9 @@ public Observable> call(Response beginCreateOrUpdateServerFar * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteServerFarm(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteServerFarm(String resourceGroupName, String name) { return deleteServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -779,16 +755,13 @@ private ServiceResponse deleteServerFarmDelegate(Response * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getServerFarmMetrics(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmMetrics(final String resourceGroupName, final String name) { ServiceResponse> response = getServerFarmMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -895,16 +868,13 @@ public Observable>> call(Response getServerFarmMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { ServiceResponse> response = getServerFarmMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1022,16 +992,13 @@ private ServiceResponse> getServerFarmMetricsDeleg * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getServerFarmMetricDefintions(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmMetricDefintions(final String resourceGroupName, final String name) { ServiceResponse> response = getServerFarmMetricDefintionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -1141,12 +1108,9 @@ private ServiceResponse> getServerFarmMetricDefi * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VnetInfoInner> object if successful. */ - public List getVnetsForServerFarm(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public List getVnetsForServerFarm(String resourceGroupName, String name) { return getVnetsForServerFarmWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -1225,12 +1189,9 @@ private ServiceResponse> getVnetsForServerFarmDelegate(Respo * @param resourceGroupName Name of resource group * @param name Name of App Service Plan * @param vnetName Name of virtual network - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetInfoInner object if successful. */ - public VnetInfoInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public VnetInfoInner getVnetFromServerFarm(String resourceGroupName, String name, String vnetName) { return getVnetFromServerFarmWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); } @@ -1316,12 +1277,9 @@ private ServiceResponse getVnetFromServerFarmDelegate(Response getRoutesForVnet(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public List getRoutesForVnet(String resourceGroupName, String name, String vnetName) { return getRoutesForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); } @@ -1407,12 +1365,9 @@ private ServiceResponse> getRoutesForVnetDelegate(Response< * @param name Name of App Service Plan * @param vnetName Name of virtual network * @param routeName Name of the virtual network route - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VnetRouteInner> object if successful. */ - public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) throws CloudException, IOException, IllegalArgumentException { + public List getRouteForVnet(String resourceGroupName, String name, String vnetName, String routeName) { return getRouteForVnetWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); } @@ -1506,12 +1461,9 @@ private ServiceResponse> getRouteForVnetDelegate(Response createOrUpdateVnetRouteDelegate(Response * @param name Name of App Service Plan * @param vnetName Name of virtual network * @param routeName Name of the virtual network route - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) throws CloudException, IOException, IllegalArgumentException { + public Object deleteVnetRoute(String resourceGroupName, String name, String vnetName, String routeName) { return deleteVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName).toBlocking().single().getBody(); } @@ -1711,12 +1660,9 @@ private ServiceResponse deleteVnetRouteDelegate(Response r * @param vnetName Name of virtual network * @param routeName Name of the virtual network route * @param route The route object - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetRouteInner object if successful. */ - public VnetRouteInner updateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) throws CloudException, IOException, IllegalArgumentException { + public VnetRouteInner updateVnetRoute(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route) { return updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route).toBlocking().single().getBody(); } @@ -1817,12 +1763,9 @@ private ServiceResponse updateVnetRouteDelegate(Response getServerFarmVnetGatewayDelegate(Respo * @param vnetName The name of the virtual network * @param gatewayName The name of the gateway. Only 'primary' is supported. * @param connectionEnvelope The gateway entity. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetGatewayInner object if successful. */ - public VnetGatewayInner updateServerFarmVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public VnetGatewayInner updateServerFarmVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { return updateServerFarmVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); } @@ -2017,16 +1957,13 @@ private ServiceResponse updateServerFarmVnetGatewayDelegate(Re * * @param resourceGroupName Name of resource group * @param name Name of App Service Plan - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getServerFarmSites(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmSites(final String resourceGroupName, final String name) { ServiceResponse> response = getServerFarmSitesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2135,16 +2072,13 @@ public Observable>> call(Response * @param skipToken Skip to of web apps in a list. If specified, the resulting list will contain web apps starting from (including) the skipToken. Else, the resulting list contains web apps from the start of the list * @param filter Supported filter: $filter=state eq running. Returns only web apps that are currently running * @param top List page size. If specified, results are paged. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getServerFarmSites(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmSites(final String resourceGroupName, final String name, final String skipToken, final String filter, final String top) { ServiceResponse> response = getServerFarmSitesSinglePageAsync(resourceGroupName, name, skipToken, filter, top).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2267,12 +2201,9 @@ private ServiceResponse> getServerFarmSitesDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of server farm * @param workerName Name of worker machine, typically starts with RD - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object rebootWorkerForServerFarm(String resourceGroupName, String name, String workerName) throws CloudException, IOException, IllegalArgumentException { + public Object rebootWorkerForServerFarm(String resourceGroupName, String name, String workerName) { return rebootWorkerForServerFarmWithServiceResponseAsync(resourceGroupName, name, workerName).toBlocking().single().getBody(); } @@ -2356,12 +2287,9 @@ private ServiceResponse rebootWorkerForServerFarmDelegate(Response> call(Response response) * @param resourceGroupName Name of resource group * @param name Name of App Service Plan * @param softRestart Soft restart applies the configuration settings and restarts the apps if necessary. Hard restart always restarts and reprovisions the apps - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object restartSitesForServerFarm(String resourceGroupName, String name, Boolean softRestart) throws CloudException, IOException, IllegalArgumentException { + public Object restartSitesForServerFarm(String resourceGroupName, String name, Boolean softRestart) { return restartSitesForServerFarmWithServiceResponseAsync(resourceGroupName, name, softRestart).toBlocking().single().getBody(); } @@ -2521,12 +2446,9 @@ private ServiceResponse restartSitesForServerFarmDelegate(Response getServerFarmOperationDelega * Gets collection of App Service Plans in a resource group for a given subscription. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ServerFarmWithRichSkuInner> object if successful. */ - public PagedList getServerFarmsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmsNext(final String nextPageLink) { ServiceResponse> response = getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2715,16 +2634,13 @@ private ServiceResponse> getServerFarmsNext * Queries for App Serice Plan metrics. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getServerFarmMetricsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmMetricsNext(final String nextPageLink) { ServiceResponse> response = getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2821,16 +2737,13 @@ private ServiceResponse> getServerFarmMetricsNextD * List of metrics that can be queried for an App Service Plan. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getServerFarmMetricDefintionsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmMetricDefintionsNext(final String nextPageLink) { ServiceResponse> response = getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmMetricDefintionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2927,16 +2840,13 @@ private ServiceResponse> getServerFarmMetricDefi * Gets list of Apps associated with an App Service Plan. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getServerFarmSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getServerFarmSitesNext(final String nextPageLink) { ServiceResponse> response = getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getServerFarmSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java index 0adf2f21c17f..59ad2457471e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/SitesInner.java @@ -17,7 +17,6 @@ import com.microsoft.azure.management.website.CsmPublishingProfileOptions; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -846,12 +845,9 @@ interface SitesService { * @param name The name of the web app * @param vnetName The name of the Virtual Network * @param slot The name of the slot for this web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetInfoInner object if successful. */ - public VnetInfoInner getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { + public VnetInfoInner getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { return getSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); } @@ -944,12 +940,9 @@ private ServiceResponse getSiteVNETConnectionSlotDelegate(Respons * @param vnetName The name of the Virtual Network * @param slot The name of the slot for this web app. * @param connectionEnvelope The properties of this Virtual Network Connection - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetInfoInner object if successful. */ - public VnetInfoInner createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public VnetInfoInner createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfoInner connectionEnvelope) { return createOrUpdateSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot, connectionEnvelope).toBlocking().single().getBody(); } @@ -1048,12 +1041,9 @@ private ServiceResponse createOrUpdateSiteVNETConnectionSlotDeleg * @param name The name of the web app * @param vnetName The name of the Virtual Network * @param slot The name of the slot for this web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) { return deleteSiteVNETConnectionSlotWithServiceResponseAsync(resourceGroupName, name, vnetName, slot).toBlocking().single().getBody(); } @@ -1146,12 +1136,9 @@ private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response updateSiteVNETConnectionSlotDelegate(Resp * @param resourceGroupName The resource group name * @param name The name of the web app * @param vnetName The name of the Virtual Network - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetInfoInner object if successful. */ - public VnetInfoInner getSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public VnetInfoInner getSiteVNETConnection(String resourceGroupName, String name, String vnetName) { return getSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); } @@ -1340,12 +1324,9 @@ private ServiceResponse getSiteVNETConnectionDelegate(Response createOrUpdateSiteVNETConnectionDelegate( * @param resourceGroupName The resource group name * @param name The name of the web app * @param vnetName The name of the Virtual Network - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) { return deleteSiteVNETConnectionWithServiceResponseAsync(resourceGroupName, name, vnetName).toBlocking().single().getBody(); } @@ -1528,12 +1506,9 @@ private ServiceResponse deleteSiteVNETConnectionDelegate(Response updateSiteVNETConnectionDelegate(Response * @param name The name of the web app * @param view The type of view. This can either be "summary" or "detailed". * @param slot The name of the slot for this web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkFeaturesInner object if successful. */ - public NetworkFeaturesInner getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) throws CloudException, IOException, IllegalArgumentException { + public NetworkFeaturesInner getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) { return getSiteNetworkFeaturesSlotWithServiceResponseAsync(resourceGroupName, name, view, slot).toBlocking().single().getBody(); } @@ -1723,12 +1695,9 @@ private ServiceResponse getSiteNetworkFeaturesSlotDelegate * @param resourceGroupName The resource group name * @param name The name of the web app * @param view The type of view. This can either be "summary" or "detailed". - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the NetworkFeaturesInner object if successful. */ - public NetworkFeaturesInner getSiteNetworkFeatures(String resourceGroupName, String name, String view) throws CloudException, IOException, IllegalArgumentException { + public NetworkFeaturesInner getSiteNetworkFeatures(String resourceGroupName, String name, String view) { return getSiteNetworkFeaturesWithServiceResponseAsync(resourceGroupName, name, view).toBlocking().single().getBody(); } @@ -1815,12 +1784,9 @@ private ServiceResponse getSiteNetworkFeaturesDelegate(Res * @param name Name of web app * @param operationId Id of an operation * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getSiteOperationSlot(String resourceGroupName, String name, String operationId, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object getSiteOperationSlot(String resourceGroupName, String name, String operationId, String slot) { return getSiteOperationSlotWithServiceResponseAsync(resourceGroupName, name, operationId, slot).toBlocking().single().getBody(); } @@ -1911,12 +1877,9 @@ private ServiceResponse getSiteOperationSlotDelegate(Response getSiteOperationDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of web app * @param slotSwapEntity Request body that contains the target slot name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the Object object if successful. */ - public Object swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public Object swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { return swapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().last().getBody(); } @@ -2076,12 +2035,9 @@ public Observable> swapSlotWithProductionWithServiceResp * @param resourceGroupName Name of resource group * @param name Name of web app * @param slotSwapEntity Request body that contains the target slot name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public Object beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { return beginSwapSlotWithProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); } @@ -2169,13 +2125,9 @@ private ServiceResponse beginSwapSlotWithProductionDelegate(Response> swapSlotsSlotWithServiceResponseAsync * @param name Name of web app * @param slot Name of source slot for the swap * @param slotSwapEntity Request body that contains the target slot name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public Object beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntityInner slotSwapEntity) { return beginSwapSlotsSlotWithServiceResponseAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single().getBody(); } @@ -2349,16 +2298,13 @@ private ServiceResponse beginSwapSlotsSlotDelegate(Response getSlotsDifferencesFromProduction(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSlotsDifferencesFromProduction(final String resourceGroupName, final String name, final CsmSlotEntityInner slotSwapEntity) { ServiceResponse> response = getSlotsDifferencesFromProductionSinglePageAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2478,16 +2424,13 @@ private ServiceResponse> getSlotsDifferencesFromPr * @param name Name of web app * @param slot Name of the source slot * @param slotSwapEntity Request body that contains the target slot name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SlotDifferenceInner> object if successful. */ - public PagedList getSlotsDifferencesSlot(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSlotsDifferencesSlot(final String resourceGroupName, final String name, final String slot, final CsmSlotEntityInner slotSwapEntity) { ServiceResponse> response = getSlotsDifferencesSlotSinglePageAsync(resourceGroupName, name, slot, slotSwapEntity).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -2613,12 +2556,9 @@ private ServiceResponse> getSlotsDifferencesSlotDe * @param resourceGroupName Name of resource group * @param name Name of web app * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public Object applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntityInner slotSwapEntity) { return applySlotConfigToProductionWithServiceResponseAsync(resourceGroupName, name, slotSwapEntity).toBlocking().single().getBody(); } @@ -2705,12 +2645,9 @@ private ServiceResponse applySlotConfigToProductionDelegate(Response applySlotConfigSlotDelegate(Response resetProductionSlotConfigDelegate(Response resetSlotConfigSlotDelegate(Response getSlotConfigNamesDelegate * @param resourceGroupName Name of resource group * @param name Name of web app * @param slotConfigNames Request body containing the names of application settings and connection strings - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SlotConfigNamesResourceInner object if successful. */ - public SlotConfigNamesResourceInner updateSlotConfigNames(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) throws CloudException, IOException, IllegalArgumentException { + public SlotConfigNamesResourceInner updateSlotConfigNames(String resourceGroupName, String name, SlotConfigNamesResourceInner slotConfigNames) { return updateSlotConfigNamesWithServiceResponseAsync(resourceGroupName, name, slotConfigNames).toBlocking().single().getBody(); } @@ -3148,16 +3073,13 @@ private ServiceResponse updateSlotConfigNamesDeleg * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getSiteSlots(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteSlots(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteSlotsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3262,16 +3184,13 @@ public Observable>> call(Response * @param resourceGroupName Name of resource group * @param name Name of web app * @param propertiesToInclude List of app properties to include in the response - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getSiteSlots(final String resourceGroupName, final String name, final String propertiesToInclude) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteSlots(final String resourceGroupName, final String name, final String propertiesToInclude) { ServiceResponse> response = getSiteSlotsSinglePageAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3384,16 +3303,13 @@ private ServiceResponse> getSiteSlotsDelegate(Response getSites(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSites(final String resourceGroupName) { ServiceResponse> response = getSitesSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3494,16 +3410,13 @@ public Observable>> call(Response * @param propertiesToInclude Additional web app properties included in the response * @param includeSiteTypes Types of apps included in the response * @param includeSlots Whether or not to include deployments slots in results - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes, final Boolean includeSlots) { ServiceResponse> response = getSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes, includeSlots).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -3618,12 +3531,9 @@ private ServiceResponse> getSitesDelegate(Response> call(Response respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param propertiesToInclude Additional web app properties included in the response - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner getSite(String resourceGroupName, String name, String propertiesToInclude) throws CloudException, IOException, IllegalArgumentException { + public SiteInner getSite(String resourceGroupName, String name, String propertiesToInclude) { return getSiteWithServiceResponseAsync(resourceGroupName, name, propertiesToInclude).toBlocking().single().getBody(); } @@ -3783,13 +3690,9 @@ private ServiceResponse getSiteDelegate(Response respon * @param resourceGroupName Name of the resource group * @param name Name of the web app * @param siteEnvelope Details of web app if it exists already - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SiteInner object if successful. */ - public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) { return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().last().getBody(); } @@ -3866,13 +3769,9 @@ public Observable> createOrUpdateSiteWithServiceRespo * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. * @param forceDnsRegistration If true, web app hostname is force registered with DNS * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SiteInner object if successful. */ - public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SiteInner createOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { return createOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); } @@ -3956,12 +3855,9 @@ public Observable> createOrUpdateSiteWithServiceRespo * @param resourceGroupName Name of the resource group * @param name Name of the web app * @param siteEnvelope Details of web app if it exists already - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope) { return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope).toBlocking().single().getBody(); } @@ -4049,12 +3945,9 @@ public Observable> call(Response respon * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. * @param forceDnsRegistration If true, web app hostname is force registered with DNS * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginCreateOrUpdateSite(String resourceGroupName, String name, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { return beginCreateOrUpdateSiteWithServiceResponseAsync(resourceGroupName, name, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); } @@ -4155,12 +4048,9 @@ private ServiceResponse beginCreateOrUpdateSiteDelegate(Response> call(Response response) * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted * @param skipDnsRegistration If true, DNS registration is skipped * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSite(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSite(String resourceGroupName, String name, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { return deleteSiteWithServiceResponseAsync(resourceGroupName, name, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).toBlocking().single().getBody(); } @@ -4335,12 +4222,9 @@ private ServiceResponse deleteSiteDelegate(Response respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner getSiteSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public SiteInner getSiteSlot(String resourceGroupName, String name, String slot) { return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -4420,12 +4304,9 @@ public Observable> call(Response respon * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param propertiesToInclude Additional web app properties included in the response - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner getSiteSlot(String resourceGroupName, String name, String slot, String propertiesToInclude) throws CloudException, IOException, IllegalArgumentException { + public SiteInner getSiteSlot(String resourceGroupName, String name, String slot, String propertiesToInclude) { return getSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, propertiesToInclude).toBlocking().single().getBody(); } @@ -4514,13 +4395,9 @@ private ServiceResponse getSiteSlotDelegate(Response re * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteEnvelope Details of web app if it exists already - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SiteInner object if successful. */ - public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().last().getBody(); } @@ -4604,13 +4481,9 @@ public Observable> createOrUpdateSiteSlotWithServiceR * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. * @param forceDnsRegistration If true, web app hostname is force registered with DNS * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SiteInner object if successful. */ - public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SiteInner createOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { return createOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().last().getBody(); } @@ -4701,12 +4574,9 @@ public Observable> createOrUpdateSiteSlotWithServiceR * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteEnvelope Details of web app if it exists already - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope) { return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope).toBlocking().single().getBody(); } @@ -4801,12 +4671,9 @@ public Observable> call(Response respon * @param skipCustomDomainVerification If true, custom (non *.azurewebsites.net) domains associated with web app are not verified. * @param forceDnsRegistration If true, web app hostname is force registered with DNS * @param ttlInSeconds Time to live in seconds for web app's default domain name - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginCreateOrUpdateSiteSlot(String resourceGroupName, String name, String slot, SiteInner siteEnvelope, String skipDnsRegistration, String skipCustomDomainVerification, String forceDnsRegistration, String ttlInSeconds) { return beginCreateOrUpdateSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteEnvelope, skipDnsRegistration, skipCustomDomainVerification, forceDnsRegistration, ttlInSeconds).toBlocking().single().getBody(); } @@ -4914,12 +4781,9 @@ private ServiceResponse beginCreateOrUpdateSiteSlotDelegate(Response< * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteSlot(String resourceGroupName, String name, String slot) { return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -5005,12 +4869,9 @@ public Observable> call(Response response) * @param deleteEmptyServerFarm If true and App Service Plan is empty after web app deletion, App Service Plan is also deleted * @param skipDnsRegistration If true, DNS registration is skipped * @param deleteAllSlots If true, all slots associated with web app are also deleted - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteSlot(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteSlot(String resourceGroupName, String name, String slot, String deleteMetrics, String deleteEmptyServerFarm, String skipDnsRegistration, String deleteAllSlots) { return deleteSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, deleteMetrics, deleteEmptyServerFarm, skipDnsRegistration, deleteAllSlots).toBlocking().single().getBody(); } @@ -5106,12 +4967,9 @@ private ServiceResponse deleteSiteSlotDelegate(Response re * * @param resourceGroupName Name of the resource group * @param name Name of the web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteCloneabilityInner object if successful. */ - public SiteCloneabilityInner isSiteCloneable(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public SiteCloneabilityInner isSiteCloneable(String resourceGroupName, String name) { return isSiteCloneableWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -5190,12 +5048,9 @@ private ServiceResponse isSiteCloneableDelegate(Response< * @param resourceGroupName Name of the resource group * @param name Name of the web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteCloneabilityInner object if successful. */ - public SiteCloneabilityInner isSiteCloneableSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public SiteCloneabilityInner isSiteCloneableSlot(String resourceGroupName, String name, String slot) { return isSiteCloneableSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -5280,13 +5135,9 @@ private ServiceResponse isSiteCloneableSlotDelegate(Respo * @param resourceGroupName Name of resource group * @param name Name of web app * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the SiteInner object if successful. */ - public SiteInner recoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public SiteInner recoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { return recoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().last().getBody(); } @@ -5355,12 +5206,9 @@ public Observable> recoverSiteWithServiceResponseAsyn * @param resourceGroupName Name of resource group * @param name Name of web app * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginRecoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginRecoverSite(String resourceGroupName, String name, CsmSiteRecoveryEntityInner recoveryEntity) { return beginRecoverSiteWithServiceResponseAsync(resourceGroupName, name, recoveryEntity).toBlocking().single().getBody(); } @@ -5448,13 +5296,9 @@ private ServiceResponse beginRecoverSiteDelegate(Response> recoverSiteSlotWithServiceResponse * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param recoveryEntity Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteInner object if successful. */ - public SiteInner beginRecoverSiteSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) throws CloudException, IOException, IllegalArgumentException { + public SiteInner beginRecoverSiteSlot(String resourceGroupName, String name, String slot, CsmSiteRecoveryEntityInner recoveryEntity) { return beginRecoverSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, recoveryEntity).toBlocking().single().getBody(); } @@ -5627,12 +5468,9 @@ private ServiceResponse beginRecoverSiteSlotDelegate(Response getSiteSnapshotsDelegate(Response * @param resourceGroupName Webspace * @param name Website Name * @param slot Website Slot - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getSiteSnapshotsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object getSiteSnapshotsSlot(String resourceGroupName, String name, String slot) { return getSiteSnapshotsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -5799,16 +5634,13 @@ private ServiceResponse getSiteSnapshotsSlotDelegate(Response getDeletedSites(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeletedSites(final String resourceGroupName) { ServiceResponse> response = getDeletedSitesSinglePageAsync(resourceGroupName).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -5907,16 +5739,13 @@ public Observable>> call(Response getDeletedSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeletedSites(final String resourceGroupName, final String propertiesToInclude, final String includeSiteTypes) { ServiceResponse> response = getDeletedSitesSinglePageAsync(resourceGroupName, propertiesToInclude, includeSiteTypes).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6027,16 +5856,13 @@ private ServiceResponse> getDeletedSitesDelegate(Resp * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getDeployments(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeployments(final String resourceGroupName, final String name) { ServiceResponse> response = getDeploymentsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6147,16 +5973,13 @@ private ServiceResponse> getDeploymentsDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getDeploymentsSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeploymentsSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6274,16 +6097,13 @@ private ServiceResponse> getDeploymentsSlotDelegate(Re * @param resourceGroupName Name of resource group * @param name Name of web app * @param instanceId Id of web app instance - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getInstanceDeployments(final String resourceGroupName, final String name, final String instanceId) throws CloudException, IOException, IllegalArgumentException { + public PagedList getInstanceDeployments(final String resourceGroupName, final String name, final String instanceId) { ServiceResponse> response = getInstanceDeploymentsSinglePageAsync(resourceGroupName, name, instanceId).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6402,16 +6222,13 @@ private ServiceResponse> getInstanceDeploymentsDelegat * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getInstanceDeploymentsSlot(final String resourceGroupName, final String name, final String slot, final String instanceId) throws CloudException, IOException, IllegalArgumentException { + public PagedList getInstanceDeploymentsSlot(final String resourceGroupName, final String name, final String slot, final String instanceId) { ServiceResponse> response = getInstanceDeploymentsSlotSinglePageAsync(resourceGroupName, name, slot, instanceId).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -6537,12 +6354,9 @@ private ServiceResponse> getInstanceDeploymentsSlotDel * @param name Name of web app * @param id Id of the deployment * @param instanceId Id of web app instance - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentInner object if successful. */ - public DeploymentInner getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public DeploymentInner getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { return getInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); } @@ -6635,12 +6449,9 @@ private ServiceResponse getInstanceDeploymentDelegate(Response< * @param id Id of the deployment * @param instanceId Id of web app instance * @param deployment Details of deployment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentInner object if successful. */ - public DeploymentInner createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) throws CloudException, IOException, IllegalArgumentException { + public DeploymentInner createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, DeploymentInner deployment) { return createInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId, deployment).toBlocking().single().getBody(); } @@ -6739,12 +6550,9 @@ private ServiceResponse createInstanceDeploymentDelegate(Respon * @param name Name of web app * @param id Id of the deployment * @param instanceId Id of web app instance - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public Object deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) { return deleteInstanceDeploymentWithServiceResponseAsync(resourceGroupName, name, id, instanceId).toBlocking().single().getBody(); } @@ -6835,12 +6643,9 @@ private ServiceResponse deleteInstanceDeploymentDelegate(Response getDeploymentDelegate(Response createDeploymentDelegate(Response deleteDeploymentDelegate(Response * @param name Name of web app * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentInner object if successful. */ - public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException { + public DeploymentInner getDeploymentSlot(String resourceGroupName, String name, String id, String slot) { return getDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot).toBlocking().single().getBody(); } @@ -7212,12 +7008,9 @@ private ServiceResponse getDeploymentSlotDelegate(Response createDeploymentSlotDelegate(Response deleteDeploymentSlotDelegate(Response getInstanceDeploymentSlotDelegate(Respo * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance * @param deployment Details of deployment - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the DeploymentInner object if successful. */ - public DeploymentInner createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) throws CloudException, IOException, IllegalArgumentException { + public DeploymentInner createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, DeploymentInner deployment) { return createInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId, deployment).toBlocking().single().getBody(); } @@ -7630,12 +7414,9 @@ private ServiceResponse createInstanceDeploymentSlotDelegate(Re * @param id Id of the deployment * @param slot Name of web app slot. If not specified then will default to production slot. * @param instanceId Id of web app instance - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public Object deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) { return deleteInstanceDeploymentSlotWithServiceResponseAsync(resourceGroupName, name, id, slot, instanceId).toBlocking().single().getBody(); } @@ -7731,16 +7512,13 @@ private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response getSiteInstanceIdentifiers(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteInstanceIdentifiers(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteInstanceIdentifiersSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7851,16 +7629,13 @@ private ServiceResponse> getSiteInstanceIdentifiersD * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInstanceInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteInstanceIdentifiersSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getSiteInstanceIdentifiersSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -7977,16 +7752,13 @@ private ServiceResponse> getSiteInstanceIdentifiersS * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSiteHostNameBindings(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteHostNameBindings(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteHostNameBindingsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -8097,16 +7869,13 @@ private ServiceResponse> getSiteHostNameBindingsD * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSiteHostNameBindingsSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteHostNameBindingsSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getSiteHostNameBindingsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -8224,12 +7993,9 @@ private ServiceResponse> getSiteHostNameBindingsS * @param resourceGroupName Name of resource group * @param name Name of web app * @param hostName Name of host - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostNameBindingInner object if successful. */ - public HostNameBindingInner getSiteHostNameBinding(String resourceGroupName, String name, String hostName) throws CloudException, IOException, IllegalArgumentException { + public HostNameBindingInner getSiteHostNameBinding(String resourceGroupName, String name, String hostName) { return getSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); } @@ -8315,12 +8081,9 @@ private ServiceResponse getSiteHostNameBindingDelegate(Res * @param name Name of web app * @param hostName Name of host * @param hostNameBinding Host name binding information - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostNameBindingInner object if successful. */ - public HostNameBindingInner createOrUpdateSiteHostNameBinding(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) throws CloudException, IOException, IllegalArgumentException { + public HostNameBindingInner createOrUpdateSiteHostNameBinding(String resourceGroupName, String name, String hostName, HostNameBindingInner hostNameBinding) { return createOrUpdateSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName, hostNameBinding).toBlocking().single().getBody(); } @@ -8412,12 +8175,9 @@ private ServiceResponse createOrUpdateSiteHostNameBindingD * @param resourceGroupName Name of resource group * @param name Name of web app * @param hostName Name of host - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteHostNameBinding(String resourceGroupName, String name, String hostName) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteHostNameBinding(String resourceGroupName, String name, String hostName) { return deleteSiteHostNameBindingWithServiceResponseAsync(resourceGroupName, name, hostName).toBlocking().single().getBody(); } @@ -8503,12 +8263,9 @@ private ServiceResponse deleteSiteHostNameBindingDelegate(Response getSiteHostNameBindingSlotDelegate * @param hostName Name of host * @param slot Name of web app slot. If not specified then will default to production slot. * @param hostNameBinding Host name binding information - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the HostNameBindingInner object if successful. */ - public HostNameBindingInner createOrUpdateSiteHostNameBindingSlot(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) throws CloudException, IOException, IllegalArgumentException { + public HostNameBindingInner createOrUpdateSiteHostNameBindingSlot(String resourceGroupName, String name, String hostName, String slot, HostNameBindingInner hostNameBinding) { return createOrUpdateSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, hostName, slot, hostNameBinding).toBlocking().single().getBody(); } @@ -8705,12 +8459,9 @@ private ServiceResponse createOrUpdateSiteHostNameBindingS * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param hostName Name of host - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteHostNameBindingSlot(String resourceGroupName, String name, String slot, String hostName) { return deleteSiteHostNameBindingSlotWithServiceResponseAsync(resourceGroupName, name, slot, hostName).toBlocking().single().getBody(); } @@ -8800,12 +8551,9 @@ private ServiceResponse deleteSiteHostNameBindingSlotDelegate(Response getSiteConfigDelegate(Response createOrUpdateSiteConfigDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param siteConfig Request body that contains the configuraiton setting for the web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteConfigInner object if successful. */ - public SiteConfigInner updateSiteConfig(String resourceGroupName, String name, SiteConfigInner siteConfig) throws CloudException, IOException, IllegalArgumentException { + public SiteConfigInner updateSiteConfig(String resourceGroupName, String name, SiteConfigInner siteConfig) { return updateSiteConfigWithServiceResponseAsync(resourceGroupName, name, siteConfig).toBlocking().single().getBody(); } @@ -9066,12 +8808,9 @@ private ServiceResponse updateSiteConfigDelegate(Response getSiteConfigSlotDelegate(Response createOrUpdateSiteConfigSlotDelegate(Re * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteConfig Request body that contains the configuraiton setting for the web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteConfigInner object if successful. */ - public SiteConfigInner updateSiteConfigSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) throws CloudException, IOException, IllegalArgumentException { + public SiteConfigInner updateSiteConfigSlot(String resourceGroupName, String name, String slot, SiteConfigInner siteConfig) { return updateSiteConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteConfig).toBlocking().single().getBody(); } @@ -9351,12 +9084,9 @@ private ServiceResponse updateSiteConfigSlotDelegate(Response getSiteSourceControlDelegate(Res * @param resourceGroupName Name of resource group * @param name Name of web app * @param siteSourceControl Request body that contains the source control parameters - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteSourceControlInner object if successful. */ - public SiteSourceControlInner createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public SiteSourceControlInner createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControlInner siteSourceControl) { return createOrUpdateSiteSourceControlWithServiceResponseAsync(resourceGroupName, name, siteSourceControl).toBlocking().single().getBody(); } @@ -9525,12 +9252,9 @@ private ServiceResponse createOrUpdateSiteSourceControlD * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteSourceControl(String resourceGroupName, String name) { return deleteSiteSourceControlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -9609,12 +9333,9 @@ private ServiceResponse deleteSiteSourceControlDelegate(Response updateSiteSourceControlDelegate( * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteSourceControlInner object if successful. */ - public SiteSourceControlInner getSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public SiteSourceControlInner getSiteSourceControlSlot(String resourceGroupName, String name, String slot) { return getSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -9791,12 +9509,9 @@ private ServiceResponse getSiteSourceControlSlotDelegate * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteSourceControl Request body that contains the source control parameters - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteSourceControlInner object if successful. */ - public SiteSourceControlInner createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public SiteSourceControlInner createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControlInner siteSourceControl) { return createOrUpdateSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteSourceControl).toBlocking().single().getBody(); } @@ -9888,12 +9603,9 @@ private ServiceResponse createOrUpdateSiteSourceControlS * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) { return deleteSiteSourceControlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -9979,12 +9691,9 @@ private ServiceResponse deleteSiteSourceControlSlotDelegate(Response updateSiteSourceControlSlotDeleg * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner listSiteAppSettingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner listSiteAppSettingsSlot(String resourceGroupName, String name, String slot) { return listSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -10165,12 +9871,9 @@ private ServiceResponse listSiteAppSettingsSlotDelegate(R * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner listSiteAppSettings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner listSiteAppSettings(String resourceGroupName, String name) { return listSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -10249,12 +9952,9 @@ private ServiceResponse listSiteAppSettingsDelegate(Respo * @param resourceGroupName Name of resource group * @param name Name of web app * @param appSettings Application settings of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner updateSiteAppSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner updateSiteAppSettings(String resourceGroupName, String name, StringDictionaryInner appSettings) { return updateSiteAppSettingsWithServiceResponseAsync(resourceGroupName, name, appSettings).toBlocking().single().getBody(); } @@ -10341,12 +10041,9 @@ private ServiceResponse updateSiteAppSettingsDelegate(Res * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param appSettings Application settings of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner updateSiteAppSettingsSlot(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner updateSiteAppSettingsSlot(String resourceGroupName, String name, String slot, StringDictionaryInner appSettings) { return updateSiteAppSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, appSettings).toBlocking().single().getBody(); } @@ -10437,12 +10134,9 @@ private ServiceResponse updateSiteAppSettingsSlotDelegate * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionStringDictionaryInner object if successful. */ - public ConnectionStringDictionaryInner listSiteConnectionStrings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ConnectionStringDictionaryInner listSiteConnectionStrings(String resourceGroupName, String name) { return listSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -10521,12 +10215,9 @@ private ServiceResponse listSiteConnectionStrin * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionStringDictionaryInner object if successful. */ - public ConnectionStringDictionaryInner listSiteConnectionStringsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ConnectionStringDictionaryInner listSiteConnectionStringsSlot(String resourceGroupName, String name, String slot) { return listSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -10611,12 +10302,9 @@ private ServiceResponse listSiteConnectionStrin * @param resourceGroupName Name of resource group * @param name Name of web app * @param connectionStrings Connection strings associated with web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionStringDictionaryInner object if successful. */ - public ConnectionStringDictionaryInner updateSiteConnectionStrings(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) throws CloudException, IOException, IllegalArgumentException { + public ConnectionStringDictionaryInner updateSiteConnectionStrings(String resourceGroupName, String name, ConnectionStringDictionaryInner connectionStrings) { return updateSiteConnectionStringsWithServiceResponseAsync(resourceGroupName, name, connectionStrings).toBlocking().single().getBody(); } @@ -10703,12 +10391,9 @@ private ServiceResponse updateSiteConnectionStr * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param connectionStrings Connection strings associated with web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ConnectionStringDictionaryInner object if successful. */ - public ConnectionStringDictionaryInner updateSiteConnectionStringsSlot(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) throws CloudException, IOException, IllegalArgumentException { + public ConnectionStringDictionaryInner updateSiteConnectionStringsSlot(String resourceGroupName, String name, String slot, ConnectionStringDictionaryInner connectionStrings) { return updateSiteConnectionStringsSlotWithServiceResponseAsync(resourceGroupName, name, slot, connectionStrings).toBlocking().single().getBody(); } @@ -10799,12 +10484,9 @@ private ServiceResponse updateSiteConnectionStr * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteAuthSettingsInner object if successful. */ - public SiteAuthSettingsInner listSiteAuthSettings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public SiteAuthSettingsInner listSiteAuthSettings(String resourceGroupName, String name) { return listSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -10883,12 +10565,9 @@ private ServiceResponse listSiteAuthSettingsDelegate(Resp * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteAuthSettingsInner object if successful. */ - public SiteAuthSettingsInner listSiteAuthSettingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public SiteAuthSettingsInner listSiteAuthSettingsSlot(String resourceGroupName, String name, String slot) { return listSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -10973,12 +10652,9 @@ private ServiceResponse listSiteAuthSettingsSlotDelegate( * @param resourceGroupName Name of resource group * @param name Name of web app * @param siteAuthSettings Auth settings associated with web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteAuthSettingsInner object if successful. */ - public SiteAuthSettingsInner updateSiteAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) throws CloudException, IOException, IllegalArgumentException { + public SiteAuthSettingsInner updateSiteAuthSettings(String resourceGroupName, String name, SiteAuthSettingsInner siteAuthSettings) { return updateSiteAuthSettingsWithServiceResponseAsync(resourceGroupName, name, siteAuthSettings).toBlocking().single().getBody(); } @@ -11065,12 +10741,9 @@ private ServiceResponse updateSiteAuthSettingsDelegate(Re * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteAuthSettings Auth settings associated with web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteAuthSettingsInner object if successful. */ - public SiteAuthSettingsInner updateSiteAuthSettingsSlot(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) throws CloudException, IOException, IllegalArgumentException { + public SiteAuthSettingsInner updateSiteAuthSettingsSlot(String resourceGroupName, String name, String slot, SiteAuthSettingsInner siteAuthSettings) { return updateSiteAuthSettingsSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteAuthSettings).toBlocking().single().getBody(); } @@ -11161,13 +10834,9 @@ private ServiceResponse updateSiteAuthSettingsSlotDelegat * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the UserInner object if successful. */ - public UserInner listSitePublishingCredentials(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public UserInner listSitePublishingCredentials(String resourceGroupName, String name) { return listSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().last().getBody(); } @@ -11228,12 +10897,9 @@ public Observable> listSitePublishingCredentialsWithS * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner beginListSitePublishingCredentials(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public UserInner beginListSitePublishingCredentials(String resourceGroupName, String name) { return beginListSitePublishingCredentialsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -11312,13 +10978,9 @@ private ServiceResponse beginListSitePublishingCredentialsDelegate(Re * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the UserInner object if successful. */ - public UserInner listSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public UserInner listSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) { return listSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().last().getBody(); } @@ -11386,12 +11048,9 @@ public Observable> listSitePublishingCredentialsSlotW * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the UserInner object if successful. */ - public UserInner beginListSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public UserInner beginListSitePublishingCredentialsSlot(String resourceGroupName, String name, String slot) { return beginListSitePublishingCredentialsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -11475,12 +11134,9 @@ private ServiceResponse beginListSitePublishingCredentialsSlotDelegat * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner listSiteMetadata(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner listSiteMetadata(String resourceGroupName, String name) { return listSiteMetadataWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -11559,12 +11215,9 @@ private ServiceResponse listSiteMetadataDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner listSiteMetadataSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner listSiteMetadataSlot(String resourceGroupName, String name, String slot) { return listSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -11649,12 +11302,9 @@ private ServiceResponse listSiteMetadataSlotDelegate(Resp * @param resourceGroupName Name of resource group * @param name Name of web app * @param metadata Meta data of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner updateSiteMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner updateSiteMetadata(String resourceGroupName, String name, StringDictionaryInner metadata) { return updateSiteMetadataWithServiceResponseAsync(resourceGroupName, name, metadata).toBlocking().single().getBody(); } @@ -11741,12 +11391,9 @@ private ServiceResponse updateSiteMetadataDelegate(Respon * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param metadata Meta data of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the StringDictionaryInner object if successful. */ - public StringDictionaryInner updateSiteMetadataSlot(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) throws CloudException, IOException, IllegalArgumentException { + public StringDictionaryInner updateSiteMetadataSlot(String resourceGroupName, String name, String slot, StringDictionaryInner metadata) { return updateSiteMetadataSlotWithServiceResponseAsync(resourceGroupName, name, slot, metadata).toBlocking().single().getBody(); } @@ -11837,12 +11484,9 @@ private ServiceResponse updateSiteMetadataSlotDelegate(Re * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteLogsConfigInner object if successful. */ - public SiteLogsConfigInner getSiteLogsConfig(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public SiteLogsConfigInner getSiteLogsConfig(String resourceGroupName, String name) { return getSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -11921,12 +11565,9 @@ private ServiceResponse getSiteLogsConfigDelegate(Response< * @param resourceGroupName Name of resource group * @param name Name of web app * @param siteLogsConfig Site logs configuration - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteLogsConfigInner object if successful. */ - public SiteLogsConfigInner updateSiteLogsConfig(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) throws CloudException, IOException, IllegalArgumentException { + public SiteLogsConfigInner updateSiteLogsConfig(String resourceGroupName, String name, SiteLogsConfigInner siteLogsConfig) { return updateSiteLogsConfigWithServiceResponseAsync(resourceGroupName, name, siteLogsConfig).toBlocking().single().getBody(); } @@ -12012,12 +11653,9 @@ private ServiceResponse updateSiteLogsConfigDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteLogsConfigInner object if successful. */ - public SiteLogsConfigInner getSiteLogsConfigSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public SiteLogsConfigInner getSiteLogsConfigSlot(String resourceGroupName, String name, String slot) { return getSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -12103,12 +11741,9 @@ private ServiceResponse getSiteLogsConfigSlotDelegate(Respo * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param siteLogsConfig Site logs configuration - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the SiteLogsConfigInner object if successful. */ - public SiteLogsConfigInner updateSiteLogsConfigSlot(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) throws CloudException, IOException, IllegalArgumentException { + public SiteLogsConfigInner updateSiteLogsConfigSlot(String resourceGroupName, String name, String slot, SiteLogsConfigInner siteLogsConfig) { return updateSiteLogsConfigSlotWithServiceResponseAsync(resourceGroupName, name, slot, siteLogsConfig).toBlocking().single().getBody(); } @@ -12198,12 +11833,9 @@ private ServiceResponse updateSiteLogsConfigSlotDelegate(Re * * @param resourceGroupName the String value * @param name the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object listSitePremierAddOns(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object listSitePremierAddOns(String resourceGroupName, String name) { return listSitePremierAddOnsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -12278,12 +11910,9 @@ private ServiceResponse listSitePremierAddOnsDelegate(Response listSitePremierAddOnsSlotDelegate(Response getSitePremierAddOnDelegate(Response addSitePremierAddOnDelegate(Response deleteSitePremierAddOnDelegate(Response getSitePremierAddOnSlotDelegate(Response addSitePremierAddOnSlotDelegate(Response deleteSitePremierAddOnSlotDelegate(Response getSiteBackupConfigurationDelegate(R * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupRequestInner object if successful. */ - public BackupRequestInner getSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public BackupRequestInner getSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot) { return getSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -13091,12 +12696,9 @@ private ServiceResponse getSiteBackupConfigurationSlotDelega * @param resourceGroupName Name of resource group * @param name Name of web app * @param request Information on backup request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupRequestInner object if successful. */ - public BackupRequestInner updateSiteBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public BackupRequestInner updateSiteBackupConfiguration(String resourceGroupName, String name, BackupRequestInner request) { return updateSiteBackupConfigurationWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); } @@ -13183,12 +12785,9 @@ private ServiceResponse updateSiteBackupConfigurationDelegat * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param request Information on backup request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupRequestInner object if successful. */ - public BackupRequestInner updateSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public BackupRequestInner updateSiteBackupConfigurationSlot(String resourceGroupName, String name, String slot, BackupRequestInner request) { return updateSiteBackupConfigurationSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); } @@ -13280,12 +12879,9 @@ private ServiceResponse updateSiteBackupConfigurationSlotDel * @param resourceGroupName Name of resource group * @param name Name of web app * @param request Information on backup request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupItemInner object if successful. */ - public BackupItemInner backupSite(String resourceGroupName, String name, BackupRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public BackupItemInner backupSite(String resourceGroupName, String name, BackupRequestInner request) { return backupSiteWithServiceResponseAsync(resourceGroupName, name, request).toBlocking().single().getBody(); } @@ -13372,12 +12968,9 @@ private ServiceResponse backupSiteDelegate(Response backupSiteSlotDelegate(Response discoverSiteRestoreDelegate(Respons * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. * @param request Information on restore request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RestoreRequestInner object if successful. */ - public RestoreRequestInner discoverSiteRestoreSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public RestoreRequestInner discoverSiteRestoreSlot(String resourceGroupName, String name, String slot, RestoreRequestInner request) { return discoverSiteRestoreSlotWithServiceResponseAsync(resourceGroupName, name, slot, request).toBlocking().single().getBody(); } @@ -13657,16 +13244,13 @@ private ServiceResponse discoverSiteRestoreSlotDelegate(Res * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList listSiteBackups(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSiteBackups(final String resourceGroupName, final String name) { ServiceResponse> response = listSiteBackupsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -13777,16 +13361,13 @@ private ServiceResponse> listSiteBackupsDelegate(Respo * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList listSiteBackupsSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSiteBackupsSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = listSiteBackupsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -13904,12 +13485,9 @@ private ServiceResponse> listSiteBackupsSlotDelegate(R * @param resourceGroupName Name of resource group * @param name Name of web app * @param backupId Id of backup - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupItemInner object if successful. */ - public BackupItemInner getSiteBackupStatus(String resourceGroupName, String name, String backupId) throws CloudException, IOException, IllegalArgumentException { + public BackupItemInner getSiteBackupStatus(String resourceGroupName, String name, String backupId) { return getSiteBackupStatusWithServiceResponseAsync(resourceGroupName, name, backupId).toBlocking().single().getBody(); } @@ -13994,12 +13572,9 @@ private ServiceResponse getSiteBackupStatusDelegate(Response deleteBackupDelegate(Response getSiteBackupStatusSlotDelegate(Respons * @param name Name of web app * @param backupId Id of backup * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupItemInner object if successful. */ - public BackupItemInner deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) throws CloudException, IOException, IllegalArgumentException { + public BackupItemInner deleteBackupSlot(String resourceGroupName, String name, String backupId, String slot) { return deleteBackupSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot).toBlocking().single().getBody(); } @@ -14280,12 +13849,9 @@ private ServiceResponse deleteBackupSlotDelegate(Response getSiteBackupStatusSecretsSlotDelegate( * @param name Name of web app * @param backupId Id of backup * @param request Information on backup request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the BackupItemInner object if successful. */ - public BackupItemInner getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public BackupItemInner getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequestInner request) { return getSiteBackupStatusSecretsWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); } @@ -14482,13 +14045,9 @@ private ServiceResponse getSiteBackupStatusSecretsDelegate(Resp * @param name Name of web app * @param backupId Id of backup to restore * @param request Information on restore request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the RestoreResponseInner object if successful. */ - public RestoreResponseInner restoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public RestoreResponseInner restoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { return restoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().last().getBody(); } @@ -14564,12 +14123,9 @@ public Observable> restoreSiteWithServiceR * @param name Name of web app * @param backupId Id of backup to restore * @param request Information on restore request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RestoreResponseInner object if successful. */ - public RestoreResponseInner beginRestoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public RestoreResponseInner beginRestoreSite(String resourceGroupName, String name, String backupId, RestoreRequestInner request) { return beginRestoreSiteWithServiceResponseAsync(resourceGroupName, name, backupId, request).toBlocking().single().getBody(); } @@ -14663,13 +14219,9 @@ private ServiceResponse beginRestoreSiteDelegate(Response< * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. * @param request Information on restore request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters - * @throws InterruptedException exception thrown when long running operation is interrupted * @return the RestoreResponseInner object if successful. */ - public RestoreResponseInner restoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) throws CloudException, IOException, IllegalArgumentException, InterruptedException { + public RestoreResponseInner restoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { return restoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().last().getBody(); } @@ -14752,12 +14304,9 @@ public Observable> restoreSiteSlotWithServ * @param backupId Id of backup to restore * @param slot Name of web app slot. If not specified then will default to production slot. * @param request Information on restore request - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RestoreResponseInner object if successful. */ - public RestoreResponseInner beginRestoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) throws CloudException, IOException, IllegalArgumentException { + public RestoreResponseInner beginRestoreSiteSlot(String resourceGroupName, String name, String backupId, String slot, RestoreRequestInner request) { return beginRestoreSiteSlotWithServiceResponseAsync(resourceGroupName, name, backupId, slot, request).toBlocking().single().getBody(); } @@ -14854,16 +14403,13 @@ private ServiceResponse beginRestoreSiteSlotDelegate(Respo * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteUsages(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsages(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteUsagesSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -14968,16 +14514,13 @@ public Observable>> call(Response getSiteUsages(final String resourceGroupName, final String name, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsages(final String resourceGroupName, final String name, final String filter) { ServiceResponse> response = getSiteUsagesSinglePageAsync(resourceGroupName, name, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15092,16 +14635,13 @@ private ServiceResponse> getSiteUsagesDelegate(Resp * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15214,16 +14754,13 @@ public Observable>> call(Response getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsagesSlot(final String resourceGroupName, final String name, final String slot, final String filter) { ServiceResponse> response = getSiteUsagesSlotSinglePageAsync(resourceGroupName, name, slot, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15344,16 +14881,13 @@ private ServiceResponse> getSiteUsagesSlotDelegate( * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteMetrics(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetrics(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteMetricsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15460,16 +14994,13 @@ public Observable>> call(Response getSiteMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetrics(final String resourceGroupName, final String name, final Boolean details, final String filter) { ServiceResponse> response = getSiteMetricsSinglePageAsync(resourceGroupName, name, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15588,16 +15119,13 @@ private ServiceResponse> getSiteMetricsDelegate(Re * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15712,16 +15240,13 @@ public Observable>> call(Response getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricsSlot(final String resourceGroupName, final String name, final String slot, final Boolean details, final String filter) { ServiceResponse> response = getSiteMetricsSlotSinglePageAsync(resourceGroupName, name, slot, details, filter).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15847,16 +15372,13 @@ private ServiceResponse> getSiteMetricsSlotDelegat * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteMetricDefinitionsSlot(final String resourceGroupName, final String name, final String slot) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricDefinitionsSlot(final String resourceGroupName, final String name, final String slot) { ServiceResponse> response = getSiteMetricDefinitionsSlotSinglePageAsync(resourceGroupName, name, slot).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -15973,16 +15495,13 @@ private ServiceResponse> getSiteMetricDefinition * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteMetricDefinitions(final String resourceGroupName, final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricDefinitions(final String resourceGroupName, final String name) { ServiceResponse> response = getSiteMetricDefinitionsSinglePageAsync(resourceGroupName, name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -16092,12 +15611,9 @@ private ServiceResponse> getSiteMetricDefinition * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the InputStream object if successful. */ - public InputStream listSitePublishingProfileXml(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public InputStream listSitePublishingProfileXml(String resourceGroupName, String name) { return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -16175,12 +15691,9 @@ public Observable> call(Response resp FileZilla3 WebDeploy -- default Ftp - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the InputStream object if successful. */ - public InputStream listSitePublishingProfileXml(String resourceGroupName, String name, String format) throws CloudException, IOException, IllegalArgumentException { + public InputStream listSitePublishingProfileXml(String resourceGroupName, String name, String format) { return listSitePublishingProfileXmlWithServiceResponseAsync(resourceGroupName, name, format).toBlocking().single().getBody(); } @@ -16273,12 +15786,9 @@ private ServiceResponse listSitePublishingProfileXmlDelegate(Respon * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the InputStream object if successful. */ - public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot) { return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -16363,12 +15873,9 @@ public Observable> call(Response resp FileZilla3 WebDeploy -- default Ftp - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the InputStream object if successful. */ - public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot, String format) throws CloudException, IOException, IllegalArgumentException { + public InputStream listSitePublishingProfileXmlSlot(String resourceGroupName, String name, String slot, String format) { return listSitePublishingProfileXmlSlotWithServiceResponseAsync(resourceGroupName, name, slot, format).toBlocking().single().getBody(); } @@ -16467,12 +15974,9 @@ private ServiceResponse listSitePublishingProfileXmlSlotDelegate(Re * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object restartSiteSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object restartSiteSlot(String resourceGroupName, String name, String slot) { return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -16554,12 +16058,9 @@ public Observable> call(Response response) * @param slot Name of web app slot. If not specified then will default to production slot. * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app * @param synchronous If true then the API will block until the app has been restarted - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object restartSiteSlot(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) throws CloudException, IOException, IllegalArgumentException { + public Object restartSiteSlot(String resourceGroupName, String name, String slot, Boolean softRestart, Boolean synchronous) { return restartSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot, softRestart, synchronous).toBlocking().single().getBody(); } @@ -16649,12 +16150,9 @@ private ServiceResponse restartSiteSlotDelegate(Response r * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object restartSite(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object restartSite(String resourceGroupName, String name) { return restartSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -16729,12 +16227,9 @@ public Observable> call(Response response) * @param name Name of web app * @param softRestart Soft restart applies the configuration settings and restarts the app if necessary. Hard restart always restarts and reprovisions the app * @param synchronous If true then the API will block until the app has been restarted - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object restartSite(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) throws CloudException, IOException, IllegalArgumentException { + public Object restartSite(String resourceGroupName, String name, Boolean softRestart, Boolean synchronous) { return restartSiteWithServiceResponseAsync(resourceGroupName, name, softRestart, synchronous).toBlocking().single().getBody(); } @@ -16818,12 +16313,9 @@ private ServiceResponse restartSiteDelegate(Response respo * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object startSite(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object startSite(String resourceGroupName, String name) { return startSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -16902,12 +16394,9 @@ private ServiceResponse startSiteDelegate(Response respons * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object startSiteSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object startSiteSlot(String resourceGroupName, String name, String slot) { return startSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -16991,12 +16480,9 @@ private ServiceResponse startSiteSlotDelegate(Response res * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object stopSite(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object stopSite(String resourceGroupName, String name) { return stopSiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -17075,12 +16561,9 @@ private ServiceResponse stopSiteDelegate(Response response * @param resourceGroupName Name of resource group * @param name Name of web app * @param slot Name of web app slot. If not specified then will default to production slot. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object stopSiteSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object stopSiteSlot(String resourceGroupName, String name, String slot) { return stopSiteSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -17163,12 +16646,9 @@ private ServiceResponse stopSiteSlotDelegate(Response resp * * @param resourceGroupName the String value * @param name the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object syncSiteRepository(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object syncSiteRepository(String resourceGroupName, String name) { return syncSiteRepositoryWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -17243,12 +16723,9 @@ private ServiceResponse syncSiteRepositoryDelegate(Response syncSiteRepositorySlotDelegate(Response generateNewSitePublishingPasswordSlotDelegate(Re * * @param resourceGroupName Name of resource group * @param name Name of web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object generateNewSitePublishingPassword(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public Object generateNewSitePublishingPassword(String resourceGroupName, String name) { return generateNewSitePublishingPasswordWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -17503,12 +16974,9 @@ private ServiceResponse generateNewSitePublishingPasswordDelegate(Respon * @param resourceGroupName The resource group name * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner getSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner getSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) { return getSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); } @@ -17594,12 +17062,9 @@ private ServiceResponse getSiteRelayServiceCo * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified * @param connectionEnvelope The details of the Hybrid Connection - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { return createOrUpdateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); } @@ -17691,12 +17156,9 @@ private ServiceResponse createOrUpdateSiteRel * @param resourceGroupName The resource group name * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteRelayServiceConnection(String resourceGroupName, String name, String entityName) { return deleteSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName).toBlocking().single().getBody(); } @@ -17782,12 +17244,9 @@ private ServiceResponse deleteSiteRelayServiceConnectionDelegate(Respons * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified * @param connectionEnvelope The details of the Hybrid Connection - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner updateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner updateSiteRelayServiceConnection(String resourceGroupName, String name, String entityName, RelayServiceConnectionEntityInner connectionEnvelope) { return updateSiteRelayServiceConnectionWithServiceResponseAsync(resourceGroupName, name, entityName, connectionEnvelope).toBlocking().single().getBody(); } @@ -17880,12 +17339,9 @@ private ServiceResponse updateSiteRelayServic * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified * @param slot The name of the slot for the web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner getSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner getSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { return getSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); } @@ -17978,12 +17434,9 @@ private ServiceResponse getSiteRelayServiceCo * @param entityName The name by which the Hybrid Connection is identified * @param slot The name of the slot for the web app. * @param connectionEnvelope The details of the Hybrid Connection - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner createOrUpdateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { return createOrUpdateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); } @@ -18082,12 +17535,9 @@ private ServiceResponse createOrUpdateSiteRel * @param name The name of the web app * @param entityName The name by which the Hybrid Connection is identified * @param slot The name of the slot for the web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object deleteSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object deleteSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot) { return deleteSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot).toBlocking().single().getBody(); } @@ -18180,12 +17630,9 @@ private ServiceResponse deleteSiteRelayServiceConnectionSlotDelegate(Res * @param entityName The name by which the Hybrid Connection is identified * @param slot The name of the slot for the web app. * @param connectionEnvelope The details of the Hybrid Connection - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner updateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner updateSiteRelayServiceConnectionSlot(String resourceGroupName, String name, String entityName, String slot, RelayServiceConnectionEntityInner connectionEnvelope) { return updateSiteRelayServiceConnectionSlotWithServiceResponseAsync(resourceGroupName, name, entityName, slot, connectionEnvelope).toBlocking().single().getBody(); } @@ -18283,12 +17730,9 @@ private ServiceResponse updateSiteRelayServic * @param resourceGroupName The resource group name * @param name The name of the web app * @param slot The name of the slot for the web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) { return listSiteRelayServiceConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -18372,12 +17816,9 @@ private ServiceResponse listSiteRelayServiceC * * @param resourceGroupName The resource group name * @param name The name of the web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the RelayServiceConnectionEntityInner object if successful. */ - public RelayServiceConnectionEntityInner listSiteRelayServiceConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public RelayServiceConnectionEntityInner listSiteRelayServiceConnections(String resourceGroupName, String name) { return listSiteRelayServiceConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -18458,12 +17899,9 @@ private ServiceResponse listSiteRelayServiceC * @param vnetName The name of the Virtual Network * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" * @param slot The name of the slot for this web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) throws CloudException, IOException, IllegalArgumentException { + public Object getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) { return getSiteVnetGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot).toBlocking().single().getBody(); } @@ -18564,12 +18002,9 @@ private ServiceResponse getSiteVnetGatewaySlotDelegate(Response createOrUpdateSiteVNETConnectionGatewa * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" * @param slot The name of the slot for this web app. * @param connectionEnvelope The properties to update this gateway with. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetGatewayInner object if successful. */ - public VnetGatewayInner updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public VnetGatewayInner updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGatewayInner connectionEnvelope) { return updateSiteVNETConnectionGatewaySlotWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, slot, connectionEnvelope).toBlocking().single().getBody(); } @@ -18786,12 +18218,9 @@ private ServiceResponse updateSiteVNETConnectionGatewaySlotDel * @param name The name of the web app * @param vnetName The name of the Virtual Network * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getSiteVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) throws CloudException, IOException, IllegalArgumentException { + public Object getSiteVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) { return getSiteVnetGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName).toBlocking().single().getBody(); } @@ -18885,12 +18314,9 @@ private ServiceResponse getSiteVnetGatewayDelegate(Response createOrUpdateSiteVNETConnectionGatewa * @param vnetName The name of the Virtual Network * @param gatewayName The name of the gateway. The only gateway that exists presently is "primary" * @param connectionEnvelope The properties to update this gateway with. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VnetGatewayInner object if successful. */ - public VnetGatewayInner updateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public VnetGatewayInner updateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGatewayInner connectionEnvelope) { return updateSiteVNETConnectionGatewayWithServiceResponseAsync(resourceGroupName, name, vnetName, gatewayName, connectionEnvelope).toBlocking().single().getBody(); } @@ -19092,12 +18515,9 @@ private ServiceResponse updateSiteVNETConnectionGatewayDelegat * * @param resourceGroupName The resource group name * @param name The name of the web app - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VnetInfoInner> object if successful. */ - public List getSiteVNETConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public List getSiteVNETConnections(String resourceGroupName, String name) { return getSiteVNETConnectionsWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().getBody(); } @@ -19176,12 +18596,9 @@ private ServiceResponse> getSiteVNETConnectionsDelegate(Resp * @param resourceGroupName The resource group name * @param name The name of the web app * @param slot The name of the slot for this web app. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VnetInfoInner> object if successful. */ - public List getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public List getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) { return getSiteVNETConnectionsSlotWithServiceResponseAsync(resourceGroupName, name, slot).toBlocking().single().getBody(); } @@ -19264,16 +18681,13 @@ private ServiceResponse> getSiteVNETConnectionsSlotDelegate( * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SlotDifferenceInner> object if successful. */ - public PagedList getSlotsDifferencesFromProductionNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSlotsDifferencesFromProductionNext(final String nextPageLink) { ServiceResponse> response = getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSlotsDifferencesFromProductionNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19370,16 +18784,13 @@ private ServiceResponse> getSlotsDifferencesFromPr * Get the difference in configuration settings between two web app slots. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SlotDifferenceInner> object if successful. */ - public PagedList getSlotsDifferencesSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSlotsDifferencesSlotNext(final String nextPageLink) { ServiceResponse> response = getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSlotsDifferencesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19476,16 +18887,13 @@ private ServiceResponse> getSlotsDifferencesSlotNe * Gets all the slots for a web apps. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInner> object if successful. */ - public PagedList getSiteSlotsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteSlotsNext(final String nextPageLink) { ServiceResponse> response = getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteSlotsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19582,16 +18990,13 @@ private ServiceResponse> getSiteSlotsNextDelegate(Response getSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSitesNext(final String nextPageLink) { ServiceResponse> response = getSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19688,16 +19093,13 @@ private ServiceResponse> getSitesNextDelegate(Response getDeletedSitesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeletedSitesNext(final String nextPageLink) { ServiceResponse> response = getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeletedSitesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19794,16 +19196,13 @@ private ServiceResponse> getDeletedSitesNextDelegate( * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getDeploymentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeploymentsNext(final String nextPageLink) { ServiceResponse> response = getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -19900,16 +19299,13 @@ private ServiceResponse> getDeploymentsNextDelegate(Re * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getDeploymentsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getDeploymentsSlotNext(final String nextPageLink) { ServiceResponse> response = getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20006,16 +19402,13 @@ private ServiceResponse> getDeploymentsSlotNextDelegat * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getInstanceDeploymentsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getInstanceDeploymentsNext(final String nextPageLink) { ServiceResponse> response = getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getInstanceDeploymentsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20112,16 +19505,13 @@ private ServiceResponse> getInstanceDeploymentsNextDel * List deployments. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<DeploymentInner> object if successful. */ - public PagedList getInstanceDeploymentsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getInstanceDeploymentsSlotNext(final String nextPageLink) { ServiceResponse> response = getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getInstanceDeploymentsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20218,16 +19608,13 @@ private ServiceResponse> getInstanceDeploymentsSlotNex * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInstanceInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteInstanceIdentifiersNext(final String nextPageLink) { ServiceResponse> response = getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteInstanceIdentifiersNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20324,16 +19711,13 @@ private ServiceResponse> getSiteInstanceIdentifiersN * Gets all instance of a web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<SiteInstanceInner> object if successful. */ - public PagedList getSiteInstanceIdentifiersSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteInstanceIdentifiersSlotNext(final String nextPageLink) { ServiceResponse> response = getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteInstanceIdentifiersSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20430,16 +19814,13 @@ private ServiceResponse> getSiteInstanceIdentifiersS * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSiteHostNameBindingsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteHostNameBindingsNext(final String nextPageLink) { ServiceResponse> response = getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteHostNameBindingsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20536,16 +19917,13 @@ private ServiceResponse> getSiteHostNameBindingsN * Get web app hostname bindings. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<HostNameBindingInner> object if successful. */ - public PagedList getSiteHostNameBindingsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteHostNameBindingsSlotNext(final String nextPageLink) { ServiceResponse> response = getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteHostNameBindingsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20642,16 +20020,13 @@ private ServiceResponse> getSiteHostNameBindingsS * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList listSiteBackupsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSiteBackupsNext(final String nextPageLink) { ServiceResponse> response = listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSiteBackupsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20748,16 +20123,13 @@ private ServiceResponse> listSiteBackupsNextDelegate(R * Lists all available backups for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<BackupItemInner> object if successful. */ - public PagedList listSiteBackupsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listSiteBackupsSlotNext(final String nextPageLink) { ServiceResponse> response = listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listSiteBackupsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20854,16 +20226,13 @@ private ServiceResponse> listSiteBackupsSlotNextDelega * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteUsagesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsagesNext(final String nextPageLink) { ServiceResponse> response = getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -20960,16 +20329,13 @@ private ServiceResponse> getSiteUsagesNextDelegate( * Gets the quota usage numbers for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<CsmUsageQuotaInner> object if successful. */ - public PagedList getSiteUsagesSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteUsagesSlotNext(final String nextPageLink) { ServiceResponse> response = getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteUsagesSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -21066,16 +20432,13 @@ private ServiceResponse> getSiteUsagesSlotNextDeleg * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteMetricsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricsNext(final String nextPageLink) { ServiceResponse> response = getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -21172,16 +20535,13 @@ private ServiceResponse> getSiteMetricsNextDelegat * Gets metrics for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<ResourceMetricInner> object if successful. */ - public PagedList getSiteMetricsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricsSlotNext(final String nextPageLink) { ServiceResponse> response = getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -21278,16 +20638,13 @@ private ServiceResponse> getSiteMetricsSlotNextDel * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteMetricDefinitionsSlotNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricDefinitionsSlotNext(final String nextPageLink) { ServiceResponse> response = getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricDefinitionsSlotNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -21384,16 +20741,13 @@ private ServiceResponse> getSiteMetricDefinition * Gets metric definitions for web app. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<MetricDefinitionInner> object if successful. */ - public PagedList getSiteMetricDefinitionsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getSiteMetricDefinitionsNext(final String nextPageLink) { ServiceResponse> response = getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getSiteMetricDefinitionsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java index 9fd29283824a..796f48bcf655 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/TopLevelDomainsInner.java @@ -17,7 +17,6 @@ import com.microsoft.azure.management.website.TopLevelDomainAgreementOption; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -86,16 +85,13 @@ interface TopLevelDomainsService { /** * Lists all top level domains supported for registration. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TopLevelDomainInner> object if successful. */ - public PagedList getGetTopLevelDomains() throws CloudException, IOException, IllegalArgumentException { + public PagedList getGetTopLevelDomains() { ServiceResponse> response = getGetTopLevelDomainsSinglePageAsync().toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -190,12 +186,9 @@ private ServiceResponse> getGetTopLevelDomainsDele * Gets details of a top level domain. * * @param name Name of the top level domain - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the TopLevelDomainInner object if successful. */ - public TopLevelDomainInner getTopLevelDomain(String name) throws CloudException, IOException, IllegalArgumentException { + public TopLevelDomainInner getTopLevelDomain(String name) { return getTopLevelDomainWithServiceResponseAsync(name).toBlocking().single().getBody(); } @@ -266,16 +259,13 @@ private ServiceResponse getTopLevelDomainDelegate(Response< * Lists legal agreements that user needs to accept before purchasing domain. * * @param name Name of the top level domain - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TldLegalAgreementInner> object if successful. */ - public PagedList listTopLevelDomainAgreements(final String name) throws CloudException, IOException, IllegalArgumentException { + public PagedList listTopLevelDomainAgreements(final String name) { ServiceResponse> response = listTopLevelDomainAgreementsSinglePageAsync(name).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -374,16 +364,13 @@ public Observable>> call(Response listTopLevelDomainAgreements(final String name, final Boolean includePrivacy) throws CloudException, IOException, IllegalArgumentException { + public PagedList listTopLevelDomainAgreements(final String name, final Boolean includePrivacy) { ServiceResponse> response = listTopLevelDomainAgreementsSinglePageAsync(name, includePrivacy).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -491,16 +478,13 @@ private ServiceResponse> listTopLevelDomainAgre * Lists all top level domains supported for registration. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TopLevelDomainInner> object if successful. */ - public PagedList getGetTopLevelDomainsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList getGetTopLevelDomainsNext(final String nextPageLink) { ServiceResponse> response = getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return getGetTopLevelDomainsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; @@ -597,16 +581,13 @@ private ServiceResponse> getGetTopLevelDomainsNext * Lists legal agreements that user needs to accept before purchasing domain. * * @param nextPageLink The NextLink from the previous successful call to List operation. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the PagedList<TldLegalAgreementInner> object if successful. */ - public PagedList listTopLevelDomainAgreementsNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { + public PagedList listTopLevelDomainAgreementsNext(final String nextPageLink) { ServiceResponse> response = listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single(); return new PagedList(response.getBody()) { @Override - public Page nextPage(String nextPageLink) throws RestException, IOException { + public Page nextPage(String nextPageLink) { return listTopLevelDomainAgreementsNextSinglePageAsync(nextPageLink).toBlocking().single().getBody(); } }; diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java index d36b352b68fd..9d2a730ad0dd 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/implementation/UsagesInner.java @@ -65,12 +65,9 @@ interface UsagesService { * @param environmentName Environment name * @param lastId Last marker that was returned from the batch * @param batchSize size of the batch to be returned. - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object if successful. */ - public Object getUsage(String resourceGroupName, String environmentName, String lastId, int batchSize) throws CloudException, IOException, IllegalArgumentException { + public Object getUsage(String resourceGroupName, String environmentName, String lastId, int batchSize) { return getUsageWithServiceResponseAsync(resourceGroupName, environmentName, lastId, batchSize).toBlocking().single().getBody(); } diff --git a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java index 46c02402ed53..86a4f9afcd6a 100644 --- a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java +++ b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java @@ -7,9 +7,6 @@ package com.microsoft.azure; -import com.microsoft.rest.RestException; - -import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -54,17 +51,13 @@ public PagedList(Page page) { } private void cachePage(String nextPageLink) { - try { - while (nextPageLink != null) { - cachedPage = nextPage(nextPageLink); - nextPageLink = cachedPage.getNextPageLink(); - if (hasNextPage()) { - // a legit, non-empty page has been fetched, otherwise keep fetching - break; - } + while (nextPageLink != null) { + cachedPage = nextPage(nextPageLink); + nextPageLink = cachedPage.getNextPageLink(); + if (hasNextPage()) { + // a legit, non-empty page has been fetched, otherwise keep fetching + break; } - } catch (IOException ex) { - throw new RuntimeException(ex); } } @@ -73,10 +66,8 @@ private void cachePage(String nextPageLink) { * * @param nextPageLink the link to get the next page of items. * @return the {@link Page} object storing a page of items and a link to the next page. - * @throws RestException thrown if an error is raised from Azure. - * @throws IOException thrown if there's any failure in deserialization. */ - public abstract Page nextPage(String nextPageLink) throws RestException, IOException; + public abstract Page nextPage(String nextPageLink); /** * If there are more pages available. diff --git a/runtimes/azure-client-runtime/src/test/java/com/microsoft/azure/PagedListTests.java b/runtimes/azure-client-runtime/src/test/java/com/microsoft/azure/PagedListTests.java index 04567aa1c673..dfac45400504 100644 --- a/runtimes/azure-client-runtime/src/test/java/com/microsoft/azure/PagedListTests.java +++ b/runtimes/azure-client-runtime/src/test/java/com/microsoft/azure/PagedListTests.java @@ -11,7 +11,6 @@ import org.junit.Before; import org.junit.Test; -import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -23,7 +22,7 @@ public class PagedListTests { public void setupList() { list = new PagedList(new TestPage(0, 21)) { @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { + public Page nextPage(String nextPageLink) { int pageNum = Integer.parseInt(nextPageLink); return new TestPage(pageNum, 21); } From d829c89593f11f783a2c2df86ffe2f3841b578cc Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 15 Sep 2016 09:09:15 -0700 Subject: [PATCH 4/5] Let's not break everyone with paged list yet --- .../fluentcore/utils/PagedListConverter.java | 4 +++- .../java/com/microsoft/azure/PagedList.java | 23 +++++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java index 9d8a23de785d..8e84d87007c0 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/utils/PagedListConverter.java @@ -9,7 +9,9 @@ import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.implementation.PageImpl; +import com.microsoft.rest.RestException; +import java.io.IOException; import java.util.ArrayList; /** @@ -47,7 +49,7 @@ public PagedList convert(final PagedList uList) { } return new PagedList(vPage) { @Override - public Page nextPage(String nextPageLink) { + public Page nextPage(String nextPageLink) throws RestException, IOException { Page uPage = uList.nextPage(nextPageLink); PageImpl vPage = new PageImpl<>(); vPage.setNextPageLink(uPage.getNextPageLink()); diff --git a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java index 86a4f9afcd6a..46c02402ed53 100644 --- a/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java +++ b/runtimes/azure-client-runtime/src/main/java/com/microsoft/azure/PagedList.java @@ -7,6 +7,9 @@ package com.microsoft.azure; +import com.microsoft.rest.RestException; + +import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; @@ -51,13 +54,17 @@ public PagedList(Page page) { } private void cachePage(String nextPageLink) { - while (nextPageLink != null) { - cachedPage = nextPage(nextPageLink); - nextPageLink = cachedPage.getNextPageLink(); - if (hasNextPage()) { - // a legit, non-empty page has been fetched, otherwise keep fetching - break; + try { + while (nextPageLink != null) { + cachedPage = nextPage(nextPageLink); + nextPageLink = cachedPage.getNextPageLink(); + if (hasNextPage()) { + // a legit, non-empty page has been fetched, otherwise keep fetching + break; + } } + } catch (IOException ex) { + throw new RuntimeException(ex); } } @@ -66,8 +73,10 @@ private void cachePage(String nextPageLink) { * * @param nextPageLink the link to get the next page of items. * @return the {@link Page} object storing a page of items and a link to the next page. + * @throws RestException thrown if an error is raised from Azure. + * @throws IOException thrown if there's any failure in deserialization. */ - public abstract Page nextPage(String nextPageLink); + public abstract Page nextPage(String nextPageLink) throws RestException, IOException; /** * If there are more pages available. From 419fb6956818fbb750d7a8f328e8c2e40659f107 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Thu, 15 Sep 2016 11:28:11 -0700 Subject: [PATCH 5/5] Remove all exceptions thrown in fluent core and actions --- .../management/compute/VirtualMachine.java | 2 + .../VirtualMachineExtensionImageVersion.java | 8 +--- .../management/compute/VirtualMachines.java | 37 ++++--------------- .../implementation/AvailabilitySetsImpl.java | 2 +- .../implementation/ChildListFlattener.java | 6 +-- ...rtualMachineExtensionImageVersionImpl.java | 5 +-- .../VirtualMachineExtensionImagesImpl.java | 19 +++------- .../VirtualMachineImagesImpl.java | 15 +++----- .../VirtualMachinePublishersImpl.java | 7 +--- .../VirtualMachineSizesImpl.java | 7 +--- .../implementation/VirtualMachinesImpl.java | 26 +++++++------ .../graphrbac/ServicePrincipals.java | 14 ++----- .../azure/management/graphrbac/Users.java | 10 +---- .../implementation/ServicePrincipalsImpl.java | 9 ++--- .../graphrbac/implementation/UsersImpl.java | 9 ++--- .../keyvault/implementation/VaultsImpl.java | 2 +- .../management/network/NetworkInterface.java | 12 ++---- .../azure/management/network/Subnet.java | 8 +--- .../implementation/LoadBalancersImpl.java | 2 +- .../implementation/NetworkInterfaceImpl.java | 4 +- .../implementation/NetworkInterfacesImpl.java | 2 +- .../NetworkSecurityGroupsImpl.java | 2 +- .../network/implementation/NetworksImpl.java | 2 +- .../implementation/PublicIpAddressesImpl.java | 2 +- .../network/implementation/SubnetImpl.java | 5 +-- .../management/resources/Deployment.java | 12 ++---- .../management/resources/Deployments.java | 7 +--- .../azure/management/resources/Features.java | 7 +--- .../resources/GenericResources.java | 23 +++--------- .../azure/management/resources/Providers.java | 11 +----- .../management/resources/ResourceGroup.java | 7 +--- .../management/resources/ResourceGroups.java | 7 +--- .../management/resources/Subscription.java | 7 +--- .../collection/SupportsGettingByGroup.java | 5 --- .../arm/collection/SupportsGettingById.java | 6 --- .../CreatableResourcesImpl.java | 6 +-- .../collection/SupportsBatchCreation.java | 6 +-- .../collection/SupportsDeleting.java | 3 +- .../collection/SupportsListing.java | 5 --- .../collection/SupportsListingByRegion.java | 11 +----- .../resources/fluentcore/model/Updatable.java | 3 +- .../implementation/DeploymentImpl.java | 7 ++-- .../implementation/DeploymentsImpl.java | 6 +-- .../FeaturesInResourceProviderImpl.java | 5 +-- .../implementation/GenericResourcesImpl.java | 9 ++--- .../implementation/ProvidersImpl.java | 7 +--- .../implementation/ResourceGroupImpl.java | 4 +- .../implementation/ResourceGroupsImpl.java | 7 +--- .../implementation/SubscriptionImpl.java | 4 +- .../resources/GroupPagedListTests.java | 6 +-- .../management/storage/StorageAccounts.java | 7 +--- .../implementation/StorageAccountsImpl.java | 7 +--- 52 files changed, 115 insertions(+), 297 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index 9a62a82739d3..21c4293598c5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -68,6 +68,8 @@ public interface VirtualMachine extends /** * List of all available virtual machine sizes this virtual machine can resized to. + * + * @return the virtual machine sizes */ PagedList availableSizes(); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java index 07f4deba96b7..ea5dee05085e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java @@ -1,11 +1,8 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; -import java.io.IOException; - /** * An immutable client-side representation of an Azure virtual machine extension image version. */ @@ -33,9 +30,6 @@ public interface VirtualMachineExtensionImageVersion extends /** * @return virtual machine extension image this version represents - * - * @throws CloudException thrown for an invalid response from the service - * @throws IOException exception thrown from serialization/deserialization */ - VirtualMachineExtensionImage image() throws CloudException, IOException; + VirtualMachineExtensionImage image(); } \ No newline at end of file diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java index bfe2b274d406..4aca1c10e329 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; @@ -11,8 +10,6 @@ import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -import java.io.IOException; - /** * Entry point to virtual machine management API. */ @@ -39,21 +36,16 @@ public interface VirtualMachines extends * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException thrown for IO exception. - * @throws InterruptedException exception thrown when the operation is interrupted */ - void deallocate(String groupName, String name) throws CloudException, IOException, InterruptedException; + void deallocate(String groupName, String name); /** * Generalize the Virtual Machine. * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization */ - void generalize(String groupName, String name) throws CloudException, IOException; + void generalize(String groupName, String name); /** * Power off (stop) a virtual machine. @@ -62,44 +54,32 @@ public interface VirtualMachines extends * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void powerOff(String groupName, String name) throws CloudException, IOException, InterruptedException; + void powerOff(String groupName, String name); /** * Restart a virtual machine. * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void restart(String groupName, String name) throws CloudException, IOException, InterruptedException; + void restart(String groupName, String name); /** * Start a virtual machine. * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void start(String groupName, String name) throws CloudException, IOException, InterruptedException; + void start(String groupName, String name); /** * Redeploy a virtual machine. * * @param groupName the resource group name * @param name the virtual machine name - * @throws CloudException thrown for an invalid response from the service. - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - void redeploy(String groupName, String name) throws CloudException, IOException, InterruptedException; + void redeploy(String groupName, String name); /** * Captures the virtual machine by copying virtual hard disks of the VM and returns template as json @@ -110,9 +90,6 @@ public interface VirtualMachines extends * @param containerName destination container name to store the captured Vhd * @param overwriteVhd whether to overwrites destination vhd if it exists * @return the template as json string - * @throws CloudException thrown for an invalid response from the service - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when the operation is interrupted */ - String capture(String groupName, String name, String containerName, boolean overwriteVhd) throws CloudException, IOException, InterruptedException; + String capture(String groupName, String name, String containerName, boolean overwriteVhd); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java index 39aff4bd430d..43b7ebc68a97 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsImpl.java @@ -61,7 +61,7 @@ public AvailabilitySetImpl define(String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ChildListFlattener.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ChildListFlattener.java index b095483da840..85af9aaea1ee 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ChildListFlattener.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ChildListFlattener.java @@ -40,7 +40,7 @@ interface ChildListLoader { * @throws CloudException exceptions thrown from the cloud * @throws IOException exceptions thrown from serialization/deserialization */ - PagedList loadList(T parent) throws CloudException, IOException; + PagedList loadList(T parent); } /** @@ -61,7 +61,7 @@ interface ChildListLoader { * @throws CloudException exceptions thrown from the cloud * @throws IOException exceptions thrown from serialization/deserialization */ - public PagedList flatten() throws CloudException, IOException { + public PagedList flatten() { this.currentChildList = nextChildList(); if (this.currentChildList == null) { return emptyPagedList(); @@ -93,7 +93,7 @@ public Page nextPage(String nextPageLink) throws RestException, IOExcept * @throws CloudException exceptions thrown from the cloud * @throws IOException exceptions thrown from serialization/deserialization */ - private PagedList nextChildList() throws CloudException, IOException { + private PagedList nextChildList() { while (parentItr.hasNext()) { PagedList nextChildList = childListLoader.loadList(parentItr.next()); if (nextChildList.iterator().hasNext()) { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionImpl.java index ffbb64997130..f78b378e337d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImageVersionImpl.java @@ -1,13 +1,10 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.compute.VirtualMachineExtensionImage; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageType; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageVersion; import com.microsoft.azure.management.resources.fluentcore.model.implementation.WrapperImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineExtensionImageVersion}. */ @@ -46,7 +43,7 @@ public VirtualMachineExtensionImageType type() { } @Override - public VirtualMachineExtensionImage image() throws CloudException, IOException { + public VirtualMachineExtensionImage image() { VirtualMachineExtensionImageInner inner = this.client.get(this.regionName(), this.type().publisher().name(), this.type().name(), diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesImpl.java index a68205c4b21b..dea1c6b7b1d4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesImpl.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.compute.VirtualMachineExtensionImage; import com.microsoft.azure.management.compute.VirtualMachineExtensionImageType; @@ -11,8 +10,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineExtensionImages}. */ @@ -25,18 +22,18 @@ class VirtualMachineExtensionImagesImpl } @Override - public PagedList listByRegion(Region region) throws CloudException, IOException { + public PagedList listByRegion(Region region) { return listByRegion(region.toString()); } @Override - public PagedList listByRegion(String regionName) throws CloudException, IOException { + public PagedList listByRegion(String regionName) { PagedList publishers = this.publishers().listByRegion(regionName); PagedList extensionTypes = new ChildListFlattener<>(publishers, new ChildListFlattener.ChildListLoader() { @Override - public PagedList loadList(VirtualMachinePublisher publisher) throws CloudException, IOException { + public PagedList loadList(VirtualMachinePublisher publisher) { return publisher.extensionTypes().list(); } }).flatten(); @@ -44,7 +41,7 @@ public PagedList loadList(VirtualMachinePublis PagedList extensionTypeVersions = new ChildListFlattener<>(extensionTypes, new ChildListFlattener.ChildListLoader() { @Override - public PagedList loadList(VirtualMachineExtensionImageType type) throws CloudException, IOException { + public PagedList loadList(VirtualMachineExtensionImageType type) { return type.versions().list(); } }).flatten(); @@ -53,13 +50,7 @@ public PagedList loadList(VirtualMachineExt new PagedListConverter() { @Override public VirtualMachineExtensionImage typeConvert(VirtualMachineExtensionImageVersion virtualMachineExtensionImageVersion) { - try { - return virtualMachineExtensionImageVersion.image(); - } catch (CloudException cloudException) { - throw new RuntimeException(cloudException); - } catch (IOException ioException) { - throw new RuntimeException(ioException); - } + return virtualMachineExtensionImageVersion.image(); } }; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesImpl.java index 4b7d2c357fd6..50792d9db85b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesImpl.java @@ -1,18 +1,15 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.VirtualMachineImage; import com.microsoft.azure.management.compute.VirtualMachineImages; import com.microsoft.azure.management.compute.VirtualMachineOffer; import com.microsoft.azure.management.compute.VirtualMachinePublisher; import com.microsoft.azure.management.compute.VirtualMachinePublishers; -import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.VirtualMachineSku; import com.microsoft.azure.management.resources.fluentcore.arm.Region; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineImages}. */ @@ -26,18 +23,18 @@ class VirtualMachineImagesImpl } @Override - public PagedList listByRegion(Region location) throws CloudException, IOException { + public PagedList listByRegion(Region location) { return listByRegion(location.toString()); } @Override - public PagedList listByRegion(String regionName) throws CloudException, IOException { + public PagedList listByRegion(String regionName) { PagedList publishers = this.publishers().listByRegion(regionName); PagedList offers = new ChildListFlattener<>(publishers, new ChildListFlattener.ChildListLoader() { @Override - public PagedList loadList(VirtualMachinePublisher publisher) throws CloudException, IOException { + public PagedList loadList(VirtualMachinePublisher publisher) { return publisher.offers().list(); } }).flatten(); @@ -45,7 +42,7 @@ public PagedList loadList(VirtualMachinePublisher publisher PagedList skus = new ChildListFlattener<>(offers, new ChildListFlattener.ChildListLoader() { @Override - public PagedList loadList(VirtualMachineOffer offer) throws CloudException, IOException { + public PagedList loadList(VirtualMachineOffer offer) { return offer.skus().list(); } }).flatten(); @@ -53,7 +50,7 @@ public PagedList loadList(VirtualMachineOffer offer) throws C PagedList images = new ChildListFlattener<>(skus, new ChildListFlattener.ChildListLoader() { @Override - public PagedList loadList(VirtualMachineSku sku) throws CloudException, IOException { + public PagedList loadList(VirtualMachineSku sku) { return sku.images().list(); } }).flatten(); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinePublishersImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinePublishersImpl.java index ef4a69c7fc9f..c7cdc2dfb00e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinePublishersImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinePublishersImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.VirtualMachinePublisher; @@ -13,8 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachinePublishers}. */ @@ -32,7 +29,7 @@ class VirtualMachinePublishersImpl } @Override - public PagedList listByRegion(Region region) throws CloudException, IOException { + public PagedList listByRegion(Region region) { return listByRegion(region.toString()); } @@ -45,7 +42,7 @@ protected VirtualMachinePublisherImpl wrapModel(VirtualMachineImageResourceInner } @Override - public PagedList listByRegion(String regionName) throws CloudException, IOException { + public PagedList listByRegion(String regionName) { return wrapList(imagesInnerCollection.listPublishers(regionName)); } } \ No newline at end of file diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesImpl.java index d4e0fd2d0048..c5684e9cce94 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesImpl.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.VirtualMachineSize; @@ -13,8 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link VirtualMachineSizes}. */ @@ -29,7 +26,7 @@ class VirtualMachineSizesImpl } @Override - public PagedList listByRegion(Region region) throws CloudException, IOException { + public PagedList listByRegion(Region region) { return listByRegion(region.toString()); } @@ -39,7 +36,7 @@ protected VirtualMachineSizeImpl wrapModel(VirtualMachineSizeInner inner) { } @Override - public PagedList listByRegion(String regionName) throws CloudException, IOException { + public PagedList listByRegion(String regionName) { return wrapList(innerCollection.list(regionName)); } } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java index 58c937fd8dd5..810d9aa25001 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesImpl.java @@ -5,8 +5,8 @@ */ package com.microsoft.azure.management.compute.implementation; +import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.DataDisk; @@ -22,8 +22,8 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; import com.microsoft.azure.management.storage.implementation.StorageManager; +import rx.exceptions.Exceptions; -import java.io.IOException; import java.util.ArrayList; /** @@ -74,7 +74,7 @@ public VirtualMachine getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } @@ -89,46 +89,50 @@ public VirtualMachine.DefinitionStages.Blank define(String name) { } @Override - public void deallocate(String groupName, String name) throws CloudException, IOException, InterruptedException { + public void deallocate(String groupName, String name) { this.innerCollection.deallocate(groupName, name); } @Override - public void generalize(String groupName, String name) throws CloudException, IOException { + public void generalize(String groupName, String name) { this.innerCollection.generalize(groupName, name); } @Override - public void powerOff(String groupName, String name) throws CloudException, IOException, InterruptedException { + public void powerOff(String groupName, String name) { this.innerCollection.powerOff(groupName, name); } @Override - public void restart(String groupName, String name) throws CloudException, IOException, InterruptedException { + public void restart(String groupName, String name) { this.innerCollection.restart(groupName, name); } @Override - public void start(String groupName, String name) throws CloudException, IOException, InterruptedException { + public void start(String groupName, String name) { this.innerCollection.start(groupName, name); } @Override - public void redeploy(String groupName, String name) throws CloudException, IOException, InterruptedException { + public void redeploy(String groupName, String name) { this.innerCollection.redeploy(groupName, name); } @Override public String capture(String groupName, String name, String containerName, - boolean overwriteVhd) throws CloudException, IOException, InterruptedException { + boolean overwriteVhd) { VirtualMachineCaptureParametersInner parameters = new VirtualMachineCaptureParametersInner(); parameters.withDestinationContainerName(containerName); parameters.withOverwriteVhds(overwriteVhd); VirtualMachineCaptureResultInner captureResult = this.innerCollection.capture(groupName, name, parameters); ObjectMapper mapper = new ObjectMapper(); //Object to JSON string - return mapper.writeValueAsString(captureResult.output()); + try { + return mapper.writeValueAsString(captureResult.output()); + } catch (JsonProcessingException e) { + throw Exceptions.propagate(e); + } } diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java index f9c2a80eecd3..8dd433fa34a1 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/ServicePrincipals.java @@ -13,8 +13,6 @@ import com.microsoft.rest.ServiceCallback; import rx.Observable; -import java.io.IOException; - /** * Entry point to service principal management API. */ @@ -27,30 +25,24 @@ public interface ServicePrincipals extends * * @param objectId the unique object id * @return an immutable representation of the resource - * @throws GraphErrorException exceptions thrown from the graph API - * @throws IOException exceptions thrown from serialization/deserialization */ - ServicePrincipal getByObjectId(String objectId) throws GraphErrorException, IOException; + ServicePrincipal getByObjectId(String objectId); /** * Gets the information about a service principal. * * @param appId the application id (or the client id) * @return an immutable representation of the resource - * @throws GraphErrorException exceptions thrown from the graph API - * @throws IOException exceptions thrown from serialization/deserialization */ - ServicePrincipal getByAppId(String appId) throws GraphErrorException, IOException; + ServicePrincipal getByAppId(String appId); /** * Gets the information about a service principal. * * @param spn the service principal name * @return an immutable representation of the resource - * @throws GraphErrorException exceptions thrown from the graph API - * @throws IOException exceptions thrown from serialization/deserialization */ - ServicePrincipal getByServicePrincipalName(String spn) throws GraphErrorException, IOException; + ServicePrincipal getByServicePrincipalName(String spn); /** * Gets the information about a service principal. diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java index bce73bb9aaed..6697418f0b0c 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/Users.java @@ -13,8 +13,6 @@ import com.microsoft.rest.ServiceCallback; import rx.Observable; -import java.io.IOException; - /** * Entry point to AD user management API. */ @@ -27,20 +25,16 @@ public interface Users extends * * @param objectId the unique object id * @return an immutable representation of the resource - * @throws GraphErrorException exceptions thrown from the graph API - * @throws IOException exceptions thrown from serialization/deserialization */ - User getByObjectId(String objectId) throws GraphErrorException, IOException; + User getByObjectId(String objectId); /** * Gets the information about a user. * * @param upn the user principal name * @return an immutable representation of the resource - * @throws GraphErrorException exceptions thrown from the graph API - * @throws IOException exceptions thrown from serialization/deserialization */ - User getByUserPrincipalName(String upn) throws GraphErrorException, IOException; + User getByUserPrincipalName(String upn); /** * Gets the information about a user. diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java index 469c16af2cd9..ede66beea7fb 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/ServicePrincipalsImpl.java @@ -18,7 +18,6 @@ import rx.Observable; import rx.functions.Func1; -import java.io.IOException; import java.util.List; /** @@ -46,7 +45,7 @@ public PagedList list() { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { innerCollection.delete(id); } @@ -66,17 +65,17 @@ protected ServicePrincipalImpl wrapModel(ServicePrincipalInner servicePrincipalI } @Override - public ServicePrincipalImpl getByObjectId(String objectId) throws GraphErrorException, IOException { + public ServicePrincipalImpl getByObjectId(String objectId) { return new ServicePrincipalImpl(innerCollection.get(objectId), innerCollection); } @Override - public ServicePrincipal getByAppId(String appId) throws GraphErrorException, IOException { + public ServicePrincipal getByAppId(String appId) { return null; } @Override - public ServicePrincipal getByServicePrincipalName(String spn) throws GraphErrorException, IOException { + public ServicePrincipal getByServicePrincipalName(String spn) { List spList = innerCollection.list(String.format("servicePrincipalNames/any(c:c eq '%s')", spn)); if (spList == null || spList.isEmpty()) { return null; diff --git a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java index c292aee5f2e6..6487b0f191e8 100644 --- a/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java +++ b/azure-mgmt-graph-rbac/src/main/java/com/microsoft/azure/management/graphrbac/implementation/UsersImpl.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.graphrbac.implementation; import com.microsoft.azure.PagedList; -import com.microsoft.azure.management.graphrbac.GraphErrorException; import com.microsoft.azure.management.graphrbac.User; import com.microsoft.azure.management.graphrbac.Users; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.CreatableWrappersImpl; @@ -17,8 +16,6 @@ import rx.Observable; import rx.functions.Func1; -import java.io.IOException; - /** * The implementation of Users and its parent interfaces. */ @@ -44,7 +41,7 @@ public PagedList list() { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { innerCollection.delete(id); } @@ -64,12 +61,12 @@ protected UserImpl wrapModel(UserInner userInner) { } @Override - public UserImpl getByObjectId(String objectId) throws GraphErrorException, IOException { + public UserImpl getByObjectId(String objectId) { return new UserImpl(innerCollection.get(objectId), innerCollection); } @Override - public UserImpl getByUserPrincipalName(String upn) throws GraphErrorException, IOException { + public UserImpl getByUserPrincipalName(String upn) { return new UserImpl(innerCollection.get(upn), innerCollection); } diff --git a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java index 0594b1a947cb..2bc06369a87f 100644 --- a/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java +++ b/azure-mgmt-keyvault/src/main/java/com/microsoft/azure/management/keyvault/implementation/VaultsImpl.java @@ -57,7 +57,7 @@ public Vault getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java index 41caacdc8108..6e52465237c4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java @@ -6,18 +6,16 @@ package com.microsoft.azure.management.network; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.implementation.NetworkInterfaceInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; +import com.microsoft.azure.management.resources.fluentcore.model.Appliable; +import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; -import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.fluentcore.model.Updatable; -import com.microsoft.azure.management.resources.fluentcore.model.Creatable; -import com.microsoft.azure.management.resources.fluentcore.model.Appliable; +import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; -import java.io.IOException; import java.util.List; import java.util.Map; @@ -131,10 +129,8 @@ public interface NetworkInterface extends * This method makes a rest API call to fetch the Network Security Group resource. * * @return the network security group associated with this network interface. - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - NetworkSecurityGroup networkSecurityGroup() throws CloudException, IOException; + NetworkSecurityGroup networkSecurityGroup(); // Setters (fluent) diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java index 0d78c66fa205..1706f48ebac8 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java @@ -5,7 +5,6 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.implementation.SubnetInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -13,8 +12,6 @@ import com.microsoft.azure.management.resources.fluentcore.model.Settable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; -import java.io.IOException; - /** * An immutable client-side representation of a subnet of a virtual network. */ @@ -32,11 +29,8 @@ public interface Subnet extends * @return the network security group associated with this subnet *

* Note that this method will result in a call to Azure each time it is invoked. - * @throws CloudException exceptions thrown from the cloud - * @throws IOException exceptions thrown from serialization/deserialization - * @throws IllegalArgumentException exceptions thrown when something is wrong with the input parameters */ - NetworkSecurityGroup networkSecurityGroup() throws CloudException, IllegalArgumentException, IOException; + NetworkSecurityGroup networkSecurityGroup(); /** * Grouping of subnet definition stages. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java index 429f9441a9da..a6b53be72d76 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancersImpl.java @@ -47,7 +47,7 @@ public LoadBalancerImpl getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java index dfdeee4106a5..7bf0f924835a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.network.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.IPAllocationMethod; @@ -24,7 +23,6 @@ import com.microsoft.azure.management.resources.fluentcore.utils.Utils; import rx.Observable; -import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -322,7 +320,7 @@ public String networkSecurityGroupId() { } @Override - public NetworkSecurityGroup networkSecurityGroup() throws CloudException, IOException { + public NetworkSecurityGroup networkSecurityGroup() { if (this.networkSecurityGroup == null && this.networkSecurityGroupId() != null) { String id = this.networkSecurityGroupId(); this.networkSecurityGroup = super.myManager diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java index 433fad1c4181..b3e3ece746ab 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfacesImpl.java @@ -45,7 +45,7 @@ public NetworkInterface getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { this.delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java index 3147439c7d74..56cde273e942 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkSecurityGroupsImpl.java @@ -49,7 +49,7 @@ public NetworkSecurityGroupImpl getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java index 7a4233fb1af5..a72b9a2cd25b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworksImpl.java @@ -51,7 +51,7 @@ public NetworkImpl getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java index 26a167b62ba7..f2f738ca09da 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/PublicIpAddressesImpl.java @@ -48,7 +48,7 @@ public PublicIpAddressImpl getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetImpl.java index bd584d858b34..8f93d1292a41 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/SubnetImpl.java @@ -5,9 +5,6 @@ */ package com.microsoft.azure.management.network.implementation; -import java.io.IOException; - -import com.microsoft.azure.CloudException; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Network; @@ -43,7 +40,7 @@ public String name() { } @Override - public NetworkSecurityGroup networkSecurityGroup() throws CloudException, IllegalArgumentException, IOException { + public NetworkSecurityGroup networkSecurityGroup() { SubResource nsgResource = this.inner().networkSecurityGroup(); if (nsgResource == null) { return null; diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java index f3d409675339..a2a223a9dcc4 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; @@ -106,20 +105,15 @@ public interface Deployment extends /** * Cancel a currently running template deployment. - * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ - void cancel() throws CloudException, IOException; + void cancel(); /** * Exports a deployment template. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return the export result */ - DeploymentExportResult exportTemplate() throws CloudException, IOException; + DeploymentExportResult exportTemplate(); /** * Container interface for all the deployment definitions. @@ -244,7 +238,7 @@ interface WithMode { * deployment in the cloud, but exposing additional optional inputs to specify. */ interface WithCreate extends Creatable { - Deployment beginCreate() throws Exception; + Deployment beginCreate(); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java index ece9655b657e..0b4f2558f7f3 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; @@ -17,8 +16,6 @@ import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -import java.io.IOException; - /** * Entry point to template deployment in Azure. */ @@ -38,8 +35,6 @@ public interface Deployments extends * @param resourceGroupName the resource group's name * @param deploymentName the deployment's name * @return true if the deployment exists; false otherwise - * @throws IOException serialization failures - * @throws CloudException failures thrown from Azure */ - boolean checkExistence(String resourceGroupName, String deploymentName) throws IOException, CloudException; + boolean checkExistence(String resourceGroupName, String deploymentName); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java index 0590bbb23f08..37e4b1dc0153 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java @@ -6,13 +6,10 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -import java.io.IOException; - /** * Entry point to features management API. */ @@ -39,9 +36,7 @@ interface InResourceProvider extends * * @param featureName the name of the feature * @return the immutable client-side feature object created - * @throws IOException exception from serialization/deserialization - * @throws CloudException exception from Azure */ - Feature register(String featureName) throws IOException, CloudException; + Feature register(String featureName); } } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java index 8d468de589d4..8a11e0ccad98 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java @@ -6,13 +6,11 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; -import java.io.IOException; import java.util.List; /** @@ -33,8 +31,6 @@ public interface GenericResources extends * @param resourceName the name of the resource * @param apiVersion the API version * @return true if the resource exists; false otherwise - * @throws IOException serialization failures - * @throws CloudException failures thrown from Azure */ boolean checkExistence( String resourceGroupName, @@ -42,7 +38,7 @@ boolean checkExistence( String parentResourcePath, String resourceType, String resourceName, - String apiVersion) throws IOException, CloudException; + String apiVersion); /** * Returns a resource belonging to a resource group. @@ -54,8 +50,6 @@ boolean checkExistence( * @param resourceName Resource identity. * @param apiVersion the String value * @return the generic resource - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ GenericResource get( String resourceGroupName, @@ -63,7 +57,7 @@ GenericResource get( String parentResourcePath, String resourceType, String resourceName, - String apiVersion) throws CloudException, IOException; + String apiVersion); /** * Returns a resource belonging to a resource group. @@ -72,14 +66,12 @@ GenericResource get( * @param resourceType the resource type * @param resourceName the name of the resource * @return the generic resource - * @throws IOException exception thrown from serialization/deserialization - * @throws CloudException exception thrown from REST call */ GenericResource get( String resourceGroupName, String providerNamespace, String resourceType, - String resourceName) throws CloudException, IOException; + String resourceName); /** * Move resources from one resource group to another. @@ -87,11 +79,8 @@ GenericResource get( * @param sourceResourceGroupName Source resource group name * @param targetResourceGroup target resource group, can be in a different subscription * @param resources the list of IDs of the resources to move - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization - * @throws InterruptedException exception thrown when long running operation is interrupted */ - void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources) throws CloudException, IOException, InterruptedException; + void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources); /** * Delete resource and all of its child resources. @@ -102,8 +91,6 @@ GenericResource get( * @param resourceType Resource identity. * @param resourceName Resource identity. * @param apiVersion the String value - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ - void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) throws CloudException, IOException; + void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java index 5ce042215034..44d014f44ab0 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; import com.microsoft.rest.ServiceResponse; -import java.io.IOException; - /** * Entry point to providers management API. */ @@ -25,19 +22,15 @@ public interface Providers extends * Unregisters provider from a subscription. * * @param resourceProviderNamespace Namespace of the resource provider - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return the ProviderInner object wrapped in {@link ServiceResponse} if successful */ - Provider unregister(String resourceProviderNamespace) throws CloudException, IOException; + Provider unregister(String resourceProviderNamespace); /** * Registers provider to be used with a subscription. * * @param resourceProviderNamespace Namespace of the resource provider - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return the ProviderInner object wrapped in {@link ServiceResponse} if successful */ - Provider register(String resourceProviderNamespace) throws CloudException, IOException; + Provider register(String resourceProviderNamespace); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java index a7f257c653a5..43e324e3d5ed 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -18,8 +17,6 @@ import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.ResourceGroupInner; -import java.io.IOException; - /** * An immutable client-side representation of an Azure resource group. */ @@ -44,11 +41,9 @@ public interface ResourceGroup extends * Captures the specified resource group as a template. * * @param options the export options - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return the exported template result */ - ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options) throws CloudException, IOException; + ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options); /************************************************************** * Fluent interfaces to provision a ResourceGroup diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java index de60ca3ff124..69cf46e46077 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation; @@ -14,8 +13,6 @@ import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -import java.io.IOException; - /** * Entry point to resource group management API. */ @@ -30,9 +27,7 @@ public interface ResourceGroups extends * Checks whether resource group exists. * * @param name The name of the resource group to check. The name is case insensitive - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return true if the resource group exists; false otherwise */ - boolean checkExistence(String name) throws CloudException, IOException; + boolean checkExistence(String name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java index 888e21fb404b..3712045e3d5c 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java @@ -6,15 +6,12 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.SubscriptionInner; -import java.io.IOException; - /** * An immutable client-side representation of an Azure subscription. */ @@ -46,10 +43,8 @@ public interface Subscription extends /** * List the locations the subscription has access to. * - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization * @return the lazy list of locations */ - PagedList listLocations() throws IOException, CloudException; + PagedList listLocations(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java index 9a8740a76e83..f29a7c3d76ba 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingByGroup.java @@ -6,12 +6,9 @@ package com.microsoft.azure.management.resources.fluentcore.arm.collection; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; -import java.io.IOException; - /** * Provides access to getting a specific Azure resource based on its name and resource group. * @@ -27,8 +24,6 @@ public interface SupportsGettingByGroup { * @param resourceGroupName the name of the resource group the resource is in * @param name the name of the resource. (Note, this is not the ID) * @return an immutable representation of the resource - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ T getByGroup(String resourceGroupName, String name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java index f994ab3a6298..8e25be255595 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/SupportsGettingById.java @@ -7,12 +7,9 @@ package com.microsoft.azure.management.resources.fluentcore.arm.collection; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; -import java.io.IOException; - /** * Provides access to getting a specific Azure resource based on its resource ID. * @@ -25,9 +22,6 @@ public interface SupportsGettingById { * * @param id the id of the resource. * @return an immutable representation of the resource - * @throws CloudException exceptions thrown from the cloud - * @throws IOException exceptions thrown from serialization/deserialization - * @throws IllegalArgumentException exceptions thrown when something is wrong with the input parameters */ T getById(String id); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java index 1f9ec0342b1f..56f64cece1ae 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/collection/implementation/CreatableResourcesImpl.java @@ -39,12 +39,12 @@ protected CreatableResourcesImpl() { @Override @SafeVarargs - public final CreatedResources create(Creatable ... creatables) throws Exception { + public final CreatedResources create(Creatable ... creatables) { return BlockingObservable.from(createAsync(creatables)).single(); } @Override - public final CreatedResources create(List> creatables) throws Exception { + public final CreatedResources create(List> creatables) { return BlockingObservable.from(createAsync(creatables)).single(); } @@ -236,7 +236,7 @@ public List subList(int fromIndex, int toIndex) { /** * The local root resource that is used as dummy parent resource for the batch creatable resources - * added via {@link CreatableResourcesImpl#create} or {@link CreatableResourcesImpl#createAsync}. + * added via {@link SupportsBatchCreation#create} or {@link CreatableResourcesImpl#createAsync}. * * @param the type of the resources in the batch. */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsBatchCreation.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsBatchCreation.java index 6f16ee9311a6..1a343ee8360a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsBatchCreation.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsBatchCreation.java @@ -22,18 +22,16 @@ public interface SupportsBatchCreation { * * @param creatables the creatables in the batch * @return the batch operation result from which created resources in this batch can be accessed. - * @throws Exception exceptions from Azure */ - CreatedResources create(Creatable... creatables) throws Exception; + CreatedResources create(Creatable... creatables); /** * Executes the create requests on a collection (batch) of resources. * * @param creatables the list of creatables in the batch * @return the batch operation result from which created resources in this batch can be accessed. - * @throws Exception exceptions from Azure */ - CreatedResources create(List> creatables) throws Exception; + CreatedResources create(List> creatables); /** * Puts the requests to create a batch of resources into the queue and allow the HTTP client to execute it when diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsDeleting.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsDeleting.java index eb6f36e79b37..9a1cb1721a05 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsDeleting.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsDeleting.java @@ -19,7 +19,6 @@ public interface SupportsDeleting { * Deletes a resource from Azure, identifying it by its resource ID. * * @param id the resource ID of the resource to delete - * @throws Exception exceptions thrown from Azure */ - void delete(String id) throws Exception; + void delete(String id); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java index 7c0b1d7929a4..52edb0d3dc0d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListing.java @@ -7,12 +7,9 @@ package com.microsoft.azure.management.resources.fluentcore.collection; import com.microsoft.azure.PagedList; -import com.microsoft.rest.RestException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; -import java.io.IOException; - /** * Provides access to listing Azure resources of a specific type in a subscription. *

@@ -26,8 +23,6 @@ public interface SupportsListing { * Lists all the resources of the specified type in the currently selected subscription. * * @return list of resources - * @throws RestException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ PagedList list(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListingByRegion.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListingByRegion.java index 1b33427b1126..b23920b9c526 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListingByRegion.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/collection/SupportsListingByRegion.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources.fluentcore.collection; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; import com.microsoft.azure.management.resources.fluentcore.arm.Region; -import java.io.IOException; - /** * Provides access to listing Azure resources of a specific type based on their region. *

@@ -28,17 +25,13 @@ public interface SupportsListingByRegion { * * @param region the selected Azure region * @return list of resources - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - PagedList listByRegion(Region region) throws CloudException, IOException; + PagedList listByRegion(Region region); /** * List all the resources of the specified type in the specified region. * @param regionName the name of an Azure region * @return list of resources - * @throws CloudException exceptions thrown from the cloud. - * @throws IOException exceptions thrown from serialization/deserialization. */ - PagedList listByRegion(String regionName) throws CloudException, IOException; + PagedList listByRegion(String regionName); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java index 6d274e92c9a2..ccec3b3094b1 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Updatable.java @@ -23,7 +23,6 @@ public interface Updatable { * process in Azure is {@link Appliable#apply()}. * * @return the stage of new resource update - * @throws Exception exceptions thrown from Azure */ - T update() throws Exception; + T update(); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java index dfd2dfa3875c..5bee4c82c115 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentImpl.java @@ -7,7 +7,6 @@ package com.microsoft.azure.management.resources.implementation; import com.fasterxml.jackson.databind.ObjectMapper; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.resources.Dependency; import com.microsoft.azure.management.resources.Deployment; import com.microsoft.azure.management.resources.DeploymentExportResult; @@ -168,12 +167,12 @@ public DeploymentOperations deploymentOperations() { } @Override - public void cancel() throws CloudException, IOException { + public void cancel() { client.cancel(resourceGroupName, name()); } @Override - public DeploymentExportResult exportTemplate() throws CloudException, IOException { + public DeploymentExportResult exportTemplate() { DeploymentExportResultInner inner = client.exportTemplate(resourceGroupName(), name()); return new DeploymentExportResultImpl(inner); } @@ -268,7 +267,7 @@ public DeploymentImpl withParametersLink(String uri, String contentVersion) { } @Override - public DeploymentImpl beginCreate() throws Exception { + public DeploymentImpl beginCreate() { DeploymentInner inner = new DeploymentInner() .withProperties(new DeploymentProperties()); inner.properties().withMode(mode()); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java index e66360703b22..3d1a3d252c08 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/DeploymentsImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Deployment; import com.microsoft.azure.management.resources.Deployments; @@ -15,7 +14,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.GroupPagedList; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import java.io.IOException; import java.util.List; /** @@ -75,7 +73,7 @@ public Deployment getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { this.delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); } @@ -90,7 +88,7 @@ public DeploymentImpl define(String name) { } @Override - public boolean checkExistence(String resourceGroupName, String deploymentName) throws IOException, CloudException { + public boolean checkExistence(String resourceGroupName, String deploymentName) { return client.checkExistence(resourceGroupName, deploymentName); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java index f896288c975d..aeff935c2601 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/FeaturesInResourceProviderImpl.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Feature; import com.microsoft.azure.management.resources.Features; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import java.io.IOException; - /** * The implementation of {@link Features.InResourceProvider}. */ @@ -39,7 +36,7 @@ public Feature typeConvert(FeatureResultInner tenantInner) { } @Override - public Feature register(String featureName) throws IOException, CloudException { + public Feature register(String featureName) { return new FeatureImpl(client.register(resourceProviderNamespace, featureName)); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java index 233225f7df45..d079af7d0e26 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/GenericResourcesImpl.java @@ -14,7 +14,6 @@ import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; -import java.io.IOException; import java.util.List; /** @@ -52,7 +51,7 @@ public GenericResource.DefinitionStages.Blank define(String name) { } @Override - public boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) throws IOException, CloudException { + public boolean checkExistence(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { return this.innerCollection.checkExistence( resourceGroupName, resourceProviderNamespace, @@ -96,7 +95,7 @@ public GenericResource get( String parentResourcePath, String resourceType, String resourceName, - String apiVersion) throws CloudException, IOException { + String apiVersion) { // Correct for auto-gen'd API's treatment parent path as required even though it makes sense only for child resources if (parentResourcePath == null) { @@ -125,7 +124,7 @@ public GenericResource get( } @Override - public void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources) throws CloudException, IOException, InterruptedException { + public void moveResources(String sourceResourceGroupName, ResourceGroup targetResourceGroup, List resources) { ResourcesMoveInfoInner moveInfo = new ResourcesMoveInfoInner(); moveInfo.withTargetResourceGroup(targetResourceGroup.id()); moveInfo.withResources(resources); @@ -133,7 +132,7 @@ public void moveResources(String sourceResourceGroupName, ResourceGroup targetRe } @Override - public void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) throws CloudException, IOException { + public void delete(String resourceGroupName, String resourceProviderNamespace, String parentResourcePath, String resourceType, String resourceName, String apiVersion) { this.innerCollection.delete(resourceGroupName, resourceProviderNamespace, parentResourcePath, resourceType, resourceName, apiVersion); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java index 648ce3de6f2b..9c637ea502dd 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ProvidersImpl.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Provider; import com.microsoft.azure.management.resources.Providers; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.ReadableWrappersImpl; -import java.io.IOException; - /** * The implementation for {@link Providers}. */ @@ -32,12 +29,12 @@ public PagedList list() { } @Override - public Provider unregister(String resourceProviderNamespace) throws CloudException, IOException { + public Provider unregister(String resourceProviderNamespace) { return wrapModel(client.unregister(resourceProviderNamespace)); } @Override - public Provider register(String resourceProviderNamespace) throws CloudException, IOException { + public Provider register(String resourceProviderNamespace) { return wrapModel(client.register(resourceProviderNamespace)); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java index bb73064c5587..f4539bd31e68 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.resources.ResourceGroup; import com.microsoft.azure.management.resources.ResourceGroupExportResult; import com.microsoft.azure.management.resources.ResourceGroupExportTemplateOptions; @@ -14,7 +13,6 @@ import com.microsoft.azure.management.resources.fluentcore.model.implementation.CreatableUpdatableImpl; import rx.Observable; -import java.io.IOException; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; @@ -73,7 +71,7 @@ public Map tags() { } @Override - public ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options) throws CloudException, IOException { + public ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options) { ExportTemplateRequestInner inner = new ExportTemplateRequestInner() .withResources(Arrays.asList("*")) .withOptions(options.toString()); diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java index 703629854d0b..a49210905f2e 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/ResourceGroupsImpl.java @@ -6,14 +6,11 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.ResourceGroup; import com.microsoft.azure.management.resources.ResourceGroups; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.CreatableResourcesImpl; -import java.io.IOException; - /** * The implementation for {@link ResourceGroups} and its parent interfaces. */ @@ -44,7 +41,7 @@ public ResourceGroupImpl getByName(String name) { } @Override - public void delete(String name) throws Exception { + public void delete(String name) { client.delete(name); } @@ -54,7 +51,7 @@ public ResourceGroupImpl define(String name) { } @Override - public boolean checkExistence(String name) throws CloudException, IOException { + public boolean checkExistence(String name) { return client.checkExistence(name); } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java index cb7118897913..020eb8972d13 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/implementation/SubscriptionImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.resources.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.Location; @@ -15,7 +14,6 @@ import com.microsoft.azure.management.resources.fluentcore.model.implementation.IndexableWrapperImpl; import com.microsoft.azure.management.resources.fluentcore.utils.PagedListConverter; -import java.io.IOException; import java.util.List; /** @@ -54,7 +52,7 @@ public SubscriptionPolicies subscriptionPolicies() { } @Override - public PagedList listLocations() throws IOException, CloudException { + public PagedList listLocations() { PagedListConverter converter = new PagedListConverter() { @Override public Location typeConvert(LocationInner locationInner) { diff --git a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java index dbc779b656eb..2c40f69051ac 100644 --- a/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java +++ b/azure-mgmt-resources/src/test/java/com/microsoft/azure/management/resources/GroupPagedListTests.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.CloudException; import com.microsoft.azure.Page; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.fluentcore.arm.Region; @@ -10,7 +9,6 @@ import org.junit.Assert; import org.junit.Test; -import java.io.IOException; import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; @@ -108,7 +106,7 @@ public List listNextGroup(String s) { private static ResourceGroup resourceGroup(final String name) { return new ResourceGroup() { @Override - public Update update() throws Exception { + public Update update() { return null; } @@ -148,7 +146,7 @@ public Map tags() { } @Override - public ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options) throws CloudException, IOException { + public ResourceGroupExportResult exportTemplate(ResourceGroupExportTemplateOptions options) { return null; } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java index 8a521d1e0316..fadd44e3a3e8 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.CloudException; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; @@ -17,8 +16,6 @@ import com.microsoft.azure.management.resources.fluentcore.collection.SupportsDeleting; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; -import java.io.IOException; - /** * Entry point for storage accounts management API. */ @@ -37,8 +34,6 @@ public interface StorageAccounts extends * * @param name the account name to check * @return whether the name is available and other info if not - * @throws CloudException exception thrown from REST call - * @throws IOException exception thrown from serialization/deserialization */ - CheckNameAvailabilityResult checkNameAvailability(String name) throws CloudException, IOException; + CheckNameAvailabilityResult checkNameAvailability(String name); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java index dd5e5a813d21..a49f8014aad2 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountsImpl.java @@ -6,7 +6,6 @@ package com.microsoft.azure.management.storage.implementation; -import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.collection.implementation.GroupableResourcesImpl; @@ -15,8 +14,6 @@ import com.microsoft.azure.management.storage.StorageAccount; import com.microsoft.azure.management.storage.StorageAccounts; -import java.io.IOException; - /** * The implementation of StorageAccounts and its parent interfaces. */ @@ -36,7 +33,7 @@ class StorageAccountsImpl } @Override - public CheckNameAvailabilityResult checkNameAvailability(String name) throws CloudException, IOException { + public CheckNameAvailabilityResult checkNameAvailability(String name) { return new CheckNameAvailabilityResult(this.innerCollection.checkNameAvailability(name)); } @@ -56,7 +53,7 @@ public StorageAccount getByGroup(String groupName, String name) { } @Override - public void delete(String id) throws Exception { + public void delete(String id) { delete(ResourceUtils.groupFromResourceId(id), ResourceUtils.nameFromResourceId(id)); }