From cc263378d5cbdd8d685f525521049c747e46395f Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 30 Mar 2016 11:55:31 -0700 Subject: [PATCH 1/3] Fix java 8 usage in datalake tests --- .../store/DataLakeStoreFilesystemOperationsTests.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFilesystemOperationsTests.java b/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFilesystemOperationsTests.java index 2349a53cbb933..277f62fbc1af6 100644 --- a/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFilesystemOperationsTests.java +++ b/azure-mgmt-datalake-store/src/test/java/com/microsoft/azure/management/datalake/store/DataLakeStoreFilesystemOperationsTests.java @@ -9,20 +9,18 @@ import com.microsoft.azure.management.datalake.store.models.FileStatusesResult; import com.microsoft.azure.management.datalake.store.models.FileType; import com.microsoft.azure.management.resources.models.ResourceGroup; - import org.apache.commons.lang3.StringUtils; import org.junit.AfterClass; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; +import sun.misc.IOUtils; import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import sun.misc.IOUtils; - public class DataLakeStoreFilesystemOperationsTests extends DataLakeStoreManagementTestBase { // constants private static String folderToCreate = "SDKTestFolder01"; @@ -451,7 +449,7 @@ public void DataLakeStoreFileSystemGetAndSetAcl() throws Exception // Set the other acl to RWX dataLakeStoreFileSystemManagementClient.getFileSystemOperations().setAcl("/", adlsAcct, - String.join(",", aclToReplaceWith)); + StringUtils.join(",", aclToReplaceWith)); AclStatusResult newAcl = dataLakeStoreFileSystemManagementClient.getFileSystemOperations().getAclStatus("/", adlsAcct).getBody(); @@ -574,7 +572,7 @@ public void DataLakeStoreFileSystemSetAcl() throws Exception int currentCount = aclGetResponse.getAclStatus().getEntries().size(); // add an entry to the ACL Entries - String newAcls = String.join(",", aclGetResponse.getAclStatus().getEntries()); + String newAcls = StringUtils.join(",", aclGetResponse.getAclStatus().getEntries()); newAcls += String.format(",user:%s:rwx", aclUserId); dataLakeStoreFileSystemManagementClient.getFileSystemOperations().setAcl("/", From dcac29139728718b80fe963274e1f886b9c7aa43 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 30 Mar 2016 12:18:10 -0700 Subject: [PATCH 2/3] Regenerate from latest specs --- .../compute/AvailabilitySetsOperations.java | 60 +- .../AvailabilitySetsOperationsImpl.java | 180 +- ...rtualMachineExtensionImagesOperations.java | 19 +- ...lMachineExtensionImagesOperationsImpl.java | 43 +- ...irtualMachineExtensionsOperationsImpl.java | 1 - ...VirtualMachineScaleSetsOperationsImpl.java | 144 +- .../VirtualMachineSizesOperations.java | 35 +- .../VirtualMachineSizesOperationsImpl.java | 95 +- .../compute/VirtualMachinesOperations.java | 74 +- .../VirtualMachinesOperationsImpl.java | 200 +- .../models/AdditionalUnattendContent.java | 18 +- .../compute/models/ApiEntityReference.java | 3 +- .../compute/models/BootDiagnostics.java | 2 +- .../compute/models/CachingTypes.java | 63 + .../compute/models/ComponentNames.java | 57 + .../management/compute/models/DataDisk.java | 12 +- .../compute/models/DiskCreateOptionTypes.java | 63 + .../models/DiskEncryptionSettings.java | 24 + .../compute/models/ForceUpdateTagTypes.java | 57 + .../compute/models/InstanceViewStatus.java | 12 +- .../compute/models/InstanceViewTypes.java | 57 + .../management/compute/models/OSDisk.java | 18 +- .../compute/models/OSDiskImage.java | 6 +- .../compute/models/OperatingSystemTypes.java | 60 + .../management/compute/models/PageImpl.java | 2 +- .../management/compute/models/PageImpl1.java | 51 + .../management/compute/models/PassNames.java | 57 + .../compute/models/ProtocolTypes.java | 60 + .../compute/models/SettingNames.java | 60 + .../compute/models/StatusLevelTypes.java | 63 + .../compute/models/UpgradeMode.java | 60 + .../compute/models/UpgradePolicy.java | 6 +- .../models/VirtualMachineExtension.java | 51 +- .../models/VirtualMachineExtensionImage.java | 76 +- .../compute/models/VirtualMachineImage.java | 75 +- .../models/VirtualMachineScaleSet.java | 25 + .../models/VirtualMachineScaleSetOSDisk.java | 18 +- .../VirtualMachineScaleSetSkuCapacity.java | 4 +- .../VirtualMachineScaleSetSkuScaleType.java | 60 + .../compute/models/WinRMListener.java | 6 +- ...tworkGatewayConnectionsOperationsImpl.java | 16 +- .../VirtualNetworkGatewaysOperationsImpl.java | 4 +- .../StorageAccountsOperationsImpl.java | 4 +- ...lobalDomainRegistrationOperationsImpl.java | 4 +- .../HostingEnvironmentsOperations.java | 8 +- .../HostingEnvironmentsOperationsImpl.java | 36 +- .../ManagedHostingEnvironmentsOperations.java | 8 +- ...agedHostingEnvironmentsOperationsImpl.java | 36 +- .../website/RecommendationsOperations.java | 8 +- .../RecommendationsOperationsImpl.java | 22 +- .../website/ServerFarmsOperations.java | 4 +- .../website/ServerFarmsOperationsImpl.java | 6 +- .../management/website/SitesOperations.java | 526 ++-- .../website/SitesOperationsImpl.java | 2670 +++++++++-------- .../TopLevelDomainsOperationsImpl.java | 4 +- .../management/website/models/Category.java | 69 + .../website/models/DeletedSite.java | 79 + .../website/models/HostingEnvironment.java | 24 + .../website/models/IpSecurityRestriction.java | 60 + .../website/models/Recommendation.java | 71 + .../website/models/RecommendationRule.java | 25 + .../azure/management/website/models/Site.java | 79 + .../management/website/models/SiteConfig.java | 24 + .../management/website/models/VnetInfo.java | 24 + 64 files changed, 3297 insertions(+), 2491 deletions(-) create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/CachingTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ComponentNames.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskCreateOptionTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ForceUpdateTagTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OperatingSystemTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl1.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PassNames.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ProtocolTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/SettingNames.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/StatusLevelTypes.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradeMode.java create mode 100644 azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuScaleType.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Category.java create mode 100644 azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/IpSecurityRestriction.java diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperations.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperations.java index 7c6fe1dbb7185..98481ff7da07b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperations.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperations.java @@ -7,15 +7,13 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.models.AvailabilitySet; -import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachineSize; -import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; /** * An instance of this class provides access to all the operations defined @@ -102,7 +100,7 @@ public interface AvailabilitySetsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<AvailabilitySet> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException; /** * The operation to list the availability sets. @@ -112,10 +110,10 @@ public interface AvailabilitySetsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listAsync(String resourceGroupName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** - * Lists virtual-machine-sizes available to be used for an availability set. + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. * * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. @@ -124,10 +122,10 @@ public interface AvailabilitySetsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> listAvailableSizes(final String resourceGroupName, final String availabilitySetName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> listAvailableSizes(String resourceGroupName, String availabilitySetName) throws CloudException, IOException, IllegalArgumentException; /** - * Lists virtual-machine-sizes available to be used for an availability set. + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. * * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. @@ -135,50 +133,6 @@ public interface AvailabilitySetsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listAvailableSizesAsync(final String resourceGroupName, final String availabilitySetName, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - - /** - * The operation to list the availability 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 List<AvailabilitySet> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; - - /** - * The operation to list the availability sets. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - - /** - * Lists virtual-machine-sizes available to be used for an availability 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 List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> listAvailableSizesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; - - /** - * Lists virtual-machine-sizes available to be used for an availability set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall listAvailableSizesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listAvailableSizesAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperationsImpl.java index 3bc93b727b2d3..b3ef0a8ad7d7e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySetsOperationsImpl.java @@ -9,12 +9,9 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.models.AvailabilitySet; import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachineSize; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -32,7 +29,6 @@ import retrofit2.http.Path; import retrofit2.http.PUT; import retrofit2.http.Query; -import retrofit2.http.Url; import retrofit2.Response; import retrofit2.Retrofit; @@ -82,14 +78,6 @@ interface AvailabilitySetsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/availabilitySets/{availabilitySetName}/vmSizes") Call listAvailableSizes(@Path("resourceGroupName") String resourceGroupName, @Path("availabilitySetName") String availabilitySetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listAvailableSizesNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - } /** @@ -346,7 +334,7 @@ private ServiceResponse getDelegate(Response resp * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<AvailabilitySet> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -358,12 +346,7 @@ public ServiceResponse> list(final String resourceGro } Call call = service.list(resourceGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); ServiceResponse> response = listDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } @@ -375,7 +358,7 @@ public Page nextPage(String nextPageLink) throws CloudException * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listAsync(String resourceGroupName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -398,13 +381,7 @@ public ServiceCall listAsync(final String resourceGroupName, final ListOperation public void onResponse(Call call, Response response) { try { ServiceResponse> result = listDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -421,7 +398,7 @@ private ServiceResponse> listDelegate(Response> listDelegate(Response> listAvailableSizes(final String resourceGroupName, final String availabilitySetName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listAvailableSizes(String resourceGroupName, String availabilitySetName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -445,17 +422,12 @@ public ServiceResponse> listAvailableSizes(final S } Call call = service.listAvailableSizes(resourceGroupName, availabilitySetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); ServiceResponse> response = listAvailableSizesDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listAvailableSizesNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } /** - * Lists virtual-machine-sizes available to be used for an availability set. + * Lists all available virtual machine sizes that can be used to create a new virtual machine in an existing availability set. * * @param resourceGroupName The name of the resource group. * @param availabilitySetName The name of the availability set. @@ -463,7 +435,7 @@ public Page nextPage(String nextPageLink) throws CloudExcept * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listAvailableSizesAsync(final String resourceGroupName, final String availabilitySetName, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listAvailableSizesAsync(String resourceGroupName, String availabilitySetName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -490,13 +462,7 @@ public ServiceCall listAvailableSizesAsync(final String resourceGroupName, final public void onResponse(Call call, Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listAvailableSizesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -512,130 +478,4 @@ private ServiceResponse> listAvailableSizesDelegate .build(response); } - /** - * The operation to list the availability 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 List<AvailabilitySet> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - return listNextDelegate(call.execute()); - } - - /** - * The operation to list the availability sets. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Lists virtual-machine-sizes available to be used for an availability 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 List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> listAvailableSizesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listAvailableSizesNext(nextPageLink, this.client.getAcceptLanguage()); - return listAvailableSizesNextDelegate(call.execute()); - } - - /** - * Lists virtual-machine-sizes available to be used for an availability set. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listAvailableSizesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listAvailableSizesNext(nextPageLink, this.client.getAcceptLanguage()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listAvailableSizesNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listAvailableSizesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listAvailableSizesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperations.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperations.java index 91ef3eb06921c..98205b125adff 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperations.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperations.java @@ -8,7 +8,6 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.management.compute.models.VirtualMachineExtensionImage; -import com.microsoft.azure.management.compute.models.VirtualMachineImageResource; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -55,9 +54,9 @@ public interface VirtualMachineExtensionImagesOperations { * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<VirtualMachineImageResource> object wrapped in {@link ServiceResponse} if successful. + * @return the List<VirtualMachineExtensionImage> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> listTypes(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> listTypes(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException; /** * Gets a list of virtual machine extension image types. @@ -68,7 +67,7 @@ public interface VirtualMachineExtensionImagesOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listTypesAsync(String location, String publisherName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + ServiceCall listTypesAsync(String location, String publisherName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** * Gets a list of virtual machine extension image versions. @@ -79,9 +78,9 @@ public interface VirtualMachineExtensionImagesOperations { * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<VirtualMachineImageResource> object wrapped in {@link ServiceResponse} if successful. + * @return the List<VirtualMachineExtensionImage> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException; /** * Gets a list of virtual machine extension image versions. @@ -93,7 +92,7 @@ public interface VirtualMachineExtensionImagesOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** * Gets a list of virtual machine extension image versions. * @@ -106,9 +105,9 @@ public interface VirtualMachineExtensionImagesOperations { * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<VirtualMachineImageResource> object wrapped in {@link ServiceResponse} if successful. + * @return the List<VirtualMachineExtensionImage> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> listVersions(String location, String publisherName, String type, VirtualMachineImageResource filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> listVersions(String location, String publisherName, String type, VirtualMachineExtensionImage filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException; /** * Gets a list of virtual machine extension image versions. @@ -123,6 +122,6 @@ public interface VirtualMachineExtensionImagesOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listVersionsAsync(String location, String publisherName, String type, VirtualMachineImageResource filter, Integer top, String orderby, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + ServiceCall listVersionsAsync(String location, String publisherName, String type, VirtualMachineExtensionImage filter, Integer top, String orderby, final ServiceCallback> serviceCallback) throws IllegalArgumentException; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperationsImpl.java index 27849511fd36c..f6c032ded1ae1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImagesOperationsImpl.java @@ -10,7 +10,6 @@ import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; import com.microsoft.azure.management.compute.models.VirtualMachineExtensionImage; -import com.microsoft.azure.management.compute.models.VirtualMachineImageResource; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; @@ -64,7 +63,7 @@ interface VirtualMachineExtensionImagesService { @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/publishers/{publisherName}/artifacttypes/vmextension/types/{type}/versions") - Call listVersions(@Path("location") String location, @Path("publisherName") String publisherName, @Path("type") String type, @Path("subscriptionId") String subscriptionId, @Query("$filter") VirtualMachineImageResource filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + Call listVersions(@Path("location") String location, @Path("publisherName") String publisherName, @Path("type") String type, @Path("subscriptionId") String subscriptionId, @Query("$filter") VirtualMachineExtensionImage filter, @Query("$top") Integer top, @Query("$orderby") String orderby, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); } @@ -172,9 +171,9 @@ private ServiceResponse getDelegate(Response> listTypes(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listTypes(String location, String publisherName) throws CloudException, IOException, IllegalArgumentException { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -200,7 +199,7 @@ public ServiceResponse> listTypes(String locat * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listTypesAsync(String location, String publisherName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall listTypesAsync(String location, String publisherName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -222,7 +221,7 @@ public ServiceCall listTypesAsync(String location, String publisherName, final S } Call call = service.listTypes(location, publisherName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { + call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { @@ -235,9 +234,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listTypesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -251,9 +250,9 @@ private ServiceResponse> listTypesDelegate(Res * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<VirtualMachineImageResource> object wrapped in {@link ServiceResponse} if successful. + * @return the List<VirtualMachineExtensionImage> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listVersions(String location, String publisherName, String type) throws CloudException, IOException, IllegalArgumentException { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -269,7 +268,7 @@ public ServiceResponse> listVersions(String lo if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final VirtualMachineImageResource filter = null; + final VirtualMachineExtensionImage filter = null; final Integer top = null; final String orderby = null; Call call = service.listVersions(location, publisherName, type, this.client.getSubscriptionId(), filter, top, orderby, this.client.getApiVersion(), this.client.getAcceptLanguage()); @@ -286,7 +285,7 @@ public ServiceResponse> listVersions(String lo * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall listVersionsAsync(String location, String publisherName, String type, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -310,12 +309,12 @@ public ServiceCall listVersionsAsync(String location, String publisherName, Stri serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final VirtualMachineImageResource filter = null; + final VirtualMachineExtensionImage filter = null; final Integer top = null; final String orderby = null; Call call = service.listVersions(location, publisherName, type, this.client.getSubscriptionId(), filter, top, orderby, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { + call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { @@ -340,9 +339,9 @@ public void onResponse(Call call, Response response) * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters - * @return the List<VirtualMachineImageResource> object wrapped in {@link ServiceResponse} if successful. + * @return the List<VirtualMachineExtensionImage> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> listVersions(String location, String publisherName, String type, VirtualMachineImageResource filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listVersions(String location, String publisherName, String type, VirtualMachineExtensionImage filter, Integer top, String orderby) throws CloudException, IOException, IllegalArgumentException { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -376,7 +375,7 @@ public ServiceResponse> listVersions(String lo * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listVersionsAsync(String location, String publisherName, String type, VirtualMachineImageResource filter, Integer top, String orderby, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall listVersionsAsync(String location, String publisherName, String type, VirtualMachineExtensionImage filter, Integer top, String orderby, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -403,7 +402,7 @@ public ServiceCall listVersionsAsync(String location, String publisherName, Stri Validator.validate(filter, serviceCallback); Call call = service.listVersions(location, publisherName, type, this.client.getSubscriptionId(), filter, top, orderby, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { + call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { @@ -416,9 +415,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> listVersionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse> listVersionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionsOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionsOperationsImpl.java index b197989effea2..dafe0299150e2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionsOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionsOperationsImpl.java @@ -421,7 +421,6 @@ public void onResponse(Call call, Response response) private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetsOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetsOperationsImpl.java index 5c0c5a644258e..c40b3e28329df 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetsOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetsOperationsImpl.java @@ -366,12 +366,9 @@ public ServiceResponse deallocate(String resourceGroupName, String vmScale if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Response result = service.deallocate(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs).execute(); return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } @@ -401,12 +398,9 @@ public ServiceCall deallocateAsync(String resourceGroupName, String vmScaleSetNa if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.deallocate(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -526,12 +520,9 @@ public ServiceResponse beginDeallocate(String resourceGroupName, String vm if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); return beginDeallocateDelegate(call.execute()); } @@ -565,12 +556,9 @@ public ServiceCall beginDeallocateAsync(String resourceGroupName, String vmScale serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginDeallocate(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1427,12 +1415,9 @@ public ServiceResponse powerOff(String resourceGroupName, String vmScaleSe if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Response result = service.powerOff(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs).execute(); return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } @@ -1462,12 +1447,9 @@ public ServiceCall powerOffAsync(String resourceGroupName, String vmScaleSetName if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.powerOff(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -1587,12 +1569,9 @@ public ServiceResponse beginPowerOff(String resourceGroupName, String vmSc if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); return beginPowerOffDelegate(call.execute()); } @@ -1626,12 +1605,9 @@ public ServiceCall beginPowerOffAsync(String resourceGroupName, String vmScaleSe serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginPowerOff(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1762,12 +1738,9 @@ public ServiceResponse restart(String resourceGroupName, String vmScaleSet if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Response result = service.restart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs).execute(); return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } @@ -1797,12 +1770,9 @@ public ServiceCall restartAsync(String resourceGroupName, String vmScaleSetName, if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.restart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -1922,12 +1892,9 @@ public ServiceResponse beginRestart(String resourceGroupName, String vmSca if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginRestart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); return beginRestartDelegate(call.execute()); } @@ -1961,12 +1928,9 @@ public ServiceCall beginRestartAsync(String resourceGroupName, String vmScaleSet serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginRestart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -2097,12 +2061,9 @@ public ServiceResponse start(String resourceGroupName, String vmScaleSetNa if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Response result = service.start(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs).execute(); return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } @@ -2132,12 +2093,9 @@ public ServiceCall startAsync(String resourceGroupName, String vmScaleSetName, f if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.start(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -2257,12 +2215,9 @@ public ServiceResponse beginStart(String resourceGroupName, String vmScale if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginStart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); return beginStartDelegate(call.execute()); } @@ -2296,12 +2251,9 @@ public ServiceCall beginStartAsync(String resourceGroupName, String vmScaleSetNa serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final List instanceIds = null; - VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; - if (instanceIds != null) { - vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); - vmInstanceIDs.setInstanceIds(instanceIds); - } + final String instanceIdsConverted = null; + VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); + vmInstanceIDs = null; Call call = service.beginStart(resourceGroupName, vmScaleSetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), vmInstanceIDs); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperations.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperations.java index 163e5dc285d60..f9657f00868a0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperations.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperations.java @@ -7,13 +7,12 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; -import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachineSize; -import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCall; +import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; /** * An instance of this class provides access to all the operations defined @@ -21,7 +20,7 @@ */ public interface VirtualMachineSizesOperations { /** - * Lists virtual-machine-sizes available in a location for a subscription. + * 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 @@ -29,38 +28,16 @@ public interface VirtualMachineSizesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> list(final String location) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> list(String location) throws CloudException, IOException, IllegalArgumentException; /** - * Lists virtual-machine-sizes available in a location for a subscription. + * Lists all available virtual machine sizes for a subscription in a location. * * @param location The location upon which virtual-machine-sizes is queried. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listAsync(final String location, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - - /** - * Lists virtual-machine-sizes available in a location 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 List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; - - /** - * Lists virtual-machine-sizes available in a location for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listAsync(String location, final ServiceCallback> serviceCallback) throws IllegalArgumentException; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperationsImpl.java index fcdb50cade24a..9efc7b2e09aa9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizesOperationsImpl.java @@ -9,12 +9,10 @@ import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; -import com.microsoft.azure.ListOperationCallback; import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachineSize; -import com.microsoft.azure.Page; -import com.microsoft.azure.PagedList; import com.microsoft.rest.ServiceCall; +import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import com.microsoft.rest.ServiceResponseCallback; import java.io.IOException; @@ -26,7 +24,6 @@ import retrofit2.http.Headers; import retrofit2.http.Path; import retrofit2.http.Query; -import retrofit2.http.Url; import retrofit2.Response; import retrofit2.Retrofit; @@ -60,14 +57,10 @@ interface VirtualMachineSizesService { @GET("subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes") Call list(@Path("location") String location, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - } /** - * Lists virtual-machine-sizes available in a location for a subscription. + * 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 @@ -75,7 +68,7 @@ interface VirtualMachineSizesService { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> list(final String location) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> list(String location) throws CloudException, IOException, IllegalArgumentException { if (location == null) { throw new IllegalArgumentException("Parameter location is required and cannot be null."); } @@ -87,24 +80,19 @@ public ServiceResponse> list(final String location } Call call = service.list(location, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); ServiceResponse> response = listDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } /** - * Lists virtual-machine-sizes available in a location for a subscription. + * Lists all available virtual machine sizes for a subscription in a location. * * @param location The location upon which virtual-machine-sizes is queried. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listAsync(final String location, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listAsync(String location, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -127,13 +115,7 @@ public ServiceCall listAsync(final String location, final ListOperationCallback< public void onResponse(Call call, Response response) { try { ServiceResponse> result = listDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -149,67 +131,4 @@ private ServiceResponse> listDelegate(Response> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - return listNextDelegate(call.execute()); - } - - /** - * Lists virtual-machine-sizes available in a location for a subscription. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperations.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperations.java index 7112d11959e6a..4b01d90365d18 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperations.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperations.java @@ -8,6 +8,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.models.InstanceViewTypes; import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachine; import com.microsoft.azure.management.compute.models.VirtualMachineCaptureParameters; @@ -18,6 +19,7 @@ import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceResponse; import java.io.IOException; +import java.util.List; /** * An instance of this class provides access to all the operations defined @@ -25,7 +27,7 @@ */ public interface VirtualMachinesOperations { /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -39,7 +41,7 @@ public interface VirtualMachinesOperations { ServiceResponse capture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) throws CloudException, IOException, IllegalArgumentException, InterruptedException; /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -51,7 +53,7 @@ public interface VirtualMachinesOperations { ServiceCall captureAsync(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -64,7 +66,7 @@ public interface VirtualMachinesOperations { ServiceResponse beginCapture(String resourceGroupName, String vmName, VirtualMachineCaptureParameters parameters) throws CloudException, IOException, IllegalArgumentException; /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -200,25 +202,25 @@ public interface VirtualMachinesOperations { * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param expand The expand expression to apply on the operation. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachine object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse get(String resourceGroupName, String vmName, String expand) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse get(String resourceGroupName, String vmName, InstanceViewTypes expand) throws CloudException, IOException, IllegalArgumentException; /** * The operation to get a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param expand The expand expression to apply on the operation. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getAsync(String resourceGroupName, String vmName, InstanceViewTypes expand, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Shuts down the Virtual Machine and releases the compute resources. You are not billed for the compute resources that this Virtual Machine uses. @@ -299,7 +301,7 @@ public interface VirtualMachinesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachine> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException; /** * The operation to list virtual machines under a resource group. @@ -309,7 +311,7 @@ public interface VirtualMachinesOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listAsync(String resourceGroupName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** * 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. @@ -331,7 +333,7 @@ public interface VirtualMachinesOperations { ServiceCall listAllAsync(final ListOperationCallback serviceCallback) throws IllegalArgumentException; /** - * Lists virtual-machine-sizes available to be used for a virtual machine. + * Lists all available virtual machine sizes it can be resized to for a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -340,10 +342,10 @@ public interface VirtualMachinesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> listAvailableSizes(final String resourceGroupName, final String vmName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> listAvailableSizes(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException; /** - * Lists virtual-machine-sizes available to be used for a virtual machine. + * Lists all available virtual machine sizes it can be resized to for a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -351,7 +353,7 @@ public interface VirtualMachinesOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listAvailableSizesAsync(final String resourceGroupName, final String vmName, final ListOperationCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listAvailableSizesAsync(String resourceGroupName, String vmName, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** * The operation to power off (stop) a virtual machine. @@ -541,28 +543,6 @@ public interface VirtualMachinesOperations { */ ServiceCall beginRedeployAsync(String resourceGroupName, String vmName, final ServiceCallback serviceCallback) throws IllegalArgumentException; - /** - * 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 List<VirtualMachine> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; - - /** - * The operation to list virtual machines under a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - /** * 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. * @@ -585,26 +565,4 @@ public interface VirtualMachinesOperations { */ ServiceCall listAllNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - /** - * Lists virtual-machine-sizes available to be used for a virtual machine. - * - * @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 List<VirtualMachineSize> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> listAvailableSizesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException; - - /** - * Lists virtual-machine-sizes available to be used for a virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall listAvailableSizesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException; - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperationsImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperationsImpl.java index 4548dd6a4c0d5..a6bf9d580432c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperationsImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinesOperationsImpl.java @@ -10,6 +10,7 @@ import com.microsoft.azure.AzureServiceResponseBuilder; import com.microsoft.azure.CloudException; import com.microsoft.azure.ListOperationCallback; +import com.microsoft.azure.management.compute.models.InstanceViewTypes; import com.microsoft.azure.management.compute.models.PageImpl; import com.microsoft.azure.management.compute.models.VirtualMachine; import com.microsoft.azure.management.compute.models.VirtualMachineCaptureParameters; @@ -92,7 +93,7 @@ interface VirtualMachinesService { @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}") - Call get(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") String expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + Call get(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("$expand") InstanceViewTypes expand, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/deallocate") @@ -150,22 +151,14 @@ interface VirtualMachinesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/redeploy") Call beginRedeploy(@Path("resourceGroupName") String resourceGroupName, @Path("vmName") String vmName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET Call listAllNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET - Call listAvailableSizesNext(@Url String nextPageLink, @Header("accept-language") String acceptLanguage); - } /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -198,7 +191,7 @@ public ServiceResponse capture(String resourceGroup } /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -243,7 +236,7 @@ public void onResponse(Call call, Response response) } /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -275,7 +268,7 @@ public ServiceResponse beginCapture(String resource } /** - * Captures the VM by copying VirtualHardDisks of the VM and outputs a template that can be used to create similar VMs. + * Captures the VM by copying virtual hard disks of the VM and outputs a template that can be used to create similar VMs. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -641,7 +634,6 @@ public void onResponse(Call call, Response response) private ServiceResponse beginDeleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) .register(204, new TypeToken() { }.getType()) .build(response); @@ -670,7 +662,7 @@ public ServiceResponse get(String resourceGroupName, String vmNa if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - final String expand = null; + final InstanceViewTypes expand = null; Call call = service.get(resourceGroupName, vmName, this.client.getSubscriptionId(), expand, this.client.getApiVersion(), this.client.getAcceptLanguage()); return getDelegate(call.execute()); } @@ -704,7 +696,7 @@ public ServiceCall getAsync(String resourceGroupName, String vmName, final Servi serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - final String expand = null; + final InstanceViewTypes expand = null; Call call = service.get(resourceGroupName, vmName, this.client.getSubscriptionId(), expand, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -725,13 +717,13 @@ public void onResponse(Call call, Response response) * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param expand The expand expression to apply on the operation. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the VirtualMachine object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse get(String resourceGroupName, String vmName, String expand) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse get(String resourceGroupName, String vmName, InstanceViewTypes expand) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -753,12 +745,12 @@ public ServiceResponse get(String resourceGroupName, String vmNa * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. - * @param expand The expand expression to apply on the operation. + * @param expand The expand expression to apply on the operation. Possible values include: 'instanceView' * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getAsync(String resourceGroupName, String vmName, String expand, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getAsync(String resourceGroupName, String vmName, InstanceViewTypes expand, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1031,7 +1023,7 @@ private ServiceResponse generalizeDelegate(Response response * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<VirtualMachine> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> list(final String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> list(String resourceGroupName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1043,12 +1035,7 @@ public ServiceResponse> list(final String resourceGrou } Call call = service.list(resourceGroupName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); ServiceResponse> response = listDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } @@ -1060,7 +1047,7 @@ public Page nextPage(String nextPageLink) throws CloudException, * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listAsync(String resourceGroupName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1083,13 +1070,7 @@ public ServiceCall listAsync(final String resourceGroupName, final ListOperation public void onResponse(Call call, Response response) { try { ServiceResponse> result = listDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1180,7 +1161,7 @@ private ServiceResponse> listAllDelegate(Response> listAllDelegate(Response> listAvailableSizes(final String resourceGroupName, final String vmName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> listAvailableSizes(String resourceGroupName, String vmName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1204,17 +1185,12 @@ public ServiceResponse> listAvailableSizes(final S } Call call = service.listAvailableSizes(resourceGroupName, vmName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); ServiceResponse> response = listAvailableSizesDelegate(call.execute()); - PagedList result = new PagedList(response.getBody()) { - @Override - public Page nextPage(String nextPageLink) throws CloudException, IOException { - return listAvailableSizesNext(nextPageLink).getBody(); - } - }; + List result = response.getBody().getItems(); return new ServiceResponse<>(result, response.getResponse()); } /** - * Lists virtual-machine-sizes available to be used for a virtual machine. + * Lists all available virtual machine sizes it can be resized to for a virtual machine. * * @param resourceGroupName The name of the resource group. * @param vmName The name of the virtual machine. @@ -1222,7 +1198,7 @@ public Page nextPage(String nextPageLink) throws CloudExcept * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listAvailableSizesAsync(final String resourceGroupName, final String vmName, final ListOperationCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listAvailableSizesAsync(String resourceGroupName, String vmName, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1249,13 +1225,7 @@ public ServiceCall listAvailableSizesAsync(final String resourceGroupName, final public void onResponse(Call call, Response response) { try { ServiceResponse> result = listAvailableSizesDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listAvailableSizesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } + serviceCallback.success(new ServiceResponse<>(result.getBody().getItems(), result.getResponse())); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1851,69 +1821,6 @@ private ServiceResponse beginRedeployDelegate(Response respo .build(response); } - /** - * 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 List<VirtualMachine> object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse> listNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - return listNextDelegate(call.execute()); - } - - /** - * The operation to list virtual machines under a resource group. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listNext(nextPageLink, this.client.getAcceptLanguage()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * 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. * @@ -1977,67 +1884,4 @@ private ServiceResponse> listAllNextDelegate(Response> listAvailableSizesNext(final String nextPageLink) throws CloudException, IOException, IllegalArgumentException { - if (nextPageLink == null) { - throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); - } - Call call = service.listAvailableSizesNext(nextPageLink, this.client.getAcceptLanguage()); - return listAvailableSizesNextDelegate(call.execute()); - } - - /** - * Lists virtual-machine-sizes available to be used for a virtual machine. - * - * @param nextPageLink The NextLink from the previous successful call to List operation. - * @param serviceCall the ServiceCall object tracking the Retrofit calls - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listAvailableSizesNextAsync(final String nextPageLink, final ServiceCall serviceCall, final ListOperationCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (nextPageLink == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter nextPageLink is required and cannot be null.")); - return null; - } - Call call = service.listAvailableSizesNext(nextPageLink, this.client.getAcceptLanguage()); - serviceCall.newCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - ServiceResponse> result = listAvailableSizesNextDelegate(response); - serviceCallback.load(result.getBody().getItems()); - if (result.getBody().getNextPageLink() != null - && serviceCallback.progress(result.getBody().getItems()) == ListOperationCallback.PagingBahavior.CONTINUE) { - listAvailableSizesNextAsync(result.getBody().getNextPageLink(), serviceCall, serviceCallback); - } else { - serviceCallback.success(new ServiceResponse<>(serviceCallback.get(), result.getResponse())); - } - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse> listAvailableSizesNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/AdditionalUnattendContent.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/AdditionalUnattendContent.java index be55649b1b810..e6a66edff1e94 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/AdditionalUnattendContent.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/AdditionalUnattendContent.java @@ -18,20 +18,20 @@ public class AdditionalUnattendContent { * Gets or sets the pass name. Currently, the only allowable value is * oobeSystem. Possible values include: 'oobeSystem'. */ - private String passName; + private PassNames passName; /** * Gets or sets the component name. Currently, the only allowable value is * Microsoft-Windows-Shell-Setup. Possible values include: * 'Microsoft-Windows-Shell-Setup'. */ - private String componentName; + private ComponentNames componentName; /** * Gets or sets setting name (e.g. FirstLogonCommands, AutoLogon ). * Possible values include: 'AutoLogon', 'FirstLogonCommands'. */ - private String settingName; + private SettingNames settingName; /** * Gets or sets XML formatted content that is added to the unattend.xml @@ -46,7 +46,7 @@ public class AdditionalUnattendContent { * * @return the passName value */ - public String getPassName() { + public PassNames getPassName() { return this.passName; } @@ -55,7 +55,7 @@ public String getPassName() { * * @param passName the passName value to set */ - public void setPassName(String passName) { + public void setPassName(PassNames passName) { this.passName = passName; } @@ -64,7 +64,7 @@ public void setPassName(String passName) { * * @return the componentName value */ - public String getComponentName() { + public ComponentNames getComponentName() { return this.componentName; } @@ -73,7 +73,7 @@ public String getComponentName() { * * @param componentName the componentName value to set */ - public void setComponentName(String componentName) { + public void setComponentName(ComponentNames componentName) { this.componentName = componentName; } @@ -82,7 +82,7 @@ public void setComponentName(String componentName) { * * @return the settingName value */ - public String getSettingName() { + public SettingNames getSettingName() { return this.settingName; } @@ -91,7 +91,7 @@ public String getSettingName() { * * @param settingName the settingName value to set */ - public void setSettingName(String settingName) { + public void setSettingName(SettingNames settingName) { this.settingName = settingName; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ApiEntityReference.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ApiEntityReference.java index 77a2ecf5fbafe..c2a3c48a15ac5 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ApiEntityReference.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ApiEntityReference.java @@ -12,8 +12,7 @@ */ public class ApiEntityReference { /** - * Gets or sets the relative URL in the previous Service Management API's - * namespace. For Example: + * Gets or sets ARM resource id in the form of * /subscriptions/{SubcriptionId}/resourceGroups/{ResourceGroupName}/... */ private String id; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/BootDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/BootDiagnostics.java index 5f5d0a73c0274..2c62a387bb76d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/BootDiagnostics.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/BootDiagnostics.java @@ -12,7 +12,7 @@ */ public class BootDiagnostics { /** - * Gets or sets whether VM Agent should be provisioned on the Virtual + * Gets or sets whether boot diagnostics should be enabled on the Virtual * Machine. */ private Boolean enabled; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/CachingTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/CachingTypes.java new file mode 100644 index 0000000000000..7f5ac3606b516 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/CachingTypes.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for CachingTypes. + */ +public enum CachingTypes { + /** Enum value None. */ + NONE("None"), + + /** Enum value ReadOnly. */ + READONLY("ReadOnly"), + + /** Enum value ReadWrite. */ + READWRITE("ReadWrite"); + + /** The actual serialized value for a CachingTypes instance. */ + private String value; + + CachingTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a CachingTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a CachingTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed CachingTypes object, or null if unable to parse. + */ + @JsonCreator + public static CachingTypes fromValue(String value) { + CachingTypes[] items = CachingTypes.values(); + for (CachingTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ComponentNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ComponentNames.java new file mode 100644 index 0000000000000..5d9fca2bd27d0 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ComponentNames.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ComponentNames. + */ +public enum ComponentNames { + /** Enum value Microsoft-Windows-Shell-Setup. */ + MICROSOFT_WINDOWS_SHELL_SETUP("Microsoft-Windows-Shell-Setup"); + + /** The actual serialized value for a ComponentNames instance. */ + private String value; + + ComponentNames(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a ComponentNames instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a ComponentNames instance. + * + * @param value the serialized value to parse. + * @return the parsed ComponentNames object, or null if unable to parse. + */ + @JsonCreator + public static ComponentNames fromValue(String value) { + ComponentNames[] items = ComponentNames.values(); + for (ComponentNames item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DataDisk.java index f8c3b39ea1a18..202383a5b20a9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DataDisk.java @@ -42,14 +42,14 @@ public class DataDisk { * Gets or sets the caching type. Possible values include: 'None', * 'ReadOnly', 'ReadWrite'. */ - private String caching; + private CachingTypes caching; /** * Gets or sets the create option. Possible values include: 'fromImage', * 'empty', 'attach'. */ @JsonProperty(required = true) - private String createOption; + private DiskCreateOptionTypes createOption; /** * Gets or sets the initial disk size in GB for blank data disks, and the @@ -134,7 +134,7 @@ public void setImage(VirtualHardDisk image) { * * @return the caching value */ - public String getCaching() { + public CachingTypes getCaching() { return this.caching; } @@ -143,7 +143,7 @@ public String getCaching() { * * @param caching the caching value to set */ - public void setCaching(String caching) { + public void setCaching(CachingTypes caching) { this.caching = caching; } @@ -152,7 +152,7 @@ public void setCaching(String caching) { * * @return the createOption value */ - public String getCreateOption() { + public DiskCreateOptionTypes getCreateOption() { return this.createOption; } @@ -161,7 +161,7 @@ public String getCreateOption() { * * @param createOption the createOption value to set */ - public void setCreateOption(String createOption) { + public void setCreateOption(DiskCreateOptionTypes createOption) { this.createOption = createOption; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskCreateOptionTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskCreateOptionTypes.java new file mode 100644 index 0000000000000..b5b9019c992e0 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskCreateOptionTypes.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for DiskCreateOptionTypes. + */ +public enum DiskCreateOptionTypes { + /** Enum value fromImage. */ + FROMIMAGE("fromImage"), + + /** Enum value empty. */ + EMPTY("empty"), + + /** Enum value attach. */ + ATTACH("attach"); + + /** The actual serialized value for a DiskCreateOptionTypes instance. */ + private String value; + + DiskCreateOptionTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a DiskCreateOptionTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a DiskCreateOptionTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed DiskCreateOptionTypes object, or null if unable to parse. + */ + @JsonCreator + public static DiskCreateOptionTypes fromValue(String value) { + DiskCreateOptionTypes[] items = DiskCreateOptionTypes.values(); + for (DiskCreateOptionTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskEncryptionSettings.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskEncryptionSettings.java index d8873164a11b3..52b38c10bfa49 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskEncryptionSettings.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/DiskEncryptionSettings.java @@ -23,6 +23,12 @@ public class DiskEncryptionSettings { */ private KeyVaultKeyReference keyEncryptionKey; + /** + * Gets or sets whether disk encryption should be enabled on the Virtual + * Machine. + */ + private Boolean enabled; + /** * Get the diskEncryptionKey value. * @@ -59,4 +65,22 @@ public void setKeyEncryptionKey(KeyVaultKeyReference keyEncryptionKey) { this.keyEncryptionKey = keyEncryptionKey; } + /** + * Get the enabled value. + * + * @return the enabled value + */ + public Boolean getEnabled() { + return this.enabled; + } + + /** + * Set the enabled value. + * + * @param enabled the enabled value to set + */ + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ForceUpdateTagTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ForceUpdateTagTypes.java new file mode 100644 index 0000000000000..338dfcd625f32 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ForceUpdateTagTypes.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ForceUpdateTagTypes. + */ +public enum ForceUpdateTagTypes { + /** Enum value RerunExtension. */ + RERUNEXTENSION("RerunExtension"); + + /** The actual serialized value for a ForceUpdateTagTypes instance. */ + private String value; + + ForceUpdateTagTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a ForceUpdateTagTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a ForceUpdateTagTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ForceUpdateTagTypes object, or null if unable to parse. + */ + @JsonCreator + public static ForceUpdateTagTypes fromValue(String value) { + ForceUpdateTagTypes[] items = ForceUpdateTagTypes.values(); + for (ForceUpdateTagTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewStatus.java index df214b968bff8..e6ae7934e349b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewStatus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewStatus.java @@ -13,7 +13,7 @@ */ public class InstanceViewStatus { /** - * Gets or sets the status Code. + * Gets the status Code. */ private String code; @@ -21,7 +21,7 @@ public class InstanceViewStatus { * Gets or sets the level Code. Possible values include: 'Info', * 'Warning', 'Error'. */ - private String level; + private StatusLevelTypes level; /** * Gets or sets the short localizable label for the status. @@ -29,8 +29,8 @@ public class InstanceViewStatus { private String displayStatus; /** - * Gets or sets the optional detailed Message, including for alerts and - * error messages. + * Gets or sets the detailed Message, including for alerts and error + * messages. */ private String message; @@ -62,7 +62,7 @@ public void setCode(String code) { * * @return the level value */ - public String getLevel() { + public StatusLevelTypes getLevel() { return this.level; } @@ -71,7 +71,7 @@ public String getLevel() { * * @param level the level value to set */ - public void setLevel(String level) { + public void setLevel(StatusLevelTypes level) { this.level = level; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewTypes.java new file mode 100644 index 0000000000000..ec676426a1bcb --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/InstanceViewTypes.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for InstanceViewTypes. + */ +public enum InstanceViewTypes { + /** Enum value instanceView. */ + INSTANCEVIEW("instanceView"); + + /** The actual serialized value for a InstanceViewTypes instance. */ + private String value; + + InstanceViewTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a InstanceViewTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a InstanceViewTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed InstanceViewTypes object, or null if unable to parse. + */ + @JsonCreator + public static InstanceViewTypes fromValue(String value) { + InstanceViewTypes[] items = InstanceViewTypes.values(); + for (InstanceViewTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDisk.java index 333365f158046..95b22a2dc5e78 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDisk.java @@ -16,7 +16,7 @@ public class OSDisk { * Gets or sets the Operating System type. Possible values include: * 'Windows', 'Linux'. */ - private String osType; + private OperatingSystemTypes osType; /** * Gets or sets the disk encryption settings. @@ -47,14 +47,14 @@ public class OSDisk { * Gets or sets the caching type. Possible values include: 'None', * 'ReadOnly', 'ReadWrite'. */ - private String caching; + private CachingTypes caching; /** * Gets or sets the create option. Possible values include: 'fromImage', * 'empty', 'attach'. */ @JsonProperty(required = true) - private String createOption; + private DiskCreateOptionTypes createOption; /** * Gets or sets the initial disk size in GB for blank data disks, and the @@ -67,7 +67,7 @@ public class OSDisk { * * @return the osType value */ - public String getOsType() { + public OperatingSystemTypes getOsType() { return this.osType; } @@ -76,7 +76,7 @@ public String getOsType() { * * @param osType the osType value to set */ - public void setOsType(String osType) { + public void setOsType(OperatingSystemTypes osType) { this.osType = osType; } @@ -157,7 +157,7 @@ public void setImage(VirtualHardDisk image) { * * @return the caching value */ - public String getCaching() { + public CachingTypes getCaching() { return this.caching; } @@ -166,7 +166,7 @@ public String getCaching() { * * @param caching the caching value to set */ - public void setCaching(String caching) { + public void setCaching(CachingTypes caching) { this.caching = caching; } @@ -175,7 +175,7 @@ public void setCaching(String caching) { * * @return the createOption value */ - public String getCreateOption() { + public DiskCreateOptionTypes getCreateOption() { return this.createOption; } @@ -184,7 +184,7 @@ public String getCreateOption() { * * @param createOption the createOption value to set */ - public void setCreateOption(String createOption) { + public void setCreateOption(DiskCreateOptionTypes createOption) { this.createOption = createOption; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDiskImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDiskImage.java index c79b941b0ced3..752b9e4b6f482 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDiskImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OSDiskImage.java @@ -17,14 +17,14 @@ public class OSDiskImage { * include: 'Windows', 'Linux'. */ @JsonProperty(required = true) - private String operatingSystem; + private OperatingSystemTypes operatingSystem; /** * Get the operatingSystem value. * * @return the operatingSystem value */ - public String getOperatingSystem() { + public OperatingSystemTypes getOperatingSystem() { return this.operatingSystem; } @@ -33,7 +33,7 @@ public String getOperatingSystem() { * * @param operatingSystem the operatingSystem value to set */ - public void setOperatingSystem(String operatingSystem) { + public void setOperatingSystem(OperatingSystemTypes operatingSystem) { this.operatingSystem = operatingSystem; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OperatingSystemTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OperatingSystemTypes.java new file mode 100644 index 0000000000000..bbeca90b539c3 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/OperatingSystemTypes.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for OperatingSystemTypes. + */ +public enum OperatingSystemTypes { + /** Enum value Windows. */ + WINDOWS("Windows"), + + /** Enum value Linux. */ + LINUX("Linux"); + + /** The actual serialized value for a OperatingSystemTypes instance. */ + private String value; + + OperatingSystemTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a OperatingSystemTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a OperatingSystemTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed OperatingSystemTypes object, or null if unable to parse. + */ + @JsonCreator + public static OperatingSystemTypes fromValue(String value) { + OperatingSystemTypes[] items = OperatingSystemTypes.values(); + for (OperatingSystemTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl.java index a606a095144eb..ddeb9505ecef9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl.java @@ -20,7 +20,7 @@ public class PageImpl implements Page { /** * The link to the next page. */ - @JsonProperty("nextLink") + @JsonProperty("") private String nextPageLink; /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl1.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl1.java new file mode 100644 index 0000000000000..d89fd8f14ef2f --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PageImpl1.java @@ -0,0 +1,51 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.microsoft.azure.Page; +import java.util.List; + +/** + * An instance of this class defines a page of Azure resources and a link to + * get the next page of resources, if any. + * + * @param type of Azure resource + */ +public class PageImpl1 implements Page { + /** + * The link to the next page. + */ + @JsonProperty("nextLink") + private String nextPageLink; + + /** + * The list of items. + */ + @JsonProperty("value") + private List items; + + /** + * Gets the link to the next page. + * + * @return the link to the next page. + */ + @Override + public String getNextPageLink() { + return this.nextPageLink; + } + + /** + * Gets the list of items. + * + * @return the list of items in {@link List}. + */ + @Override + public List getItems() { + return items; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PassNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PassNames.java new file mode 100644 index 0000000000000..dcd692fc3e2d0 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/PassNames.java @@ -0,0 +1,57 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for PassNames. + */ +public enum PassNames { + /** Enum value oobeSystem. */ + OOBESYSTEM("oobeSystem"); + + /** The actual serialized value for a PassNames instance. */ + private String value; + + PassNames(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a PassNames instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a PassNames instance. + * + * @param value the serialized value to parse. + * @return the parsed PassNames object, or null if unable to parse. + */ + @JsonCreator + public static PassNames fromValue(String value) { + PassNames[] items = PassNames.values(); + for (PassNames item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ProtocolTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ProtocolTypes.java new file mode 100644 index 0000000000000..50c6c7dbe52ea --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/ProtocolTypes.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for ProtocolTypes. + */ +public enum ProtocolTypes { + /** Enum value Http. */ + HTTP("Http"), + + /** Enum value Https. */ + HTTPS("Https"); + + /** The actual serialized value for a ProtocolTypes instance. */ + private String value; + + ProtocolTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a ProtocolTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a ProtocolTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed ProtocolTypes object, or null if unable to parse. + */ + @JsonCreator + public static ProtocolTypes fromValue(String value) { + ProtocolTypes[] items = ProtocolTypes.values(); + for (ProtocolTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/SettingNames.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/SettingNames.java new file mode 100644 index 0000000000000..f37548595dbe5 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/SettingNames.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for SettingNames. + */ +public enum SettingNames { + /** Enum value AutoLogon. */ + AUTOLOGON("AutoLogon"), + + /** Enum value FirstLogonCommands. */ + FIRSTLOGONCOMMANDS("FirstLogonCommands"); + + /** The actual serialized value for a SettingNames instance. */ + private String value; + + SettingNames(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a SettingNames instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a SettingNames instance. + * + * @param value the serialized value to parse. + * @return the parsed SettingNames object, or null if unable to parse. + */ + @JsonCreator + public static SettingNames fromValue(String value) { + SettingNames[] items = SettingNames.values(); + for (SettingNames item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/StatusLevelTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/StatusLevelTypes.java new file mode 100644 index 0000000000000..2100f1fa6e7f7 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/StatusLevelTypes.java @@ -0,0 +1,63 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for StatusLevelTypes. + */ +public enum StatusLevelTypes { + /** Enum value Info. */ + INFO("Info"), + + /** Enum value Warning. */ + WARNING("Warning"), + + /** Enum value Error. */ + ERROR("Error"); + + /** The actual serialized value for a StatusLevelTypes instance. */ + private String value; + + StatusLevelTypes(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a StatusLevelTypes instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a StatusLevelTypes instance. + * + * @param value the serialized value to parse. + * @return the parsed StatusLevelTypes object, or null if unable to parse. + */ + @JsonCreator + public static StatusLevelTypes fromValue(String value) { + StatusLevelTypes[] items = StatusLevelTypes.values(); + for (StatusLevelTypes item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradeMode.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradeMode.java new file mode 100644 index 0000000000000..3dee59f9081db --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradeMode.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeMode. + */ +public enum UpgradeMode { + /** Enum value Automatic. */ + AUTOMATIC("Automatic"), + + /** Enum value Manual. */ + MANUAL("Manual"); + + /** The actual serialized value for a UpgradeMode instance. */ + private String value; + + UpgradeMode(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a UpgradeMode instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a UpgradeMode instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeMode object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeMode fromValue(String value) { + UpgradeMode[] items = UpgradeMode.values(); + for (UpgradeMode item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradePolicy.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradePolicy.java index 5870b09666e69..116bcfe1962e9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradePolicy.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/UpgradePolicy.java @@ -15,14 +15,14 @@ public class UpgradePolicy { * Gets or sets the upgrade mode. Possible values include: 'Automatic', * 'Manual'. */ - private String mode; + private UpgradeMode mode; /** * Get the mode value. * * @return the mode value */ - public String getMode() { + public UpgradeMode getMode() { return this.mode; } @@ -31,7 +31,7 @@ public String getMode() { * * @param mode the mode value to set */ - public void setMode(String mode) { + public void setMode(UpgradeMode mode) { this.mode = mode; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtension.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtension.java index 2b360df1bee8d..21740ae2e878b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtension.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtension.java @@ -15,6 +15,14 @@ */ @JsonFlatten public class VirtualMachineExtension extends Resource { + /** + * Gets or sets how the extension handler should be forced to update even + * if the extension configuration has not changed. Possible values + * include: 'RerunExtension'. + */ + @JsonProperty(value = "properties.forceUpdateTag") + private ForceUpdateTagTypes forceUpdateTag; + /** * Gets or sets the name of the extension handler publisher. */ @@ -40,13 +48,6 @@ public class VirtualMachineExtension extends Resource { @JsonProperty(value = "properties.autoUpgradeMinorVersion") private Boolean autoUpgradeMinorVersion; - /** - * Gets or sets whether the extension handler should be forced to re-run - * even if the extension configuration has not changed. - */ - @JsonProperty(value = "properties.forceUpdateTag") - private String forceUpdateTag; - /** * Gets or sets Json formatted public settings for the extension. */ @@ -71,6 +72,24 @@ public class VirtualMachineExtension extends Resource { @JsonProperty(value = "properties.instanceView") private VirtualMachineExtensionInstanceView instanceView; + /** + * Get the forceUpdateTag value. + * + * @return the forceUpdateTag value + */ + public ForceUpdateTagTypes getForceUpdateTag() { + return this.forceUpdateTag; + } + + /** + * Set the forceUpdateTag value. + * + * @param forceUpdateTag the forceUpdateTag value to set + */ + public void setForceUpdateTag(ForceUpdateTagTypes forceUpdateTag) { + this.forceUpdateTag = forceUpdateTag; + } + /** * Get the publisher value. * @@ -143,24 +162,6 @@ public void setAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) { this.autoUpgradeMinorVersion = autoUpgradeMinorVersion; } - /** - * Get the forceUpdateTag value. - * - * @return the forceUpdateTag value - */ - public String getForceUpdateTag() { - return this.forceUpdateTag; - } - - /** - * Set the forceUpdateTag value. - * - * @param forceUpdateTag the forceUpdateTag value to set - */ - public void setForceUpdateTag(String forceUpdateTag) { - this.forceUpdateTag = forceUpdateTag; - } - /** * Get the settings value. * diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtensionImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtensionImage.java index 40c428fd9338f..d0cb84b196d51 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtensionImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineExtensionImage.java @@ -6,16 +6,15 @@ package com.microsoft.azure.management.compute.models; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; +import com.microsoft.azure.Resource; /** * Describes a Virtual Machine Extension Image. */ @JsonFlatten -public class VirtualMachineExtensionImage extends SubResource { +public class VirtualMachineExtensionImage extends Resource { /** * Gets or sets the operating system this extension supports. */ @@ -50,23 +49,6 @@ public class VirtualMachineExtensionImage extends SubResource { @JsonProperty(value = "properties.supportsMultipleExtensions") private Boolean supportsMultipleExtensions; - /** - * Gets or sets the name of the resource. - */ - @JsonProperty(required = true) - private String name; - - /** - * Gets or sets the location of the resource. - */ - @JsonProperty(required = true) - private String location; - - /** - * Gets or sets the tags attached to the resource. - */ - private Map tags; - /** * Get the operatingSystem value. * @@ -157,58 +139,4 @@ public void setSupportsMultipleExtensions(Boolean supportsMultipleExtensions) { this.supportsMultipleExtensions = supportsMultipleExtensions; } - /** - * Get the name value. - * - * @return the name value - */ - public String getName() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String getLocation() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - */ - public void setLocation(String location) { - this.location = location; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map getTags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - */ - public void setTags(Map tags) { - this.tags = tags; - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineImage.java index 6e35ec1899d4c..c0afb760489c9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineImage.java @@ -7,16 +7,14 @@ package com.microsoft.azure.management.compute.models; import java.util.List; -import java.util.Map; import com.fasterxml.jackson.annotation.JsonProperty; import com.microsoft.rest.serializer.JsonFlatten; -import com.microsoft.azure.SubResource; /** * Describes a Virtual Machine Image. */ @JsonFlatten -public class VirtualMachineImage extends SubResource { +public class VirtualMachineImage extends VirtualMachineImageResource { /** * The plan property. */ @@ -35,23 +33,6 @@ public class VirtualMachineImage extends SubResource { @JsonProperty(value = "properties.dataDiskImages") private List dataDiskImages; - /** - * Gets or sets the name of the resource. - */ - @JsonProperty(required = true) - private String name; - - /** - * Gets or sets the location of the resource. - */ - @JsonProperty(required = true) - private String location; - - /** - * Gets or sets the tags attached to the resource. - */ - private Map tags; - /** * Get the plan value. * @@ -106,58 +87,4 @@ public void setDataDiskImages(List dataDiskImages) { this.dataDiskImages = dataDiskImages; } - /** - * Get the name value. - * - * @return the name value - */ - public String getName() { - return this.name; - } - - /** - * Set the name value. - * - * @param name the name value to set - */ - public void setName(String name) { - this.name = name; - } - - /** - * Get the location value. - * - * @return the location value - */ - public String getLocation() { - return this.location; - } - - /** - * Set the location value. - * - * @param location the location value to set - */ - public void setLocation(String location) { - this.location = location; - } - - /** - * Get the tags value. - * - * @return the tags value - */ - public Map getTags() { - return this.tags; - } - - /** - * Set the tags value. - * - * @param tags the tags value to set - */ - public void setTags(Map tags) { - this.tags = tags; - } - } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSet.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSet.java index f757d3f20d871..2b10a664517d2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSet.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSet.java @@ -38,6 +38,13 @@ public class VirtualMachineScaleSet extends Resource { @JsonProperty(value = "properties.provisioningState") private String provisioningState; + /** + * Specifies whether the Virtual Machine Scale Set should be + * overprovisioned. + */ + @JsonProperty(value = "properties.overProvision") + private Boolean overProvision; + /** * Get the sku value. * @@ -110,4 +117,22 @@ public void setProvisioningState(String provisioningState) { this.provisioningState = provisioningState; } + /** + * Get the overProvision value. + * + * @return the overProvision value + */ + public Boolean getOverProvision() { + return this.overProvision; + } + + /** + * Set the overProvision value. + * + * @param overProvision the overProvision value to set + */ + public void setOverProvision(Boolean overProvision) { + this.overProvision = overProvision; + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetOSDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetOSDisk.java index 17b14f6c3168f..267691c09674d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetOSDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetOSDisk.java @@ -23,20 +23,20 @@ public class VirtualMachineScaleSetOSDisk { * Gets or sets the caching type. Possible values include: 'None', * 'ReadOnly', 'ReadWrite'. */ - private String caching; + private CachingTypes caching; /** * Gets or sets the create option. Possible values include: 'fromImage', * 'empty', 'attach'. */ @JsonProperty(required = true) - private String createOption; + private DiskCreateOptionTypes createOption; /** * Gets or sets the Operating System type. Possible values include: * 'Windows', 'Linux'. */ - private String osType; + private OperatingSystemTypes osType; /** * Gets or sets the Source User Image VirtualHardDisk. This @@ -74,7 +74,7 @@ public void setName(String name) { * * @return the caching value */ - public String getCaching() { + public CachingTypes getCaching() { return this.caching; } @@ -83,7 +83,7 @@ public String getCaching() { * * @param caching the caching value to set */ - public void setCaching(String caching) { + public void setCaching(CachingTypes caching) { this.caching = caching; } @@ -92,7 +92,7 @@ public void setCaching(String caching) { * * @return the createOption value */ - public String getCreateOption() { + public DiskCreateOptionTypes getCreateOption() { return this.createOption; } @@ -101,7 +101,7 @@ public String getCreateOption() { * * @param createOption the createOption value to set */ - public void setCreateOption(String createOption) { + public void setCreateOption(DiskCreateOptionTypes createOption) { this.createOption = createOption; } @@ -110,7 +110,7 @@ public void setCreateOption(String createOption) { * * @return the osType value */ - public String getOsType() { + public OperatingSystemTypes getOsType() { return this.osType; } @@ -119,7 +119,7 @@ public String getOsType() { * * @param osType the osType value to set */ - public void setOsType(String osType) { + public void setOsType(OperatingSystemTypes osType) { this.osType = osType; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuCapacity.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuCapacity.java index b3ddea9ce1ea6..d5597fde4f6fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuCapacity.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuCapacity.java @@ -35,7 +35,7 @@ public class VirtualMachineScaleSetSkuCapacity { * 'Automatic', 'None'. */ @JsonProperty(access = JsonProperty.Access.WRITE_ONLY) - private String scaleType; + private VirtualMachineScaleSetSkuScaleType scaleType; /** * Get the minimum value. @@ -69,7 +69,7 @@ public Long getDefaultCapacity() { * * @return the scaleType value */ - public String getScaleType() { + public VirtualMachineScaleSetSkuScaleType getScaleType() { return this.scaleType; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuScaleType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuScaleType.java new file mode 100644 index 0000000000000..c996c36f27b43 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/VirtualMachineScaleSetSkuScaleType.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.compute.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for VirtualMachineScaleSetSkuScaleType. + */ +public enum VirtualMachineScaleSetSkuScaleType { + /** Enum value Automatic. */ + AUTOMATIC("Automatic"), + + /** Enum value None. */ + NONE("None"); + + /** The actual serialized value for a VirtualMachineScaleSetSkuScaleType instance. */ + private String value; + + VirtualMachineScaleSetSkuScaleType(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a VirtualMachineScaleSetSkuScaleType instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a VirtualMachineScaleSetSkuScaleType instance. + * + * @param value the serialized value to parse. + * @return the parsed VirtualMachineScaleSetSkuScaleType object, or null if unable to parse. + */ + @JsonCreator + public static VirtualMachineScaleSetSkuScaleType fromValue(String value) { + VirtualMachineScaleSetSkuScaleType[] items = VirtualMachineScaleSetSkuScaleType.values(); + for (VirtualMachineScaleSetSkuScaleType item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/WinRMListener.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/WinRMListener.java index 6e6a7d2e652b5..f4369c5e83927 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/WinRMListener.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/models/WinRMListener.java @@ -15,7 +15,7 @@ public class WinRMListener { * Gets or sets the Protocol used by WinRM listener. Currently only Http * and Https are supported. Possible values include: 'Http', 'Https'. */ - private String protocol; + private ProtocolTypes protocol; /** * Gets or sets the Certificate URL in KMS for Https listeners. Should be @@ -28,7 +28,7 @@ public class WinRMListener { * * @return the protocol value */ - public String getProtocol() { + public ProtocolTypes getProtocol() { return this.protocol; } @@ -37,7 +37,7 @@ public String getProtocol() { * * @param protocol the protocol value to set */ - public void setProtocol(String protocol) { + public void setProtocol(ProtocolTypes protocol) { this.protocol = protocol; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionsOperationsImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionsOperationsImpl.java index 2dcae836f9c67..5cc7b23681f11 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionsOperationsImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewayConnectionsOperationsImpl.java @@ -696,7 +696,7 @@ public ServiceResponse resetSharedKey(String resourceG } final Long keyLength = null; ConnectionResetSharedKey parameters = new ConnectionResetSharedKey(); - parameters.setKeyLength(keyLength); + parameters = null; Response result = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters).execute(); return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } @@ -728,7 +728,7 @@ public ServiceCall resetSharedKeyAsync(String resourceGroupName, String virtualN } final Long keyLength = null; ConnectionResetSharedKey parameters = new ConnectionResetSharedKey(); - parameters.setKeyLength(keyLength); + parameters = null; Call call = service.resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -842,7 +842,7 @@ public ServiceResponse beginResetSharedKey(String reso } final Long keyLength = null; ConnectionResetSharedKey parameters = new ConnectionResetSharedKey(); - parameters.setKeyLength(keyLength); + parameters = null; Call call = service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); return beginResetSharedKeyDelegate(call.execute()); } @@ -878,7 +878,7 @@ public ServiceCall beginResetSharedKeyAsync(String resourceGroupName, String vir } final Long keyLength = null; ConnectionResetSharedKey parameters = new ConnectionResetSharedKey(); - parameters.setKeyLength(keyLength); + parameters = null; Call call = service.beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -1005,7 +1005,7 @@ public ServiceResponse setSharedKey(String resourceGroupNam } final String value = null; ConnectionSharedKey parameters = new ConnectionSharedKey(); - parameters.setValue(value); + parameters = null; Response result = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters).execute(); return client.getAzureClient().getPutOrPatchResult(result, new TypeToken() { }.getType()); } @@ -1037,7 +1037,7 @@ public ServiceCall setSharedKeyAsync(String resourceGroupName, String virtualNet } final String value = null; ConnectionSharedKey parameters = new ConnectionSharedKey(); - parameters.setValue(value); + parameters = null; Call call = service.setSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new Callback() { @@ -1151,7 +1151,7 @@ public ServiceResponse beginSetSharedKey(String resourceGro } final String value = null; ConnectionSharedKey parameters = new ConnectionSharedKey(); - parameters.setValue(value); + parameters = null; Call call = service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); return beginSetSharedKeyDelegate(call.execute()); } @@ -1187,7 +1187,7 @@ public ServiceCall beginSetSharedKeyAsync(String resourceGroupName, String virtu } final String value = null; ConnectionSharedKey parameters = new ConnectionSharedKey(); - parameters.setValue(value); + parameters = null; Call call = service.beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaysOperationsImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaysOperationsImpl.java index 6d6968fb3b17a..8924e966c69ce 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaysOperationsImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/VirtualNetworkGatewaysOperationsImpl.java @@ -775,7 +775,7 @@ public ServiceResponse generatevpnclientpackage(String resourceGroupName } final String processorArchitecture = null; VpnClientParameters parameters = new VpnClientParameters(); - parameters.setProcessorArchitecture(processorArchitecture); + parameters = null; Call call = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); return generatevpnclientpackageDelegate(call.execute()); } @@ -811,7 +811,7 @@ public ServiceCall generatevpnclientpackageAsync(String resourceGroupName, Strin } final String processorArchitecture = null; VpnClientParameters parameters = new VpnClientParameters(); - parameters.setProcessorArchitecture(processorArchitecture); + parameters = null; Call call = service.generatevpnclientpackage(resourceGroupName, virtualNetworkGatewayName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), parameters); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountsOperationsImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountsOperationsImpl.java index 6b893881f69f5..1d70a968d6f1f 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountsOperationsImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccountsOperationsImpl.java @@ -130,7 +130,7 @@ public ServiceResponse checkNameAvailability(String final String type = null; StorageAccountCheckNameAvailabilityParameters accountName = new StorageAccountCheckNameAvailabilityParameters(); accountName.setName(name); - accountName.setType(type); + accountName = null; Call call = service.checkNameAvailability(this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), accountName); return checkNameAvailabilityDelegate(call.execute()); } @@ -162,7 +162,7 @@ public ServiceCall checkNameAvailabilityAsync(String name, final ServiceCallback final String type = null; StorageAccountCheckNameAvailabilityParameters accountName = new StorageAccountCheckNameAvailabilityParameters(); accountName.setName(name); - accountName.setType(type); + accountName = null; Call call = service.checkNameAvailability(this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), accountName); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/GlobalDomainRegistrationOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/GlobalDomainRegistrationOperationsImpl.java index da3038a40040a..313fe6961e022 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/GlobalDomainRegistrationOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/GlobalDomainRegistrationOperationsImpl.java @@ -290,7 +290,7 @@ public ServiceResponse checkDomainAvailability() } final String name = null; NameIdentifier identifier = new NameIdentifier(); - identifier.setName(name); + identifier = null; Call call = service.checkDomainAvailability(this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), identifier); return checkDomainAvailabilityDelegate(call.execute()); } @@ -316,7 +316,7 @@ public ServiceCall checkDomainAvailabilityAsync(final ServiceCallback call = service.checkDomainAvailability(this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), identifier); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperations.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperations.java index b4fb5aa6309d7..c34f110f9fef5 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperations.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperations.java @@ -769,7 +769,7 @@ public interface HostingEnvironmentsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). @@ -780,7 +780,7 @@ public interface HostingEnvironmentsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). @@ -792,7 +792,7 @@ public interface HostingEnvironmentsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the hostingEnvironment (App Service Environment). @@ -803,7 +803,7 @@ public interface HostingEnvironmentsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get all multi role pools. diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperationsImpl.java index 159635d5a69af..b11503263228f 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/HostingEnvironmentsOperationsImpl.java @@ -164,14 +164,14 @@ interface HostingEnvironmentsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites") Call getHostingEnvironmentSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") - Call getHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/webhostingplans") Call getHostingEnvironmentWebHostingPlans(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms") + Call getHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools") Call getMultiRolePools(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -2655,7 +2655,7 @@ private ServiceResponse getHostingEnvironmentSitesDelegate(Respo * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2668,8 +2668,8 @@ public ServiceResponse getHostingEnvironmentServerFarms(St if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getHostingEnvironmentServerFarmsDelegate(call.execute()); + Call call = service.getHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getHostingEnvironmentWebHostingPlansDelegate(call.execute()); } /** @@ -2681,7 +2681,7 @@ public ServiceResponse getHostingEnvironmentServerFarms(St * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2701,13 +2701,13 @@ public ServiceCall getHostingEnvironmentServerFarmsAsync(String resourceGroupNam serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getHostingEnvironmentServerFarmsDelegate(response)); + serviceCallback.success(getHostingEnvironmentWebHostingPlansDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2716,7 +2716,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2733,7 +2733,7 @@ private ServiceResponse getHostingEnvironmentServerFarmsDe * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2746,8 +2746,8 @@ public ServiceResponse getHostingEnvironmentWebHostingPlan if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getHostingEnvironmentWebHostingPlansDelegate(call.execute()); + Call call = service.getHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getHostingEnvironmentServerFarmsDelegate(call.execute()); } /** @@ -2759,7 +2759,7 @@ public ServiceResponse getHostingEnvironmentWebHostingPlan * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2779,13 +2779,13 @@ public ServiceCall getHostingEnvironmentWebHostingPlansAsync(String resourceGrou serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getHostingEnvironmentWebHostingPlansDelegate(response)); + serviceCallback.success(getHostingEnvironmentServerFarmsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2794,7 +2794,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperations.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperations.java index 7fc3accb2bb32..a8c9b783fb82e 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperations.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperations.java @@ -319,7 +319,7 @@ public interface ManagedHostingEnvironmentsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getManagedHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getManagedHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the managed hosting environment. @@ -330,7 +330,7 @@ public interface ManagedHostingEnvironmentsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getManagedHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getManagedHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the managed hosting environment. @@ -342,7 +342,7 @@ public interface ManagedHostingEnvironmentsOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getManagedHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getManagedHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get all serverfarms (App Service Plans) on the managed hosting environment. @@ -353,6 +353,6 @@ public interface ManagedHostingEnvironmentsOperations { * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getManagedHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getManagedHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperationsImpl.java index e07ee18cca575..687b75537c70c 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ManagedHostingEnvironmentsOperationsImpl.java @@ -97,14 +97,14 @@ interface ManagedHostingEnvironmentsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/sites") Call getManagedHostingEnvironmentSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/serverfarms") - Call getManagedHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/webhostingplans") Call getManagedHostingEnvironmentWebHostingPlans(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/managedHostingEnvironments/{name}/serverfarms") + Call getManagedHostingEnvironmentServerFarms(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + } /** @@ -1050,7 +1050,7 @@ private ServiceResponse getManagedHostingEnvironmentSitesDelegat * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getManagedHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getManagedHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1063,8 +1063,8 @@ public ServiceResponse getManagedHostingEnvironmentServerF if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getManagedHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getManagedHostingEnvironmentServerFarmsDelegate(call.execute()); + Call call = service.getManagedHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getManagedHostingEnvironmentWebHostingPlansDelegate(call.execute()); } /** @@ -1076,7 +1076,7 @@ public ServiceResponse getManagedHostingEnvironmentServerF * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getManagedHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getManagedHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1096,13 +1096,13 @@ public ServiceCall getManagedHostingEnvironmentServerFarmsAsync(String resourceG serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getManagedHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getManagedHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getManagedHostingEnvironmentServerFarmsDelegate(response)); + serviceCallback.success(getManagedHostingEnvironmentWebHostingPlansDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1111,7 +1111,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getManagedHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getManagedHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1128,7 +1128,7 @@ private ServiceResponse getManagedHostingEnvironmentServer * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ServerFarmCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getManagedHostingEnvironmentWebHostingPlans(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getManagedHostingEnvironmentServerFarms(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1141,8 +1141,8 @@ public ServiceResponse getManagedHostingEnvironmentWebHost if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getManagedHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getManagedHostingEnvironmentWebHostingPlansDelegate(call.execute()); + Call call = service.getManagedHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getManagedHostingEnvironmentServerFarmsDelegate(call.execute()); } /** @@ -1154,7 +1154,7 @@ public ServiceResponse getManagedHostingEnvironmentWebHost * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getManagedHostingEnvironmentWebHostingPlansAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getManagedHostingEnvironmentServerFarmsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1174,13 +1174,13 @@ public ServiceCall getManagedHostingEnvironmentWebHostingPlansAsync(String resou serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getManagedHostingEnvironmentWebHostingPlans(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getManagedHostingEnvironmentServerFarms(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getManagedHostingEnvironmentWebHostingPlansDelegate(response)); + serviceCallback.success(getManagedHostingEnvironmentServerFarmsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1189,7 +1189,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getManagedHostingEnvironmentWebHostingPlansDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getManagedHostingEnvironmentServerFarmsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperations.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperations.java index 32a7cfd4114d3..4356519745140 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperations.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperations.java @@ -114,12 +114,14 @@ public interface RecommendationsOperations { * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available + * @param siteSku The name of site SKU. + * @param numSlots The number of site slots associated to the site * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<Recommendation> object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse> getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse> getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) throws CloudException, IOException, IllegalArgumentException; /** * Gets a list of recommendations associated with the specified web site. @@ -127,11 +129,13 @@ public interface RecommendationsOperations { * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available + * @param siteSku The name of site SKU. + * @param numSlots The number of site slots associated to the site * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots, final ServiceCallback> serviceCallback) throws IllegalArgumentException; /** * Gets the list of past recommendations optionally specified by the time range. diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperationsImpl.java index 45268550dd022..3129ecbbd6683 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/RecommendationsOperationsImpl.java @@ -63,7 +63,7 @@ interface RecommendationsService { @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations") - Call getRecommendedRulesForSite(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + Call getRecommendedRulesForSite(@Path("resourceGroupName") String resourceGroupName, @Path("siteName") String siteName, @Path("subscriptionId") String subscriptionId, @Query("featured") Boolean featured, @Query("siteSku") String siteSku, @Query("numSlots") Integer numSlots, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory") @@ -303,7 +303,9 @@ public ServiceResponse> getRecommendedRulesForSite(String r throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } final Boolean featured = null; - Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final String siteSku = null; + final Integer numSlots = null; + Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, siteSku, numSlots, this.client.getApiVersion(), this.client.getAcceptLanguage()); return getRecommendedRulesForSiteDelegate(call.execute()); } @@ -337,7 +339,9 @@ public ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, Str return null; } final Boolean featured = null; - Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final String siteSku = null; + final Integer numSlots = null; + Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, siteSku, numSlots, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override @@ -358,12 +362,14 @@ public void onResponse(Call call, Response response) * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available + * @param siteSku The name of site SKU. + * @param numSlots The number of site slots associated to the site * @throws CloudException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @throws IllegalArgumentException exception thrown from invalid parameters * @return the List<Recommendation> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> getRecommendedRulesForSite(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -376,7 +382,7 @@ public ServiceResponse> getRecommendedRulesForSite(String r if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, siteSku, numSlots, this.client.getApiVersion(), this.client.getAcceptLanguage()); return getRecommendedRulesForSiteDelegate(call.execute()); } @@ -386,11 +392,13 @@ public ServiceResponse> getRecommendedRulesForSite(String r * @param resourceGroupName Resource group name * @param siteName Site name * @param featured If set, this API returns only the most critical recommendation among the others. Otherwise this API returns all recommendations available + * @param siteSku The name of site SKU. + * @param numSlots The number of site slots associated to the site * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, String siteName, Boolean featured, String siteSku, Integer numSlots, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -410,7 +418,7 @@ public ServiceCall getRecommendedRulesForSiteAsync(String resourceGroupName, Str serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getRecommendedRulesForSite(resourceGroupName, siteName, this.client.getSubscriptionId(), featured, siteSku, numSlots, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperations.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperations.java index faddcba5eedd9..25d0390172e04 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperations.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperations.java @@ -569,7 +569,7 @@ public interface ServerFarmsOperations { * * @param resourceGroupName Name of resource group * @param name Name of server farm - * @param workerName Name of worker machine, typically IP address + * @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 @@ -582,7 +582,7 @@ public interface ServerFarmsOperations { * * @param resourceGroupName Name of resource group * @param name Name of server farm - * @param workerName Name of worker machine, typically IP address + * @param workerName Name of worker machine, typically starts with RD * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperationsImpl.java index d611a097b9352..41e235df2fe48 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/ServerFarmsOperationsImpl.java @@ -140,7 +140,7 @@ interface ServerFarmsService { Call getServerFarmSites(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$skipToken") String skipToken, @Query("$filter") String filter, @Query("$top") String top, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot") Call rebootWorkerForServerFarm(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("workerName") String workerName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @@ -2014,7 +2014,7 @@ private ServiceResponse> getServerFarmSitesDelegate(Response rebootWorkerForServerFarm(String resourceGroupNam * * @param resourceGroupName Name of resource group * @param name Name of server farm - * @param workerName Name of worker machine, typically IP address + * @param workerName Name of worker machine, typically starts with RD * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperations.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperations.java index 42dcd835d6a9f..b6b9d6df34316 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperations.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperations.java @@ -52,18 +52,67 @@ * in SitesOperations. */ public interface SitesOperations { + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @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<VnetInfo> object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse> getSiteVNETConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @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<VnetInfo> object wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse> getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + + /** + * Retrieves a list of all Virtual Network Connections associated with this web app. + * + * @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. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + /** * Retrieves a specific Virtual Network Connection associated with this web app. * * @param resourceGroupName The resource group name * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a specific Virtual Network Connection associated with this web app. @@ -71,11 +120,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -83,13 +133,14 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -97,12 +148,13 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Removes the specified Virtual Network Connection association from this web app. @@ -110,12 +162,13 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Removes the specified Virtual Network Connection association from this web app. @@ -123,11 +176,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -135,13 +189,14 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -149,12 +204,13 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves a specific Virtual Network Connection associated with this web app. @@ -162,13 +218,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a specific Virtual Network Connection associated with this web app. @@ -176,12 +231,11 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -189,14 +243,13 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -204,13 +257,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Removes the specified Virtual Network Connection association from this web app. @@ -218,13 +270,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException; /** * Removes the specified Virtual Network Connection association from this web app. @@ -232,12 +283,11 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -245,14 +295,13 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Adds a Virtual Network Connection or updates it's properties. @@ -260,13 +309,12 @@ public interface SitesOperations { * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves a view of all network features in use on this web app. @@ -274,12 +322,13 @@ public interface SitesOperations { * @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". + * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteNetworkFeatures(String resourceGroupName, String name, String view) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a view of all network features in use on this web app. @@ -287,11 +336,12 @@ public interface SitesOperations { * @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". + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves a view of all network features in use on this web app. @@ -299,13 +349,12 @@ public interface SitesOperations { * @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". - * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteNetworkFeatures(String resourceGroupName, String name, String view) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a view of all network features in use on this web app. @@ -313,12 +362,11 @@ public interface SitesOperations { * @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". - * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteNetworkFeaturesSlotAsync(String resourceGroupName, String name, String view, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the operation for a web app. @@ -381,9 +429,10 @@ public interface SitesOperations { * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException; /** * Swaps web app slots. @@ -397,6 +446,31 @@ public interface SitesOperations { */ ServiceCall swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + /** + * Swaps web app slots. + * + * @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 wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + + /** + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @param name Name of web app + * @param slotSwapEntity Request body that contains the target slot name + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + /** * Swaps web app slots. * @@ -407,9 +481,10 @@ public interface SitesOperations { * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException; /** * Swaps web app slots. @@ -424,6 +499,33 @@ public interface SitesOperations { */ ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + /** + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @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 wrapped in {@link ServiceResponse} if successful. + */ + ServiceResponse beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + + /** + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @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 + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link ServiceCall} object + */ + ServiceCall beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + /** * Get the difference in configuration settings between two web app slots. * @@ -481,100 +583,100 @@ public interface SitesOperations { * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse applySlotConfigSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; /** * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse applySlotConfigToProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse applySlotConfigSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException; /** * Applies the configuration settings from the target slot onto the current slot. * * @param resourceGroupName Name of resource group * @param name Name of web app + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall applySlotConfigToProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse resetSlotConfigSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse resetProductionSlotConfig(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall resetProductionSlotConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse resetProductionSlotConfig(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse resetSlotConfigSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall resetProductionSlotConfigAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the names of application settings and connection string that remain with the slot during swap operation. @@ -1279,6 +1381,7 @@ public interface SitesOperations { * * @param name Website Name * @param resourceGroupName the String value + * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @throws CloudException exception thrown from REST call @@ -1286,27 +1389,27 @@ public interface SitesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteSnapshotsOnSku(String name, String resourceGroupName, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteSnapshotsOnSkuSlot(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException; /** * Returns Snapshots to the user based on their SKU. * * @param name Website Name * @param resourceGroupName the String value + * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupName, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Returns Snapshots to the user based on their SKU. * * @param name Website Name * @param resourceGroupName the String value - * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @throws CloudException exception thrown from REST call @@ -1314,21 +1417,20 @@ public interface SitesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteSnapshotsOnSkuSlot(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteSnapshotsOnSku(String name, String resourceGroupName, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException; /** * Returns Snapshots to the user based on their SKU. * * @param name Website Name * @param resourceGroupName the String value - * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupName, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Returns all Snapshots to the user. @@ -1436,48 +1538,48 @@ public interface SitesOperations { * * @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 DeploymentCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getDeployments(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getDeploymentsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * List deployments. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getDeploymentsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * List deployments. * * @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 DeploymentCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getDeploymentsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getDeployments(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * List deployments. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getDeploymentsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * List deployments. @@ -1538,12 +1640,13 @@ public interface SitesOperations { * @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. + * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException; /** * Get the deployment. @@ -1552,11 +1655,12 @@ public interface SitesOperations { * @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. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Create a deployment. @@ -1565,13 +1669,14 @@ public interface SitesOperations { * @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. + * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createDeploymentSlot(String resourceGroupName, String name, String id, String slot, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; /** * Create a deployment. @@ -1580,12 +1685,13 @@ public interface SitesOperations { * @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. + * @param instanceId Id of web app instance * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Delete the deployment. @@ -1594,12 +1700,13 @@ public interface SitesOperations { * @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. + * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException; /** * Delete the deployment. @@ -1608,11 +1715,12 @@ public interface SitesOperations { * @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. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get the deployment. @@ -1697,13 +1805,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Get the deployment. @@ -1711,12 +1819,12 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Create a deployment. @@ -1724,14 +1832,14 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createDeploymentSlot(String resourceGroupName, String name, String id, String slot, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; /** * Create a deployment. @@ -1739,13 +1847,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Delete the deployment. @@ -1753,13 +1861,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Delete the deployment. @@ -1767,12 +1875,12 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get the deployment. @@ -1780,14 +1888,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException; /** * Get the deployment. @@ -1795,13 +1902,12 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Create a deployment. @@ -1809,7 +1915,6 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param deployment Details of deployment * @throws CloudException exception thrown from REST call @@ -1817,7 +1922,7 @@ public interface SitesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Deployment object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException; /** * Create a deployment. @@ -1825,14 +1930,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Delete the deployment. @@ -1840,14 +1944,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException; /** * Delete the deployment. @@ -1855,13 +1958,12 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets all instance of a web app. @@ -1916,48 +2018,48 @@ public interface SitesOperations { * * @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 HostNameBindingCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteHostNameBindingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteHostNameBindings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get web app hostname bindings. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get web app hostname bindings. * * @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 HostNameBindingCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteHostNameBindings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteHostNameBindingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Get web app hostname bindings. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get web app binding for a hostname. @@ -2276,200 +2378,200 @@ public interface SitesOperations { * * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Get the source control configuration of web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Delete source control configuration of web app. * * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Delete source control configuration of web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Get the source control configuration of web app. * * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Get the source control configuration of web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Delete source control configuration of web app. * * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse deleteSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Delete source control configuration of web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException; /** * Update the source control configuration of web app. * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the application settings of web app. @@ -3470,48 +3572,48 @@ public interface SitesOperations { * * @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 BackupItemCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse listSiteBackupsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse listSiteBackups(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Lists all available backups for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Lists all available backups for web app. * * @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 BackupItemCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse listSiteBackups(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse listSiteBackupsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Lists all available backups for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets status of a web app backup that may be in progress. @@ -3623,13 +3725,14 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @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 BackupItem object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequest request) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequest request) throws CloudException, IOException, IllegalArgumentException; /** * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. @@ -3637,12 +3740,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. @@ -3650,14 +3754,13 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @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 BackupItem object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequest request) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequest request) throws CloudException, IOException, IllegalArgumentException; /** * Gets status of a web app backup that may be in progress, including secrets associated with the backup, such as the Azure Storage SAS URL. Also can be used to update the SAS URL for the backup if a new URL is passed in the request body. @@ -3665,13 +3768,12 @@ public interface SitesOperations { * @param resourceGroupName Name of resource group * @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. * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Restores a web app. @@ -3734,129 +3836,126 @@ public interface SitesOperations { * * @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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteUsages(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot, String filter) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteUsages(String resourceGroupName, String name, String filter) throws CloudException, IOException, IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteUsages(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteUsages(String resourceGroupName, String name, String filter) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot, String filter) throws CloudException, IOException, IllegalArgumentException; /** * Gets the quota usage numbers for web app. * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metrics for web app. * * @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 ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetrics(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param details If true, metric details are included in response * @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 @@ -3864,49 +3963,51 @@ public interface SitesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetrics(String resourceGroupName, String name, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param details If true, metric details are included in response * @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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metrics for web app. * * @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 ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetrics(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param details If true, metric details are included in response * @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 @@ -3914,68 +4015,69 @@ public interface SitesOperations { * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetrics(String resourceGroupName, String name, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException; /** * Gets metrics for web app. * * @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. * @param details If true, metric details are included in response * @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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metric definitions for web app. * * @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 MetricDefinitionCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetricDefinitions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetricDefinitionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Gets metric definitions for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets metric definitions for web app. * * @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 MetricDefinitionCollection object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteMetricDefinitionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteMetricDefinitions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Gets metric definitions for web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Gets the publishing profile for web app. @@ -4289,45 +4391,45 @@ public interface SitesOperations { * * @param resourceGroupName the String value * @param name the String value - * @param slot 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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse syncSiteRepositorySlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse syncSiteRepository(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * * @param resourceGroupName the String value * @param name the String value - * @param slot the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * * @param resourceGroupName the String value * @param name the String value + * @param slot 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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse syncSiteRepository(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse syncSiteRepositorySlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * * @param resourceGroupName the String value * @param name the String value + * @param slot the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Generates new random app publishing password. @@ -4598,48 +4700,48 @@ public interface SitesOperations { * * @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 RelayServiceConnectionEntity object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse listSiteRelayServiceConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves all Biztalk Hybrid Connections associated with this web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves all Biztalk Hybrid Connections associated with this web app. * * @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 RelayServiceConnectionEntity object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse listSiteRelayServiceConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves all Biztalk Hybrid Connections associated with this web app. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. @@ -4648,13 +4750,12 @@ public interface SitesOperations { * @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" - * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. @@ -4663,12 +4764,11 @@ public interface SitesOperations { * @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" - * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4677,14 +4777,13 @@ public interface SitesOperations { * @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" - * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4693,13 +4792,12 @@ public interface SitesOperations { * @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" - * @param slot The name of the slot for this web app. * @param connectionEnvelope The properties to update this gateway with. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4708,14 +4806,13 @@ public interface SitesOperations { * @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" - * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4724,13 +4821,12 @@ public interface SitesOperations { * @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" - * @param slot The name of the slot for this web app. * @param connectionEnvelope The properties to update this gateway with. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. @@ -4739,12 +4835,13 @@ public interface SitesOperations { * @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" + * @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 wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse getSiteVnetGateway(String resourceGroupName, String name, String vnetName, String gatewayName) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) throws CloudException, IOException, IllegalArgumentException; /** * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. @@ -4753,11 +4850,12 @@ public interface SitesOperations { * @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" + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteVnetGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4766,13 +4864,14 @@ public interface SitesOperations { * @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" + * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse createOrUpdateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4781,12 +4880,13 @@ public interface SitesOperations { * @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" + * @param slot The name of the slot for this web app. * @param connectionEnvelope The properties to update this gateway with. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall createOrUpdateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; + ServiceCall createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4795,13 +4895,14 @@ public interface SitesOperations { * @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" + * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. */ - ServiceResponse updateSiteVNETConnectionGateway(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; + ServiceResponse updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException; /** * Updates the Virtual Network Gateway. @@ -4810,59 +4911,12 @@ public interface SitesOperations { * @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" - * @param connectionEnvelope The properties to update this gateway with. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall updateSiteVNETConnectionGatewayAsync(String resourceGroupName, String name, String vnetName, String gatewayName, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; - - /** - * Retrieves a list of all Virtual Network Connections associated with this web app. - * - * @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<VnetInfo> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> getSiteVNETConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException; - - /** - * Retrieves a list of all Virtual Network Connections associated with this web app. - * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link ServiceCall} object - */ - ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) throws IllegalArgumentException; - - /** - * Retrieves a list of all Virtual Network Connections associated with this web app. - * - * @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<VnetInfo> object wrapped in {@link ServiceResponse} if successful. - */ - ServiceResponse> getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException; - - /** - * Retrieves a list of all Virtual Network Connections associated with this web app. - * - * @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. + * @param connectionEnvelope The properties to update this gateway with. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link ServiceCall} object */ - ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) throws IllegalArgumentException; + ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException; } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperationsImpl.java index 4f4993a384c81..3c1e36fcf03eb 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/SitesOperationsImpl.java @@ -95,20 +95,12 @@ public SitesOperationsImpl(Retrofit retrofit, WebSiteManagementClient client) { */ interface SitesService { @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Call getSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Call createOrUpdateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfo connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) - Call deleteSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") + Call getSiteVNETConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") - Call updateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfo connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") + Call getSiteVNETConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}") @@ -127,13 +119,29 @@ interface SitesService { Call updateSiteVNETConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetInfo connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") - Call getSiteNetworkFeatures(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Call getSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Call createOrUpdateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfo connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}", method = "DELETE", hasBody = true) + Call deleteSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}") + Call updateSiteVNETConnection(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("subscriptionId") String subscriptionId, @Body VnetInfo connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}") Call getSiteNetworkFeaturesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}") + Call getSiteNetworkFeatures(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("view") String view, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/operationresults/{operationId}") Call getSiteOperationSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("operationId") String operationId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -146,10 +154,18 @@ interface SitesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") Call swapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap") + Call beginSwapSlotWithProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") Call swapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap") + Call beginSwapSlotsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs") Call getSlotsDifferencesFromProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -158,22 +174,22 @@ interface SitesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs") Call getSlotsDifferencesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") - Call applySlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig") Call applySlotConfigToProduction(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") - Call resetSlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig") + Call applySlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSlotEntity slotSwapEntity, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig") Call resetProductionSlotConfig(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig") + Call resetSlotConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames") Call getSlotConfigNames(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -238,14 +254,14 @@ interface SitesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover") Call recoverSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body CsmSiteRecoveryEntity snapshot, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restorableSnapshots") - Call getSiteSnapshotsOnSku(@Path("name") String name, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Query("webspaceName") String webspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restorableSnapshots") Call getSiteSnapshotsOnSkuSlot(@Path("name") String name, @Path("resourceGroupName") String resourceGroupName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Query("webspaceName") String webspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restorableSnapshots") + Call getSiteSnapshotsOnSku(@Path("name") String name, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Query("webspaceName") String webspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots") Call getSiteSnapshots(@Path("name") String name, @Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("subscriptionName") String subscriptionName, @Query("webspaceName") String webspaceName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -258,14 +274,14 @@ interface SitesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/deletedSites") Call getDeletedSites(@Path("resourceGroupName") String resourceGroupName, @Path("subscriptionId") String subscriptionId, @Query("propertiesToInclude") String propertiesToInclude, @Query("includeSiteTypes") String includeSiteTypes, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") - Call getDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments") Call getDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments") + Call getDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments") Call getInstanceDeployments(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -275,16 +291,16 @@ interface SitesService { Call getInstanceDeploymentsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") - Call getDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") + Call getInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") - Call createDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") + Call createInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", method = "DELETE", hasBody = true) - Call deleteDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) + Call deleteInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}") @@ -299,28 +315,28 @@ interface SitesService { Call deleteDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") - Call getInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") + Call getDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") - Call createInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}") + Call createDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) - Call deleteInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}", method = "DELETE", hasBody = true) + Call deleteDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") - Call getInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") + Call getInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}") - Call createInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}") + Call createInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Body Deployment deployment, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) - Call deleteInstanceDeploymentSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("slot") String slot, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}", method = "DELETE", hasBody = true) + Call deleteInstanceDeployment(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("id") String id, @Path("instanceId") String instanceId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances") @@ -330,14 +346,14 @@ interface SitesService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances") Call getSiteInstanceIdentifiersSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") - Call getSiteHostNameBindingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings") Call getSiteHostNameBindings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings") + Call getSiteHostNameBindingsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}") Call getSiteHostNameBinding(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("hostName") String hostName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -386,22 +402,6 @@ interface SitesService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web") Call updateSiteConfigSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteConfig siteConfig, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Call getSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Call createOrUpdateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControl siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", method = "DELETE", hasBody = true) - Call deleteSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") - Call updateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControl siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") Call getSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -418,6 +418,22 @@ interface SitesService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web") Call updateSiteSourceControlSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControl siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Call getSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Call createOrUpdateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControl siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web", method = "DELETE", hasBody = true) + Call deleteSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web") + Call updateSiteSourceControl(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Body SiteSourceControl siteSourceControl, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list") Call listSiteAppSettings(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -578,14 +594,14 @@ interface SitesService { @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover") Call discoverSiteRestoreSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") - Call listSiteBackupsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups") Call listSiteBackups(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups") + Call listSiteBackupsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}") Call getSiteBackupStatus(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -602,14 +618,14 @@ interface SitesService { @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}", method = "DELETE", hasBody = true) Call deleteBackupSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") - Call getSiteBackupStatusSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body BackupRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list") Call getSiteBackupStatusSecretsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body BackupRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list") + Call getSiteBackupStatusSecrets(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body BackupRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore") Call restoreSite(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("subscriptionId") String subscriptionId, @Body RestoreRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -618,30 +634,30 @@ interface SitesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore") Call restoreSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("backupId") String backupId, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RestoreRequest request, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") - Call getSiteUsagesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages") Call getSiteUsages(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") - Call getSiteMetricsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages") + Call getSiteUsagesSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics") Call getSiteMetrics(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") - Call getSiteMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics") + Call getSiteMetricsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("details") Boolean details, @Query("$filter") String filter, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions") Call getSiteMetricDefinitionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions") + Call getSiteMetricDefinitions(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml") @Streaming @@ -676,14 +692,14 @@ interface SitesService { @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop") Call stopSiteSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") - Call syncSiteRepositorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync") Call syncSiteRepository(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") + @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync") + Call syncSiteRepositorySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @Headers("Content-Type: application/json; charset=utf-8") @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword") Call generateNewSitePublishingPasswordSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @@ -724,25 +740,13 @@ interface SitesService { @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}") Call updateSiteRelayServiceConnectionSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("entityName") String entityName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body RelayServiceConnectionEntity connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") - Call listSiteRelayServiceConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection") Call listSiteRelayServiceConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Call getSiteVnetGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Call createOrUpdateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGateway connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); - - @Headers("Content-Type: application/json; charset=utf-8") - @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") - Call updateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGateway connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection") + Call listSiteRelayServiceConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") @@ -757,57 +761,56 @@ interface SitesService { Call updateSiteVNETConnectionGateway(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("subscriptionId") String subscriptionId, @Body VnetGateway connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections") - Call getSiteVNETConnections(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + Call getSiteVnetGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); @Headers("Content-Type: application/json; charset=utf-8") - @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections") - Call getSiteVNETConnectionsSlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + Call createOrUpdateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGateway connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); + + @Headers("Content-Type: application/json; charset=utf-8") + @PATCH("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}") + Call updateSiteVNETConnectionGatewaySlot(@Path("resourceGroupName") String resourceGroupName, @Path("name") String name, @Path("vnetName") String vnetName, @Path("gatewayName") String gatewayName, @Path("slot") String slot, @Path("subscriptionId") String subscriptionId, @Body VnetGateway connectionEnvelope, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. * * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. + * @return the List<VnetInfo> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> getSiteVNETConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteVNETConnectionDelegate(call.execute()); + Call call = service.getSiteVNETConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteVNETConnectionsDelegate(call.execute()); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Retrieves a list of all Virtual Network Connections associated with this web app. * * @param resourceGroupName The resource group name * @param name The name of the web app - * @param vnetName The name of the Virtual Network * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -819,10 +822,6 @@ public ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String n serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (vnetName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -831,13 +830,13 @@ public ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String n serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteVNETConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteVNETConnectionDelegate(response)); + serviceCallback.success(getSiteVNETConnectionsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -846,61 +845,55 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getSiteVNETConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Retrieves a list of all Virtual Network Connections associated with this web app. * * @param resourceGroupName The resource group name * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection + * @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 VnetInfo object wrapped in {@link ServiceResponse} if successful. + * @return the List<VnetInfo> object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse createOrUpdateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse> getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Validator.validate(connectionEnvelope); - Call call = service.createOrUpdateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createOrUpdateSiteVNETConnectionDelegate(call.execute()); + Call call = service.getSiteVNETConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteVNETConnectionsSlotDelegate(call.execute()); } /** - * Adds a Virtual Network Connection or updates it's properties. + * Retrieves a list of all Virtual Network Connections associated with this web app. * * @param resourceGroupName The resource group name * @param name The name of the web app - * @param vnetName The name of the Virtual Network - * @param connectionEnvelope The properties of this Virtual Network Connection + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -912,30 +905,25 @@ public ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupNam serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (vnetName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; } - if (connectionEnvelope == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); - return null; - } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.createOrUpdateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteVNETConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback>(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createOrUpdateSiteVNETConnectionDelegate(response)); + serviceCallback.success(getSiteVNETConnectionsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -944,25 +932,26 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createOrUpdateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse> getSiteVNETConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) + .register(200, new TypeToken>() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. * * @param resourceGroupName The resource group name * @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 wrapped in {@link ServiceResponse} if successful. + * @return the VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -972,27 +961,31 @@ public ServiceResponse deleteSiteVNETConnection(String resourceGroupName if (vnetName == null) { throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteSiteVNETConnectionDelegate(call.execute()); + Call call = service.getSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteVNETConnectionSlotDelegate(call.execute()); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. * * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1008,6 +1001,10 @@ public ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -1016,13 +1013,13 @@ public ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteSiteVNETConnectionDelegate(response)); + serviceCallback.success(getSiteVNETConnectionSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1031,9 +1028,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1044,13 +1041,14 @@ private ServiceResponse deleteSiteVNETConnectionDelegate(Response updateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1060,6 +1058,9 @@ public ServiceResponse updateSiteVNETConnection(String resourceGroupNa if (vnetName == null) { throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -1070,8 +1071,8 @@ public ServiceResponse updateSiteVNETConnection(String resourceGroupNa throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(connectionEnvelope); - Call call = service.updateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSiteVNETConnectionDelegate(call.execute()); + Call call = service.createOrUpdateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createOrUpdateSiteVNETConnectionSlotDelegate(call.execute()); } /** @@ -1080,12 +1081,13 @@ public ServiceResponse updateSiteVNETConnection(String resourceGroupNa * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1101,6 +1103,10 @@ public ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -1114,13 +1120,13 @@ public ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, Strin return null; } Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.updateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createOrUpdateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSiteVNETConnectionDelegate(response)); + serviceCallback.success(createOrUpdateSiteVNETConnectionSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1129,7 +1135,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createOrUpdateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1137,7 +1143,7 @@ private ServiceResponse updateSiteVNETConnectionDelegate(Response updateSiteVNETConnectionDelegate(Response getSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1167,12 +1173,12 @@ public ServiceResponse getSiteVNETConnectionSlot(String resourceGroupN if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteVNETConnectionSlotDelegate(call.execute()); + Call call = service.deleteSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteSiteVNETConnectionSlotDelegate(call.execute()); } /** - * Retrieves a specific Virtual Network Connection associated with this web app. + * Removes the specified Virtual Network Connection association from this web app. * * @param resourceGroupName The resource group name * @param name The name of the web app @@ -1182,7 +1188,7 @@ public ServiceResponse getSiteVNETConnectionSlot(String resourceGroupN * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1210,13 +1216,13 @@ public ServiceCall getSiteVNETConnectionSlotAsync(String resourceGroupName, Stri serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteVNETConnectionSlotDelegate(response)); + serviceCallback.success(deleteSiteVNETConnectionSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1225,9 +1231,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1245,7 +1251,7 @@ private ServiceResponse getSiteVNETConnectionSlotDelegate(Response createOrUpdateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse updateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1268,8 +1274,8 @@ public ServiceResponse createOrUpdateSiteVNETConnectionSlot(String res throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(connectionEnvelope); - Call call = service.createOrUpdateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createOrUpdateSiteVNETConnectionSlotDelegate(call.execute()); + Call call = service.updateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSiteVNETConnectionSlotDelegate(call.execute()); } /** @@ -1284,7 +1290,7 @@ public ServiceResponse createOrUpdateSiteVNETConnectionSlot(String res * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1317,13 +1323,13 @@ public ServiceCall createOrUpdateSiteVNETConnectionSlotAsync(String resourceGrou return null; } Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.createOrUpdateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.updateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createOrUpdateSiteVNETConnectionSlotDelegate(response)); + serviceCallback.success(updateSiteVNETConnectionSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1332,7 +1338,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createOrUpdateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse updateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1340,18 +1346,17 @@ private ServiceResponse createOrUpdateSiteVNETConnectionSlotDelegate(R } /** - * Removes the specified Virtual Network Connection association from this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. * * @param resourceGroupName The resource group name * @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 wrapped in {@link ServiceResponse} if successful. + * @return the VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse deleteSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1361,31 +1366,27 @@ public ServiceResponse deleteSiteVNETConnectionSlot(String resourceGroup if (vnetName == null) { throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteSiteVNETConnectionSlotDelegate(call.execute()); + Call call = service.getSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteVNETConnectionDelegate(call.execute()); } /** - * Removes the specified Virtual Network Connection association from this web app. + * Retrieves a specific Virtual Network Connection associated with this web app. * * @param resourceGroupName The resource group name * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1401,10 +1402,6 @@ public ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -1413,13 +1410,13 @@ public ServiceCall deleteSiteVNETConnectionSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteSiteVNETConnectionSlotDelegate(response)); + serviceCallback.success(getSiteVNETConnectionDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1428,9 +1425,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -1441,14 +1438,13 @@ private ServiceResponse deleteSiteVNETConnectionSlotDelegate(Response updateSiteVNETConnectionSlot(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createOrUpdateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1458,9 +1454,6 @@ public ServiceResponse updateSiteVNETConnectionSlot(String resourceGro if (vnetName == null) { throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -1471,8 +1464,8 @@ public ServiceResponse updateSiteVNETConnectionSlot(String resourceGro throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(connectionEnvelope); - Call call = service.updateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSiteVNETConnectionSlotDelegate(call.execute()); + Call call = service.createOrUpdateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createOrUpdateSiteVNETConnectionDelegate(call.execute()); } /** @@ -1481,13 +1474,12 @@ public ServiceResponse updateSiteVNETConnectionSlot(String resourceGro * @param resourceGroupName The resource group name * @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. * @param connectionEnvelope The properties of this Virtual Network Connection * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, String name, String vnetName, String slot, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createOrUpdateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1503,10 +1495,6 @@ public ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -1520,13 +1508,13 @@ public ServiceCall updateSiteVNETConnectionSlotAsync(String resourceGroupName, S return null; } Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.updateSiteVNETConnectionSlot(resourceGroupName, name, vnetName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createOrUpdateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSiteVNETConnectionSlotDelegate(response)); + serviceCallback.success(createOrUpdateSiteVNETConnectionDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1535,7 +1523,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSiteVNETConnectionSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createOrUpdateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -1543,25 +1531,25 @@ private ServiceResponse updateSiteVNETConnectionSlotDelegate(Response< } /** - * Retrieves a view of all network features in use on this web app. + * Removes the specified Virtual Network Connection association from this web app. * * @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". + * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. + * @return the Object object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteNetworkFeatures(String resourceGroupName, String name, String view) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteSiteVNETConnection(String resourceGroupName, String name, String vnetName) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (view == null) { - throw new IllegalArgumentException("Parameter view is required and cannot be null."); + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); @@ -1569,21 +1557,21 @@ public ServiceResponse getSiteNetworkFeatures(String resourceGr if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteNetworkFeatures(resourceGroupName, name, view, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteNetworkFeaturesDelegate(call.execute()); + Call call = service.deleteSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteSiteVNETConnectionDelegate(call.execute()); } /** - * Retrieves a view of all network features in use on this web app. + * Removes the specified Virtual Network Connection association from this web app. * * @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". + * @param vnetName The name of the Virtual Network * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -1595,8 +1583,8 @@ public ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (view == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter view is required and cannot be null.")); + if (vnetName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); return null; } if (this.client.getSubscriptionId() == null) { @@ -1607,13 +1595,13 @@ public ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteNetworkFeatures(resourceGroupName, name, view, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteNetworkFeaturesDelegate(response)); + serviceCallback.success(deleteSiteVNETConnectionDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -1622,44 +1610,141 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) + private ServiceResponse deleteSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves a view of all network features in use on this web app. + * Adds a Virtual Network Connection or updates it's properties. * * @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". - * @param slot The name of the slot for this web app. + * @param vnetName The name of the Virtual Network + * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. + * @return the VnetInfo object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse updateSiteVNETConnection(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (view == null) { - throw new IllegalArgumentException("Parameter view is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } - if (this.client.getApiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + Call call = service.updateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSiteVNETConnectionDelegate(call.execute()); + } + + /** + * Adds a Virtual Network Connection or updates it's properties. + * + * @param resourceGroupName The resource group name + * @param name The name of the web app + * @param vnetName The name of the Virtual Network + * @param connectionEnvelope The properties of this Virtual Network Connection + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall updateSiteVNETConnectionAsync(String resourceGroupName, String name, String vnetName, VnetInfo connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (resourceGroupName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return null; + } + if (name == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); + return null; + } + if (vnetName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + return null; + } + if (this.client.getSubscriptionId() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return null; + } + if (connectionEnvelope == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + return null; + } + if (this.client.getApiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); + return null; + } + Validator.validate(connectionEnvelope, serviceCallback); + Call call = service.updateSiteVNETConnection(resourceGroupName, name, vnetName, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + serviceCallback.success(updateSiteVNETConnectionDelegate(response)); + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse updateSiteVNETConnectionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Retrieves a view of all network features in use on this web app. + * + * @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". + * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse getSiteNetworkFeaturesSlot(String resourceGroupName, String name, String view, String slot) throws CloudException, IOException, IllegalArgumentException { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (view == null) { + throw new IllegalArgumentException("Parameter view is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Call call = service.getSiteNetworkFeaturesSlot(resourceGroupName, name, view, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); return getSiteNetworkFeaturesSlotDelegate(call.execute()); @@ -1727,6 +1812,94 @@ private ServiceResponse getSiteNetworkFeaturesSlotDelegate(Resp .build(response); } + /** + * Retrieves a view of all network features in use on this web app. + * + * @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 NetworkFeatures object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse getSiteNetworkFeatures(String resourceGroupName, String name, String view) throws CloudException, IOException, IllegalArgumentException { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (view == null) { + throw new IllegalArgumentException("Parameter view is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + } + Call call = service.getSiteNetworkFeatures(resourceGroupName, name, view, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteNetworkFeaturesDelegate(call.execute()); + } + + /** + * Retrieves a view of all network features in use on this web app. + * + * @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". + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall getSiteNetworkFeaturesAsync(String resourceGroupName, String name, String view, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (resourceGroupName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return null; + } + if (name == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); + return null; + } + if (view == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter view is required and cannot be null.")); + return null; + } + if (this.client.getSubscriptionId() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return null; + } + if (this.client.getApiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); + return null; + } + Call call = service.getSiteNetworkFeatures(resourceGroupName, name, view, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + serviceCallback.success(getSiteNetworkFeaturesDelegate(response)); + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse getSiteNetworkFeaturesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Gets the operation for a web app. * @@ -1919,9 +2092,10 @@ private ServiceResponse getSiteOperationDelegate(Response * @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 wrapped in {@link ServiceResponse} if successful. + * @throws InterruptedException exception thrown when long running operation is interrupted + * @return the Object object wrapped in ServiceResponse if successful. */ - public ServiceResponse swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse swapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -1938,8 +2112,8 @@ public ServiceResponse swapSlotWithProduction(String resourceGroupName, throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(slotSwapEntity); - Call call = service.swapSlotWithProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return swapSlotWithProductionDelegate(call.execute()); + Response result = service.swapSlotWithProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()).execute(); + return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } /** @@ -1950,7 +2124,7 @@ public ServiceResponse swapSlotWithProduction(String resourceGroupName, * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object + * @return the {@link ServiceCall} object */ public ServiceCall swapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { @@ -1958,70 +2132,53 @@ public ServiceCall swapSlotWithProductionAsync(String resourceGroupName, String } if (resourceGroupName == null) { serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - return null; } if (name == null) { serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); - return null; } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); - return null; } if (slotSwapEntity == null) { serviceCallback.failure(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - return null; } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); - return null; } Validator.validate(slotSwapEntity, serviceCallback); Call call = service.swapSlotWithProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, Throwable t) { + serviceCallback.failure(t); + } @Override public void onResponse(Call call, Response response) { - try { - serviceCallback.success(swapSlotWithProductionDelegate(response)); - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } + client.getAzureClient().getPostOrDeleteResultAsync(response, new TypeToken() { }.getType(), serviceCall, serviceCallback); } }); return serviceCall; } - private ServiceResponse swapSlotWithProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(202, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - /** * Swaps web app slots. * * @param resourceGroupName Name of resource group * @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 wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse beginSwapSlotWithProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -2032,8 +2189,8 @@ public ServiceResponse swapSlotsSlot(String resourceGroupName, String na throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(slotSwapEntity); - Call call = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return swapSlotsSlotDelegate(call.execute()); + Call call = service.beginSwapSlotWithProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return beginSwapSlotWithProductionDelegate(call.execute()); } /** @@ -2041,13 +2198,12 @@ public ServiceResponse swapSlotsSlot(String resourceGroupName, String na * * @param resourceGroupName Name of resource group * @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 * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall beginSwapSlotWithProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2059,10 +2215,6 @@ public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, Str serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -2076,13 +2228,13 @@ public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, Str return null; } Validator.validate(slotSwapEntity, serviceCallback); - Call call = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.beginSwapSlotWithProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(swapSlotsSlotDelegate(response)); + serviceCallback.success(beginSwapSlotWithProductionDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2091,7 +2243,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse swapSlotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse beginSwapSlotWithProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .register(202, new TypeToken() { }.getType()) @@ -2100,23 +2252,28 @@ private ServiceResponse swapSlotsSlotDelegate(Response res } /** - * Get the difference in configuration settings between two web app slots. + * Swaps web app slots. * * @param resourceGroupName Name of resource group * @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 SlotDifferenceCollection object wrapped in {@link ServiceResponse} if successful. + * @throws InterruptedException exception thrown when long running operation is interrupted + * @return the Object object wrapped in ServiceResponse if successful. */ - public ServiceResponse getSlotsDifferencesFromProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse swapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException, InterruptedException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -2127,52 +2284,142 @@ public ServiceResponse getSlotsDifferencesFromProducti throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(slotSwapEntity); - Call call = service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSlotsDifferencesFromProductionDelegate(call.execute()); + Response result = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()).execute(); + return client.getAzureClient().getPostOrDeleteResult(result, new TypeToken() { }.getType()); } /** - * Get the difference in configuration settings between two web app slots. + * Swaps web app slots. * * @param resourceGroupName Name of resource group * @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 * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object + * @return the {@link ServiceCall} object */ - public ServiceCall getSlotsDifferencesFromProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall swapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } if (resourceGroupName == null) { serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - return null; } if (name == null) { serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); - return null; + } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); - return null; } if (slotSwapEntity == null) { serviceCallback.failure(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); - return null; } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); - return null; } Validator.validate(slotSwapEntity, serviceCallback); - Call call = service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.swapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new Callback() { + @Override + public void onFailure(Call call, Throwable t) { + serviceCallback.failure(t); + } + @Override + public void onResponse(Call call, Response response) { + client.getAzureClient().getPostOrDeleteResultAsync(response, new TypeToken() { }.getType(), serviceCall, serviceCallback); + } + }); + return serviceCall; + } + + /** + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @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 wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse beginSwapSlotsSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + } + Validator.validate(slotSwapEntity); + Call call = service.beginSwapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return beginSwapSlotsSlotDelegate(call.execute()); + } + + /** + * Swaps web app slots. + * + * @param resourceGroupName Name of resource group + * @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 + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall beginSwapSlotsSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (resourceGroupName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return null; + } + if (name == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); + return null; + } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } + if (this.client.getSubscriptionId() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return null; + } + if (slotSwapEntity == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + return null; + } + if (this.client.getApiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); + return null; + } + Validator.validate(slotSwapEntity, serviceCallback); + Call call = service.beginSwapSlotsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSlotsDifferencesFromProductionDelegate(response)); + serviceCallback.success(beginSwapSlotsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2181,9 +2428,10 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSlotsDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse beginSwapSlotsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(202, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -2193,23 +2441,19 @@ private ServiceResponse getSlotsDifferencesFromProduct * * @param resourceGroupName Name of resource group * @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 SlotDifferenceCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSlotsDifferencesSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSlotsDifferencesFromProduction(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -2220,8 +2464,8 @@ public ServiceResponse getSlotsDifferencesSlot(String throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(slotSwapEntity); - Call call = service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSlotsDifferencesSlotDelegate(call.execute()); + Call call = service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSlotsDifferencesFromProductionDelegate(call.execute()); } /** @@ -2229,13 +2473,12 @@ public ServiceResponse getSlotsDifferencesSlot(String * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSlotsDifferencesSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSlotsDifferencesFromProductionAsync(String resourceGroupName, String name, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2247,10 +2490,6 @@ public ServiceCall getSlotsDifferencesSlotAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -2264,13 +2503,13 @@ public ServiceCall getSlotsDifferencesSlotAsync(String resourceGroupName, String return null; } Validator.validate(slotSwapEntity, serviceCallback); - Call call = service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSlotsDifferencesFromProduction(resourceGroupName, name, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSlotsDifferencesSlotDelegate(response)); + serviceCallback.success(getSlotsDifferencesFromProductionDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2279,7 +2518,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSlotsDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSlotsDifferencesFromProductionDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2287,18 +2526,18 @@ private ServiceResponse getSlotsDifferencesSlotDelegat } /** - * Applies the configuration settings from the target slot onto the current slot. + * Get the difference in configuration settings between two web app slots. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @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 Object object wrapped in {@link ServiceResponse} if successful. + * @return the SlotDifferenceCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse applySlotConfigSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSlotsDifferencesSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2318,22 +2557,22 @@ public ServiceResponse applySlotConfigSlot(String resourceGroupName, Str throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(slotSwapEntity); - Call call = service.applySlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return applySlotConfigSlotDelegate(call.execute()); + Call call = service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSlotsDifferencesSlotDelegate(call.execute()); } /** - * Applies the configuration settings from the target slot onto the current slot. + * Get the difference in configuration settings between two web app slots. * * @param resourceGroupName Name of resource group * @param name Name of web app - * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot - * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot + * @param slot Name of the source slot + * @param slotSwapEntity Request body that contains the target slot name * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSlotsDifferencesSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2362,13 +2601,13 @@ public ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String nam return null; } Validator.validate(slotSwapEntity, serviceCallback); - Call call = service.applySlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSlotsDifferencesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(applySlotConfigSlotDelegate(response)); + serviceCallback.success(getSlotsDifferencesSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2377,9 +2616,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse applySlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse getSlotsDifferencesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -2474,17 +2713,18 @@ private ServiceResponse applySlotConfigToProductionDelegate(Response resetSlotConfigSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse applySlotConfigSlot(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2497,24 +2737,29 @@ public ServiceResponse resetSlotConfigSlot(String resourceGroupName, Str if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } + if (slotSwapEntity == null) { + throw new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null."); + } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.resetSlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return resetSlotConfigSlotDelegate(call.execute()); + Validator.validate(slotSwapEntity); + Call call = service.applySlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return applySlotConfigSlotDelegate(call.execute()); } /** - * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. + * Applies the configuration settings from the target slot onto the current slot. * * @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. + * @param slot Name of the source slot. Settings from the target slot will be applied onto this slot + * @param slotSwapEntity Request body that contains the target slot name. Settings from that slot will be applied on the source slot * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall applySlotConfigSlotAsync(String resourceGroupName, String name, String slot, CsmSlotEntity slotSwapEntity, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2534,17 +2779,22 @@ public ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String nam serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; } + if (slotSwapEntity == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slotSwapEntity is required and cannot be null.")); + return null; + } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.resetSlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Validator.validate(slotSwapEntity, serviceCallback); + Call call = service.applySlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), slotSwapEntity, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(resetSlotConfigSlotDelegate(response)); + serviceCallback.success(applySlotConfigSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2553,7 +2803,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse resetSlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse applySlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2639,42 +2889,47 @@ private ServiceResponse resetProductionSlotConfigDelegate(Response getSlotConfigNames(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse resetSlotConfigSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSlotConfigNamesDelegate(call.execute()); + Call call = service.resetSlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return resetSlotConfigSlotDelegate(call.execute()); } /** - * Gets the names of application settings and connection string that remain with the slot during swap operation. + * Resets the configuration settings of the current slot if they were previously modified by calling ApplySlotConfig API. * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSlotConfigNamesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall resetSlotConfigSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2686,6 +2941,10 @@ public ServiceCall getSlotConfigNamesAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -2694,13 +2953,13 @@ public ServiceCall getSlotConfigNamesAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.resetSlotConfigSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSlotConfigNamesDelegate(response)); + serviceCallback.success(resetSlotConfigSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2709,25 +2968,24 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse resetSlotConfigSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * * @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 SlotConfigNamesResource object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse updateSlotConfigNames(String resourceGroupName, String name, SlotConfigNamesResource slotConfigNames) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSlotConfigNames(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -2737,28 +2995,23 @@ public ServiceResponse updateSlotConfigNames(String res if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } - if (slotConfigNames == null) { - throw new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null."); - } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Validator.validate(slotConfigNames); - Call call = service.updateSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), slotConfigNames, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSlotConfigNamesDelegate(call.execute()); + Call call = service.getSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSlotConfigNamesDelegate(call.execute()); } /** - * Updates the names of application settings and connection string that remain with the slot during swap operation. + * Gets the names of application settings and connection string that remain with the slot during swap operation. * * @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 * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSlotConfigNamesAsync(String resourceGroupName, String name, SlotConfigNamesResource slotConfigNames, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSlotConfigNamesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -2774,22 +3027,17 @@ public ServiceCall updateSlotConfigNamesAsync(String resourceGroupName, String n serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; } - if (slotConfigNames == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null.")); - return null; - } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Validator.validate(slotConfigNames, serviceCallback); - Call call = service.updateSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), slotConfigNames, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSlotConfigNamesDelegate(response)); + serviceCallback.success(getSlotConfigNamesDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -2798,7 +3046,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -2806,16 +3054,105 @@ private ServiceResponse updateSlotConfigNamesDelegate(R } /** - * Gets all the slots for a web apps. + * Updates the names of application settings and connection string that remain with the slot during swap operation. * * @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 SiteCollection object wrapped in {@link ServiceResponse} if successful. + * @return the SlotConfigNamesResource object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteSlots(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse updateSlotConfigNames(String resourceGroupName, String name, SlotConfigNamesResource slotConfigNames) throws CloudException, IOException, IllegalArgumentException { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + } + if (slotConfigNames == null) { + throw new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + } + Validator.validate(slotConfigNames); + Call call = service.updateSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), slotConfigNames, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSlotConfigNamesDelegate(call.execute()); + } + + /** + * Updates the names of application settings and connection string that remain with the slot during swap operation. + * + * @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 + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall updateSlotConfigNamesAsync(String resourceGroupName, String name, SlotConfigNamesResource slotConfigNames, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (resourceGroupName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return null; + } + if (name == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); + return null; + } + if (this.client.getSubscriptionId() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return null; + } + if (slotConfigNames == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slotConfigNames is required and cannot be null.")); + return null; + } + if (this.client.getApiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); + return null; + } + Validator.validate(slotConfigNames, serviceCallback); + Call call = service.updateSlotConfigNames(resourceGroupName, name, this.client.getSubscriptionId(), slotConfigNames, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + serviceCallback.success(updateSlotConfigNamesDelegate(response)); + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse updateSlotConfigNamesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Gets all the slots for a web apps. + * + * @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 SiteCollection object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse getSiteSlots(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -4890,6 +5227,7 @@ private ServiceResponse recoverSiteSlotDelegate(Response r * * @param name Website Name * @param resourceGroupName the String value + * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @throws CloudException exception thrown from REST call @@ -4897,13 +5235,16 @@ private ServiceResponse recoverSiteSlotDelegate(Response r * @throws IllegalArgumentException exception thrown from invalid parameters * @return the Object object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteSnapshotsOnSku(String name, String resourceGroupName, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteSnapshotsOnSkuSlot(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -4916,8 +5257,8 @@ public ServiceResponse getSiteSnapshotsOnSku(String name, String resourc if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteSnapshotsOnSku(name, resourceGroupName, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteSnapshotsOnSkuDelegate(call.execute()); + Call call = service.getSiteSnapshotsOnSkuSlot(name, resourceGroupName, slot, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteSnapshotsOnSkuSlotDelegate(call.execute()); } /** @@ -4925,13 +5266,14 @@ public ServiceResponse getSiteSnapshotsOnSku(String name, String resourc * * @param name Website Name * @param resourceGroupName the String value + * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupName, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -4943,6 +5285,10 @@ public ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupN serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -4959,13 +5305,13 @@ public ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupN serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteSnapshotsOnSku(name, resourceGroupName, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteSnapshotsOnSkuSlot(name, resourceGroupName, slot, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteSnapshotsOnSkuDelegate(response)); + serviceCallback.success(getSiteSnapshotsOnSkuSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -4974,7 +5320,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteSnapshotsOnSkuDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteSnapshotsOnSkuSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -4986,7 +5332,6 @@ private ServiceResponse getSiteSnapshotsOnSkuDelegate(Response getSiteSnapshotsOnSkuDelegate(Response getSiteSnapshotsOnSkuSlot(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteSnapshotsOnSku(String name, String resourceGroupName, String subscriptionName, String webspaceName) throws CloudException, IOException, IllegalArgumentException { if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -5016,8 +5358,8 @@ public ServiceResponse getSiteSnapshotsOnSkuSlot(String name, String res if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteSnapshotsOnSkuSlot(name, resourceGroupName, slot, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteSnapshotsOnSkuSlotDelegate(call.execute()); + Call call = service.getSiteSnapshotsOnSku(name, resourceGroupName, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteSnapshotsOnSkuDelegate(call.execute()); } /** @@ -5025,14 +5367,13 @@ public ServiceResponse getSiteSnapshotsOnSkuSlot(String name, String res * * @param name Website Name * @param resourceGroupName the String value - * @param slot the String value * @param subscriptionName Azure subscription * @param webspaceName Webspace * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGroupName, String slot, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteSnapshotsOnSkuAsync(String name, String resourceGroupName, String subscriptionName, String webspaceName, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -5044,10 +5385,6 @@ public ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGr serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -5064,13 +5401,13 @@ public ServiceCall getSiteSnapshotsOnSkuSlotAsync(String name, String resourceGr serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteSnapshotsOnSkuSlot(name, resourceGroupName, slot, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteSnapshotsOnSku(name, resourceGroupName, this.client.getSubscriptionId(), subscriptionName, webspaceName, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteSnapshotsOnSkuSlotDelegate(response)); + serviceCallback.success(getSiteSnapshotsOnSkuDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -5079,7 +5416,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteSnapshotsOnSkuSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteSnapshotsOnSkuDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5431,26 +5768,30 @@ private ServiceResponse getDeletedSitesDelegate(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 DeploymentCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getDeployments(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getDeploymentsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getDeployments(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getDeploymentsDelegate(call.execute()); + Call call = service.getDeploymentsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getDeploymentsSlotDelegate(call.execute()); } /** @@ -5458,11 +5799,12 @@ public ServiceResponse getDeployments(String resourceGroup * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getDeploymentsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -5474,6 +5816,10 @@ public ServiceCall getDeploymentsAsync(String resourceGroupName, String name, fi serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -5482,13 +5828,13 @@ public ServiceCall getDeploymentsAsync(String resourceGroupName, String name, fi serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getDeployments(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getDeploymentsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getDeploymentsDelegate(response)); + serviceCallback.success(getDeploymentsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -5497,7 +5843,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5509,30 +5855,26 @@ private ServiceResponse getDeploymentsDelegate(Response getDeploymentsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getDeployments(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getDeploymentsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getDeploymentsSlotDelegate(call.execute()); + Call call = service.getDeployments(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getDeploymentsDelegate(call.execute()); } /** @@ -5540,12 +5882,11 @@ public ServiceResponse getDeploymentsSlot(String resourceG * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getDeploymentsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -5557,10 +5898,6 @@ public ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -5569,13 +5906,13 @@ public ServiceCall getDeploymentsSlotAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getDeploymentsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getDeployments(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getDeploymentsSlotDelegate(response)); + serviceCallback.success(getDeploymentsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -5584,7 +5921,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getDeploymentsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getDeploymentsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5781,12 +6118,13 @@ private ServiceResponse getInstanceDeploymentsSlotDelegate * @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. + * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -5799,14 +6137,17 @@ public ServiceResponse getDeploymentSlot(String resourceGroupName, S if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getDeploymentSlotDelegate(call.execute()); + Call call = service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getInstanceDeploymentSlotDelegate(call.execute()); } /** @@ -5816,11 +6157,12 @@ public ServiceResponse getDeploymentSlot(String resourceGroupName, S * @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. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -5840,6 +6182,10 @@ public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } + if (instanceId == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -5848,13 +6194,13 @@ public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getDeploymentSlotDelegate(response)); + serviceCallback.success(getInstanceDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -5863,7 +6209,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5877,13 +6223,14 @@ private ServiceResponse getDeploymentSlotDelegate(Response createDeploymentSlot(String resourceGroupName, String name, String id, String slot, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -5896,6 +6243,9 @@ public ServiceResponse createDeploymentSlot(String resourceGroupName if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -5906,8 +6256,8 @@ public ServiceResponse createDeploymentSlot(String resourceGroupName throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(deployment); - Call call = service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createDeploymentSlotDelegate(call.execute()); + Call call = service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createInstanceDeploymentSlotDelegate(call.execute()); } /** @@ -5917,12 +6267,13 @@ public ServiceResponse createDeploymentSlot(String resourceGroupName * @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. + * @param instanceId Id of web app instance * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -5942,6 +6293,10 @@ public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String na serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } + if (instanceId == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -5955,13 +6310,13 @@ public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String na return null; } Validator.validate(deployment, serviceCallback); - Call call = service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createDeploymentSlotDelegate(response)); + serviceCallback.success(createInstanceDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -5970,7 +6325,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -5984,12 +6339,13 @@ private ServiceResponse createDeploymentSlotDelegate(Response deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6002,14 +6358,17 @@ public ServiceResponse deleteDeploymentSlot(String resourceGroupName, St if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } + if (instanceId == null) { + throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteDeploymentSlotDelegate(call.execute()); + Call call = service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteInstanceDeploymentSlotDelegate(call.execute()); } /** @@ -6019,11 +6378,12 @@ public ServiceResponse deleteDeploymentSlot(String resourceGroupName, St * @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. + * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6043,6 +6403,10 @@ public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String na serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } + if (instanceId == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -6051,13 +6415,13 @@ public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String na serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteDeploymentSlotDelegate(response)); + serviceCallback.success(deleteInstanceDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6066,7 +6430,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6351,13 +6715,13 @@ private ServiceResponse deleteDeploymentDelegate(Response * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @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 Deployment object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6367,8 +6731,8 @@ public ServiceResponse getInstanceDeployment(String resourceGroupNam if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); @@ -6376,8 +6740,8 @@ public ServiceResponse getInstanceDeployment(String resourceGroupNam if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getInstanceDeploymentDelegate(call.execute()); + Call call = service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getDeploymentSlotDelegate(call.execute()); } /** @@ -6386,12 +6750,12 @@ public ServiceResponse getInstanceDeployment(String resourceGroupNam * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6407,8 +6771,8 @@ public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String n serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (instanceId == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } if (this.client.getSubscriptionId() == null) { @@ -6419,13 +6783,13 @@ public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String n serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getInstanceDeploymentDelegate(response)); + serviceCallback.success(getDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6434,7 +6798,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6447,14 +6811,14 @@ private ServiceResponse getInstanceDeploymentDelegate(Response createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createDeploymentSlot(String resourceGroupName, String name, String id, String slot, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6464,8 +6828,8 @@ public ServiceResponse createInstanceDeployment(String resourceGroup if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); @@ -6477,8 +6841,8 @@ public ServiceResponse createInstanceDeployment(String resourceGroup throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(deployment); - Call call = service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createInstanceDeploymentDelegate(call.execute()); + Call call = service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createDeploymentSlotDelegate(call.execute()); } /** @@ -6487,13 +6851,13 @@ public ServiceResponse createInstanceDeployment(String resourceGroup * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6509,8 +6873,8 @@ public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (instanceId == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } if (this.client.getSubscriptionId() == null) { @@ -6526,13 +6890,13 @@ public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, Strin return null; } Validator.validate(deployment, serviceCallback); - Call call = service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createInstanceDeploymentDelegate(response)); + serviceCallback.success(createDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6541,7 +6905,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6554,13 +6918,13 @@ private ServiceResponse createInstanceDeploymentDelegate(Response deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteDeploymentSlot(String resourceGroupName, String name, String id, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6570,8 +6934,8 @@ public ServiceResponse deleteInstanceDeployment(String resourceGroupName if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (instanceId == null) { - throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); @@ -6579,8 +6943,8 @@ public ServiceResponse deleteInstanceDeployment(String resourceGroupName if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteInstanceDeploymentDelegate(call.execute()); + Call call = service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteDeploymentSlotDelegate(call.execute()); } /** @@ -6589,12 +6953,12 @@ public ServiceResponse deleteInstanceDeployment(String resourceGroupName * @param resourceGroupName Name of resource group * @param name Name of web app * @param id Id of the deployment - * @param instanceId Id of web app instance + * @param slot Name of web app slot. If not specified then will default to production slot. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6610,8 +6974,8 @@ public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (instanceId == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; } if (this.client.getSubscriptionId() == null) { @@ -6622,13 +6986,13 @@ public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteDeploymentSlot(resourceGroupName, name, id, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteInstanceDeploymentDelegate(response)); + serviceCallback.success(deleteDeploymentSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6637,7 +7001,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6650,14 +7014,13 @@ private ServiceResponse deleteInstanceDeploymentDelegate(Response getInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6667,9 +7030,6 @@ public ServiceResponse getInstanceDeploymentSlot(String resourceGrou if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (instanceId == null) { throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } @@ -6679,8 +7039,8 @@ public ServiceResponse getInstanceDeploymentSlot(String resourceGrou if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getInstanceDeploymentSlotDelegate(call.execute()); + Call call = service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getInstanceDeploymentDelegate(call.execute()); } /** @@ -6689,13 +7049,12 @@ public ServiceResponse getInstanceDeploymentSlot(String resourceGrou * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6711,10 +7070,6 @@ public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, Stri serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (instanceId == null) { serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); return null; @@ -6727,13 +7082,13 @@ public ServiceCall getInstanceDeploymentSlotAsync(String resourceGroupName, Stri serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getInstanceDeploymentSlotDelegate(response)); + serviceCallback.success(getInstanceDeploymentDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6742,7 +7097,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6755,7 +7110,6 @@ private ServiceResponse getInstanceDeploymentSlotDelegate(Response getInstanceDeploymentSlotDelegate(Response createInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createInstanceDeployment(String resourceGroupName, String name, String id, String instanceId, Deployment deployment) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6773,9 +7127,6 @@ public ServiceResponse createInstanceDeploymentSlot(String resourceG if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (instanceId == null) { throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } @@ -6789,8 +7140,8 @@ public ServiceResponse createInstanceDeploymentSlot(String resourceG throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(deployment); - Call call = service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createInstanceDeploymentSlotDelegate(call.execute()); + Call call = service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createInstanceDeploymentDelegate(call.execute()); } /** @@ -6799,14 +7150,13 @@ public ServiceResponse createInstanceDeploymentSlot(String resourceG * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param deployment Details of deployment * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, Deployment deployment, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6822,10 +7172,6 @@ public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (instanceId == null) { serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); return null; @@ -6843,13 +7189,13 @@ public ServiceCall createInstanceDeploymentSlotAsync(String resourceGroupName, S return null; } Validator.validate(deployment, serviceCallback); - Call call = service.createInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), deployment, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createInstanceDeploymentSlotDelegate(response)); + serviceCallback.success(createInstanceDeploymentDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6858,7 +7204,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -6871,14 +7217,13 @@ private ServiceResponse createInstanceDeploymentSlotDelegate(Respons * @param resourceGroupName Name of resource group * @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. * @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 wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse deleteInstanceDeploymentSlot(String resourceGroupName, String name, String id, String slot, String instanceId) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteInstanceDeployment(String resourceGroupName, String name, String id, String instanceId) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -6888,9 +7233,6 @@ public ServiceResponse deleteInstanceDeploymentSlot(String resourceGroup if (id == null) { throw new IllegalArgumentException("Parameter id is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (instanceId == null) { throw new IllegalArgumentException("Parameter instanceId is required and cannot be null."); } @@ -6900,8 +7242,8 @@ public ServiceResponse deleteInstanceDeploymentSlot(String resourceGroup if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteInstanceDeploymentSlotDelegate(call.execute()); + Call call = service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteInstanceDeploymentDelegate(call.execute()); } /** @@ -6910,13 +7252,12 @@ public ServiceResponse deleteInstanceDeploymentSlot(String resourceGroup * @param resourceGroupName Name of resource group * @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. * @param instanceId Id of web app instance * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, String name, String id, String slot, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteInstanceDeploymentAsync(String resourceGroupName, String name, String id, String instanceId, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -6932,10 +7273,6 @@ public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter id is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (instanceId == null) { serviceCallback.failure(new IllegalArgumentException("Parameter instanceId is required and cannot be null.")); return null; @@ -6948,13 +7285,13 @@ public ServiceCall deleteInstanceDeploymentSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteInstanceDeploymentSlot(resourceGroupName, name, id, slot, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteInstanceDeployment(resourceGroupName, name, id, instanceId, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteInstanceDeploymentSlotDelegate(response)); + serviceCallback.success(deleteInstanceDeploymentDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -6963,7 +7300,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteInstanceDeploymentSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteInstanceDeploymentDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -7140,30 +7477,26 @@ private ServiceResponse getSiteInstanceIdentifiersSlotDe * * @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 HostNameBindingCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteHostNameBindingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteHostNameBindings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteHostNameBindingsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteHostNameBindingsSlotDelegate(call.execute()); + Call call = service.getSiteHostNameBindings(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteHostNameBindingsDelegate(call.execute()); } /** @@ -7171,12 +7504,11 @@ public ServiceResponse getSiteHostNameBindingsSlot(St * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -7188,10 +7520,6 @@ public ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, St serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -7200,13 +7528,13 @@ public ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, St serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteHostNameBindingsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteHostNameBindings(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteHostNameBindingsSlotDelegate(response)); + serviceCallback.success(getSiteHostNameBindingsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -7215,7 +7543,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -7227,26 +7555,30 @@ private ServiceResponse getSiteHostNameBindingsSlotDe * * @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 HostNameBindingCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteHostNameBindings(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteHostNameBindingsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteHostNameBindings(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteHostNameBindingsDelegate(call.execute()); + Call call = service.getSiteHostNameBindingsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteHostNameBindingsSlotDelegate(call.execute()); } /** @@ -7254,11 +7586,12 @@ public ServiceResponse getSiteHostNameBindings(String * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteHostNameBindingsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -7270,6 +7603,10 @@ public ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -7278,13 +7615,13 @@ public ServiceCall getSiteHostNameBindingsAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteHostNameBindings(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteHostNameBindingsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteHostNameBindingsDelegate(response)); + serviceCallback.success(getSiteHostNameBindingsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -7293,7 +7630,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteHostNameBindingsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteHostNameBindingsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8415,26 +8752,30 @@ private ServiceResponse updateSiteConfigSlotDelegate(Response getSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteSourceControlDelegate(call.execute()); + Call call = service.getSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteSourceControlSlotDelegate(call.execute()); } /** @@ -8442,11 +8783,12 @@ public ServiceResponse getSiteSourceControl(String resourceGr * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8458,6 +8800,10 @@ public ServiceCall getSiteSourceControlAsync(String resourceGroupName, String na serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8466,13 +8812,13 @@ public ServiceCall getSiteSourceControlAsync(String resourceGroupName, String na serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteSourceControlDelegate(response)); + serviceCallback.success(getSiteSourceControlSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8481,7 +8827,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8493,19 +8839,23 @@ private ServiceResponse getSiteSourceControlDelegate(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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -8516,8 +8866,8 @@ public ServiceResponse createOrUpdateSiteSourceControl(String throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(siteSourceControl); - Call call = service.createOrUpdateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createOrUpdateSiteSourceControlDelegate(call.execute()); + Call call = service.createOrUpdateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createOrUpdateSiteSourceControlSlotDelegate(call.execute()); } /** @@ -8525,12 +8875,13 @@ public ServiceResponse createOrUpdateSiteSourceControl(String * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8542,6 +8893,10 @@ public ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8555,13 +8910,13 @@ public ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName return null; } Validator.validate(siteSourceControl, serviceCallback); - Call call = service.createOrUpdateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createOrUpdateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createOrUpdateSiteSourceControlDelegate(response)); + serviceCallback.success(createOrUpdateSiteSourceControlSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8570,7 +8925,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createOrUpdateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createOrUpdateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8582,26 +8937,30 @@ private ServiceResponse createOrUpdateSiteSourceControlDelega * * @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 wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse deleteSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteSiteSourceControlDelegate(call.execute()); + Call call = service.deleteSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteSiteSourceControlSlotDelegate(call.execute()); } /** @@ -8609,11 +8968,12 @@ public ServiceResponse deleteSiteSourceControl(String resourceGroupName, * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8625,6 +8985,10 @@ public ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8633,13 +8997,13 @@ public ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteSiteSourceControlDelegate(response)); + serviceCallback.success(deleteSiteSourceControlSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8648,7 +9012,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8660,19 +9024,23 @@ private ServiceResponse deleteSiteSourceControlDelegate(Response updateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse updateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -8683,8 +9051,8 @@ public ServiceResponse updateSiteSourceControl(String resourc throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(siteSourceControl); - Call call = service.updateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSiteSourceControlDelegate(call.execute()); + Call call = service.updateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSiteSourceControlSlotDelegate(call.execute()); } /** @@ -8692,12 +9060,13 @@ public ServiceResponse updateSiteSourceControl(String resourc * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8709,6 +9078,10 @@ public ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8722,13 +9095,13 @@ public ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String return null; } Validator.validate(siteSourceControl, serviceCallback); - Call call = service.updateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.updateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSiteSourceControlDelegate(response)); + serviceCallback.success(updateSiteSourceControlSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8737,7 +9110,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse updateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8749,30 +9122,26 @@ private ServiceResponse updateSiteSourceControlDelegate(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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteSourceControlSlotDelegate(call.execute()); + Call call = service.getSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteSourceControlDelegate(call.execute()); } /** @@ -8780,12 +9149,11 @@ public ServiceResponse getSiteSourceControlSlot(String resour * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8797,10 +9165,6 @@ public ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8809,13 +9173,13 @@ public ServiceCall getSiteSourceControlSlotAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteSourceControlSlotDelegate(response)); + serviceCallback.success(getSiteSourceControlDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8824,7 +9188,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8836,23 +9200,19 @@ private ServiceResponse getSiteSourceControlSlotDelegate(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. * @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 SiteSourceControl object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse createOrUpdateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createOrUpdateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -8863,8 +9223,8 @@ public ServiceResponse createOrUpdateSiteSourceControlSlot(St throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(siteSourceControl); - Call call = service.createOrUpdateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createOrUpdateSiteSourceControlSlotDelegate(call.execute()); + Call call = service.createOrUpdateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createOrUpdateSiteSourceControlDelegate(call.execute()); } /** @@ -8872,13 +9232,12 @@ public ServiceResponse createOrUpdateSiteSourceControlSlot(St * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall createOrUpdateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8890,10 +9249,6 @@ public ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroup serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8907,13 +9262,13 @@ public ServiceCall createOrUpdateSiteSourceControlSlotAsync(String resourceGroup return null; } Validator.validate(siteSourceControl, serviceCallback); - Call call = service.createOrUpdateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.createOrUpdateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(createOrUpdateSiteSourceControlSlotDelegate(response)); + serviceCallback.success(createOrUpdateSiteSourceControlDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -8922,7 +9277,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse createOrUpdateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse createOrUpdateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -8934,30 +9289,26 @@ private ServiceResponse createOrUpdateSiteSourceControlSlotDe * * @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 wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse deleteSiteSourceControlSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse deleteSiteSourceControl(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.deleteSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return deleteSiteSourceControlSlotDelegate(call.execute()); + Call call = service.deleteSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return deleteSiteSourceControlDelegate(call.execute()); } /** @@ -8965,12 +9316,11 @@ public ServiceResponse deleteSiteSourceControlSlot(String resourceGroupN * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall deleteSiteSourceControlAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -8982,10 +9332,6 @@ public ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, St serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -8994,13 +9340,13 @@ public ServiceCall deleteSiteSourceControlSlotAsync(String resourceGroupName, St serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.deleteSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.deleteSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(deleteSiteSourceControlSlotDelegate(response)); + serviceCallback.success(deleteSiteSourceControlDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -9009,7 +9355,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse deleteSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse deleteSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -9021,23 +9367,19 @@ private ServiceResponse deleteSiteSourceControlSlotDelegate(Response updateSiteSourceControlSlot(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse updateSiteSourceControl(String resourceGroupName, String name, SiteSourceControl siteSourceControl) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -9048,8 +9390,8 @@ public ServiceResponse updateSiteSourceControlSlot(String res throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(siteSourceControl); - Call call = service.updateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSiteSourceControlSlotDelegate(call.execute()); + Call call = service.updateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSiteSourceControlDelegate(call.execute()); } /** @@ -9057,13 +9399,12 @@ public ServiceResponse updateSiteSourceControlSlot(String res * * @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. * @param siteSourceControl Request body that contains the source control parameters * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, String name, String slot, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall updateSiteSourceControlAsync(String resourceGroupName, String name, SiteSourceControl siteSourceControl, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -9075,10 +9416,6 @@ public ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, St serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -9092,13 +9429,13 @@ public ServiceCall updateSiteSourceControlSlotAsync(String resourceGroupName, St return null; } Validator.validate(siteSourceControl, serviceCallback); - Call call = service.updateSiteSourceControlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.updateSiteSourceControl(resourceGroupName, name, this.client.getSubscriptionId(), siteSourceControl, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSiteSourceControlSlotDelegate(response)); + serviceCallback.success(updateSiteSourceControlDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -9107,7 +9444,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSiteSourceControlSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse updateSiteSourceControlDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -12634,30 +12971,26 @@ private ServiceResponse discoverSiteRestoreSlotDelegate(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 BackupItemCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse listSiteBackupsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse listSiteBackups(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return listSiteBackupsSlotDelegate(call.execute()); + Call call = service.listSiteBackups(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return listSiteBackupsDelegate(call.execute()); } /** @@ -12665,12 +12998,11 @@ public ServiceResponse listSiteBackupsSlot(String resource * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -12682,10 +13014,6 @@ public ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String nam serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -12694,13 +13022,13 @@ public ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String nam serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.listSiteBackups(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(listSiteBackupsSlotDelegate(response)); + serviceCallback.success(listSiteBackupsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -12709,7 +13037,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse listSiteBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listSiteBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -12721,26 +13049,30 @@ private ServiceResponse listSiteBackupsSlotDelegate(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 BackupItemCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse listSiteBackups(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse listSiteBackupsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.listSiteBackups(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return listSiteBackupsDelegate(call.execute()); + Call call = service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return listSiteBackupsSlotDelegate(call.execute()); } /** @@ -12748,11 +13080,12 @@ public ServiceResponse listSiteBackups(String resourceGrou * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listSiteBackupsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -12764,6 +13097,10 @@ public ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, f serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -12772,13 +13109,13 @@ public ServiceCall listSiteBackupsAsync(String resourceGroupName, String name, f serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.listSiteBackups(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.listSiteBackupsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(listSiteBackupsDelegate(response)); + serviceCallback.success(listSiteBackupsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -12787,7 +13124,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse listSiteBackupsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listSiteBackupsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -13166,13 +13503,14 @@ private ServiceResponse deleteBackupSlotDelegate(Response getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequest request) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequest request) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -13182,6 +13520,9 @@ public ServiceResponse getSiteBackupStatusSecrets(String resourceGro if (backupId == null) { throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -13192,8 +13533,8 @@ public ServiceResponse getSiteBackupStatusSecrets(String resourceGro throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(request); - Call call = service.getSiteBackupStatusSecrets(resourceGroupName, name, backupId, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteBackupStatusSecretsDelegate(call.execute()); + Call call = service.getSiteBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteBackupStatusSecretsSlotDelegate(call.execute()); } /** @@ -13202,12 +13543,13 @@ public ServiceResponse getSiteBackupStatusSecrets(String resourceGro * @param resourceGroupName Name of resource group * @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. * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13223,6 +13565,10 @@ public ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, Str serviceCallback.failure(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13236,13 +13582,13 @@ public ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, Str return null; } Validator.validate(request, serviceCallback); - Call call = service.getSiteBackupStatusSecrets(resourceGroupName, name, backupId, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteBackupStatusSecretsDelegate(response)); + serviceCallback.success(getSiteBackupStatusSecretsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13251,7 +13597,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -13264,14 +13610,13 @@ private ServiceResponse getSiteBackupStatusSecretsDelegate(Response< * @param resourceGroupName Name of resource group * @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. * @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 BackupItem object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteBackupStatusSecretsSlot(String resourceGroupName, String name, String backupId, String slot, BackupRequest request) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteBackupStatusSecrets(String resourceGroupName, String name, String backupId, BackupRequest request) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } @@ -13281,9 +13626,6 @@ public ServiceResponse getSiteBackupStatusSecretsSlot(String resourc if (backupId == null) { throw new IllegalArgumentException("Parameter backupId is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -13294,8 +13636,8 @@ public ServiceResponse getSiteBackupStatusSecretsSlot(String resourc throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } Validator.validate(request); - Call call = service.getSiteBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteBackupStatusSecretsSlotDelegate(call.execute()); + Call call = service.getSiteBackupStatusSecrets(resourceGroupName, name, backupId, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteBackupStatusSecretsDelegate(call.execute()); } /** @@ -13304,13 +13646,12 @@ public ServiceResponse getSiteBackupStatusSecretsSlot(String resourc * @param resourceGroupName Name of resource group * @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. * @param request Information on backup request * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, String name, String backupId, String slot, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteBackupStatusSecretsAsync(String resourceGroupName, String name, String backupId, BackupRequest request, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13326,10 +13667,6 @@ public ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, serviceCallback.failure(new IllegalArgumentException("Parameter backupId is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13343,13 +13680,13 @@ public ServiceCall getSiteBackupStatusSecretsSlotAsync(String resourceGroupName, return null; } Validator.validate(request, serviceCallback); - Call call = service.getSiteBackupStatusSecretsSlot(resourceGroupName, name, backupId, slot, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteBackupStatusSecrets(resourceGroupName, name, backupId, this.client.getSubscriptionId(), request, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteBackupStatusSecretsSlotDelegate(response)); + serviceCallback.success(getSiteBackupStatusSecretsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13358,7 +13695,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteBackupStatusSecretsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteBackupStatusSecretsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -13575,22 +13912,18 @@ private ServiceResponse restoreSiteSlotDelegate(Response getSiteUsagesSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteUsages(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -13598,8 +13931,8 @@ public ServiceResponse getSiteUsagesSlot(String resourc throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } final String filter = null; - Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteUsagesSlotDelegate(call.execute()); + Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteUsagesDelegate(call.execute()); } /** @@ -13607,12 +13940,11 @@ public ServiceResponse getSiteUsagesSlot(String resourc * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13624,10 +13956,6 @@ public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13637,13 +13965,13 @@ public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, return null; } final String filter = null; - Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteUsagesSlotDelegate(response)); + serviceCallback.success(getSiteUsagesDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13657,31 +13985,27 @@ public void onResponse(Call call, 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. * @param filter Return only usages specified in the filter. Filter is specified by using 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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot, String filter) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteUsages(String resourceGroupName, String name, String filter) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteUsagesSlotDelegate(call.execute()); + Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteUsagesDelegate(call.execute()); } /** @@ -13689,13 +14013,12 @@ public ServiceResponse getSiteUsagesSlot(String resourc * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13707,10 +14030,6 @@ public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13719,13 +14038,13 @@ public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteUsagesSlotDelegate(response)); + serviceCallback.success(getSiteUsagesDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13734,7 +14053,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -13746,27 +14065,31 @@ private ServiceResponse getSiteUsagesSlotDelegate(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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteUsages(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (this.client.getSubscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } final String filter = null; - Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteUsagesDelegate(call.execute()); + Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteUsagesSlotDelegate(call.execute()); } /** @@ -13774,11 +14097,12 @@ public ServiceResponse getSiteUsages(String resourceGro * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13790,6 +14114,10 @@ public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, fin serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13799,13 +14127,13 @@ public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, fin return null; } final String filter = null; - Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteUsagesDelegate(response)); + serviceCallback.success(getSiteUsagesSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13819,27 +14147,31 @@ public void onResponse(Call call, 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. * @param filter Return only usages specified in the filter. Filter is specified by using 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 CsmUsageQuotaCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteUsages(String resourceGroupName, String name, String filter) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteUsagesSlot(String resourceGroupName, String name, String slot, String filter) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteUsagesDelegate(call.execute()); + Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteUsagesSlotDelegate(call.execute()); } /** @@ -13847,12 +14179,13 @@ public ServiceResponse getSiteUsages(String resourceGro * * @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. * @param filter Return only usages specified in the filter. Filter is specified by using 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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteUsagesSlotAsync(String resourceGroupName, String name, String slot, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13864,6 +14197,10 @@ public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, Str serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13872,13 +14209,13 @@ public ServiceCall getSiteUsagesAsync(String resourceGroupName, String name, Str serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteUsages(resourceGroupName, name, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteUsagesSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteUsagesDelegate(response)); + serviceCallback.success(getSiteUsagesSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13887,7 +14224,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteUsagesDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteUsagesSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -13899,22 +14236,18 @@ private ServiceResponse getSiteUsagesDelegate(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 ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetrics(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -13923,8 +14256,8 @@ public ServiceResponse getSiteMetricsSlot(String resou } final Boolean details = null; final String filter = null; - Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricsSlotDelegate(call.execute()); + Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricsDelegate(call.execute()); } /** @@ -13932,12 +14265,11 @@ public ServiceResponse getSiteMetricsSlot(String resou * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -13949,10 +14281,6 @@ public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -13963,13 +14291,13 @@ public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name } final Boolean details = null; final String filter = null; - Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricsSlotDelegate(response)); + serviceCallback.success(getSiteMetricsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -13983,7 +14311,6 @@ public void onResponse(Call call, 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. * @param details If true, metric details are included in response * @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 @@ -13991,24 +14318,21 @@ public void onResponse(Call call, Response response) * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetrics(String resourceGroupName, String name, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricsSlotDelegate(call.execute()); + Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricsDelegate(call.execute()); } /** @@ -14016,14 +14340,13 @@ public ServiceResponse getSiteMetricsSlot(String resou * * @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. * @param details If true, metric details are included in response * @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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -14035,10 +14358,6 @@ public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -14047,13 +14366,13 @@ public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricsSlotDelegate(response)); + serviceCallback.success(getSiteMetricsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -14062,7 +14381,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -14074,18 +14393,22 @@ private ServiceResponse getSiteMetricsSlotDelegate(Res * * @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 ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetrics(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } @@ -14094,8 +14417,8 @@ public ServiceResponse getSiteMetrics(String resourceG } final Boolean details = null; final String filter = null; - Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricsDelegate(call.execute()); + Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricsSlotDelegate(call.execute()); } /** @@ -14103,11 +14426,12 @@ public ServiceResponse getSiteMetrics(String resourceG * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -14119,6 +14443,10 @@ public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, fi serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -14129,13 +14457,13 @@ public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, fi } final Boolean details = null; final String filter = null; - Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricsDelegate(response)); + serviceCallback.success(getSiteMetricsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -14149,6 +14477,7 @@ public void onResponse(Call call, 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. * @param details If true, metric details are included in response * @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 @@ -14156,21 +14485,24 @@ public void onResponse(Call call, Response response) * @throws IllegalArgumentException exception thrown from invalid parameters * @return the ResourceMetricCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetrics(String resourceGroupName, String name, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetricsSlot(String resourceGroupName, String name, String slot, Boolean details, String filter) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricsDelegate(call.execute()); + Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricsSlotDelegate(call.execute()); } /** @@ -14178,13 +14510,14 @@ public ServiceResponse getSiteMetrics(String resourceG * * @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. * @param details If true, metric details are included in response * @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]'. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricsSlotAsync(String resourceGroupName, String name, String slot, Boolean details, String filter, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -14196,6 +14529,10 @@ public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Bo serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -14204,13 +14541,13 @@ public ServiceCall getSiteMetricsAsync(String resourceGroupName, String name, Bo serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteMetrics(resourceGroupName, name, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetricsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), details, filter, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricsDelegate(response)); + serviceCallback.success(getSiteMetricsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -14219,7 +14556,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteMetricsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteMetricsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -14231,26 +14568,30 @@ private ServiceResponse getSiteMetricsDelegate(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 MetricDefinitionCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetricDefinitions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetricDefinitionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteMetricDefinitions(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricDefinitionsDelegate(call.execute()); + Call call = service.getSiteMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricDefinitionsSlotDelegate(call.execute()); } /** @@ -14258,11 +14599,12 @@ public ServiceResponse getSiteMetricDefinitions(Stri * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -14274,6 +14616,10 @@ public ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -14282,13 +14628,13 @@ public ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, Strin serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteMetricDefinitions(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricDefinitionsDelegate(response)); + serviceCallback.success(getSiteMetricDefinitionsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -14297,7 +14643,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -14309,30 +14655,26 @@ private ServiceResponse getSiteMetricDefinitionsDele * * @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 MetricDefinitionCollection object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse getSiteMetricDefinitionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteMetricDefinitions(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteMetricDefinitionsSlotDelegate(call.execute()); + Call call = service.getSiteMetricDefinitions(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteMetricDefinitionsDelegate(call.execute()); } /** @@ -14340,12 +14682,11 @@ public ServiceResponse getSiteMetricDefinitionsSlot( * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteMetricDefinitionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -14357,10 +14698,6 @@ public ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -14369,13 +14706,13 @@ public ServiceCall getSiteMetricDefinitionsSlotAsync(String resourceGroupName, S serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteMetricDefinitionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteMetricDefinitions(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteMetricDefinitionsSlotDelegate(response)); + serviceCallback.success(getSiteMetricDefinitionsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -14384,7 +14721,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse getSiteMetricDefinitionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse getSiteMetricDefinitionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -14416,7 +14753,7 @@ public ServiceResponse listSitePublishingProfileXml(String resource } final String format = null; CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.setFormat(format); + options = null; Call call = service.listSitePublishingProfileXml(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), options); return listSitePublishingProfileXmlDelegate(call.execute()); } @@ -14452,7 +14789,7 @@ public ServiceCall listSitePublishingProfileXmlAsync(String resourceGroupName, S } final String format = null; CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.setFormat(format); + options = null; Call call = service.listSitePublishingProfileXml(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), options); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -14587,7 +14924,7 @@ public ServiceResponse listSitePublishingProfileXmlSlot(String reso } final String format = null; CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.setFormat(format); + options = null; Call call = service.listSitePublishingProfileXmlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), options); return listSitePublishingProfileXmlSlotDelegate(call.execute()); } @@ -14628,7 +14965,7 @@ public ServiceCall listSitePublishingProfileXmlSlotAsync(String resourceGroupNam } final String format = null; CsmPublishingProfileOptions options = new CsmPublishingProfileOptions(); - options.setFormat(format); + options = null; Call call = service.listSitePublishingProfileXmlSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), options); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @@ -15409,42 +15746,37 @@ private ServiceResponse stopSiteSlotDelegate(Response resp * * @param resourceGroupName the String value * @param name the String value - * @param slot 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 wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse syncSiteRepositorySlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse syncSiteRepository(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.syncSiteRepositorySlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return syncSiteRepositorySlotDelegate(call.execute()); + Call call = service.syncSiteRepository(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return syncSiteRepositoryDelegate(call.execute()); } /** * * @param resourceGroupName the String value * @param name the String value - * @param slot the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -15456,10 +15788,6 @@ public ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -15468,13 +15796,13 @@ public ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.syncSiteRepositorySlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.syncSiteRepository(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(syncSiteRepositorySlotDelegate(response)); + serviceCallback.success(syncSiteRepositoryDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -15483,7 +15811,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse syncSiteRepositorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse syncSiteRepositoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -15494,37 +15822,42 @@ private ServiceResponse syncSiteRepositorySlotDelegate(Response syncSiteRepository(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse syncSiteRepositorySlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.syncSiteRepository(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return syncSiteRepositoryDelegate(call.execute()); + Call call = service.syncSiteRepositorySlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return syncSiteRepositorySlotDelegate(call.execute()); } /** * * @param resourceGroupName the String value * @param name the String value + * @param slot the String value * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall syncSiteRepositorySlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -15536,6 +15869,10 @@ public ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -15544,13 +15881,13 @@ public ServiceCall syncSiteRepositoryAsync(String resourceGroupName, String name serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.syncSiteRepository(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.syncSiteRepositorySlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(syncSiteRepositoryDelegate(response)); + serviceCallback.success(syncSiteRepositorySlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -15559,7 +15896,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse syncSiteRepositoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse syncSiteRepositorySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -16512,30 +16849,26 @@ private ServiceResponse updateSiteRelayServiceConn * * @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 RelayServiceConnectionEntity object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse listSiteRelayServiceConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.listSiteRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return listSiteRelayServiceConnectionsSlotDelegate(call.execute()); + Call call = service.listSiteRelayServiceConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return listSiteRelayServiceConnectionsDelegate(call.execute()); } /** @@ -16543,12 +16876,11 @@ public ServiceResponse listSiteRelayServiceConnect * * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -16560,10 +16892,6 @@ public ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroup serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -16572,13 +16900,13 @@ public ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroup serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.listSiteRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.listSiteRelayServiceConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(listSiteRelayServiceConnectionsSlotDelegate(response)); + serviceCallback.success(listSiteRelayServiceConnectionsDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -16587,7 +16915,7 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse listSiteRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + private ServiceResponse listSiteRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) @@ -16599,359 +16927,43 @@ private ServiceResponse listSiteRelayServiceConnec * * @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 RelayServiceConnectionEntity object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse listSiteRelayServiceConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse listSiteRelayServiceConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.listSiteRelayServiceConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return listSiteRelayServiceConnectionsDelegate(call.execute()); + Call call = service.listSiteRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return listSiteRelayServiceConnectionsSlotDelegate(call.execute()); } /** * Retrieves all Biztalk Hybrid Connections associated with this web app. - * - * @param resourceGroupName The resource group name - * @param name The name of the web app - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall listSiteRelayServiceConnectionsAsync(String resourceGroupName, String name, final ServiceCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (resourceGroupName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - return null; - } - if (name == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); - return null; - } - if (this.client.getSubscriptionId() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); - return null; - } - if (this.client.getApiVersion() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); - return null; - } - Call call = service.listSiteRelayServiceConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - serviceCallback.success(listSiteRelayServiceConnectionsDelegate(response)); - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse listSiteRelayServiceConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. - * - * @param resourceGroupName The resource group name - * @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" - * @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 wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) throws CloudException, IOException, IllegalArgumentException { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.getSubscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); - } - if (this.client.getApiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); - } - Call call = service.getSiteVnetGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteVnetGatewaySlotDelegate(call.execute()); - } - - /** - * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. - * - * @param resourceGroupName The resource group name - * @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" - * @param slot The name of the slot for this web app. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (resourceGroupName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - return null; - } - if (name == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); - return null; - } - if (vnetName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); - return null; - } - if (gatewayName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); - return null; - } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } - if (this.client.getSubscriptionId() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); - return null; - } - if (this.client.getApiVersion() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); - return null; - } - Call call = service.getSiteVnetGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - serviceCallback.success(getSiteVnetGatewaySlotDelegate(response)); - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse getSiteVnetGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .register(404, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the Virtual Network Gateway. - * - * @param resourceGroupName The resource group name - * @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" - * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.getSubscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); - } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.getApiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - Call call = service.createOrUpdateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return createOrUpdateSiteVNETConnectionGatewaySlotDelegate(call.execute()); - } - - /** - * Updates the Virtual Network Gateway. - * - * @param resourceGroupName The resource group name - * @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" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. - * @param serviceCallback the async ServiceCallback to handle successful and failed responses. - * @throws IllegalArgumentException thrown if callback is null - * @return the {@link Call} object - */ - public ServiceCall createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { - if (serviceCallback == null) { - throw new IllegalArgumentException("ServiceCallback is required for async calls."); - } - if (resourceGroupName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); - return null; - } - if (name == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); - return null; - } - if (vnetName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); - return null; - } - if (gatewayName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); - return null; - } - if (slot == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); - return null; - } - if (this.client.getSubscriptionId() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); - return null; - } - if (connectionEnvelope == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); - return null; - } - if (this.client.getApiVersion() == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); - return null; - } - Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.createOrUpdateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { - @Override - public void onResponse(Call call, Response response) { - try { - serviceCallback.success(createOrUpdateSiteVNETConnectionGatewaySlotDelegate(response)); - } catch (CloudException | IOException exception) { - serviceCallback.failure(exception); - } - } - }); - return serviceCall; - } - - private ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) - .registerError(CloudException.class) - .build(response); - } - - /** - * Updates the Virtual Network Gateway. - * - * @param resourceGroupName The resource group name - * @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" - * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. - */ - public ServiceResponse updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); - } - if (name == null) { - throw new IllegalArgumentException("Parameter name is required and cannot be null."); - } - if (vnetName == null) { - throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); - } - if (gatewayName == null) { - throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); - } - if (slot == null) { - throw new IllegalArgumentException("Parameter slot is required and cannot be null."); - } - if (this.client.getSubscriptionId() == null) { - throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); - } - if (connectionEnvelope == null) { - throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); - } - if (this.client.getApiVersion() == null) { - throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); - } - Validator.validate(connectionEnvelope); - Call call = service.updateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); - return updateSiteVNETConnectionGatewaySlotDelegate(call.execute()); - } - - /** - * Updates the Virtual Network Gateway. - * - * @param resourceGroupName The resource group name - * @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" - * @param slot The name of the slot for this web app. - * @param connectionEnvelope The properties to update this gateway with. + * + * @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. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + public ServiceCall listSiteRelayServiceConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -16963,14 +16975,6 @@ public ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroup serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } - if (vnetName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); - return null; - } - if (gatewayName == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); - return null; - } if (slot == null) { serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; @@ -16979,22 +16983,17 @@ public ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroup serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; } - if (connectionEnvelope == null) { - serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); - return null; - } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Validator.validate(connectionEnvelope, serviceCallback); - Call call = service.updateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.listSiteRelayServiceConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(updateSiteVNETConnectionGatewaySlotDelegate(response)); + serviceCallback.success(listSiteRelayServiceConnectionsSlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -17003,9 +17002,9 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse updateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) - .register(200, new TypeToken() { }.getType()) + private ServiceResponse listSiteRelayServiceConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } @@ -17322,42 +17321,57 @@ private ServiceResponse updateSiteVNETConnectionGatewayDelegate(Res } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. * * @param resourceGroupName The resource group name * @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" + * @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<VnetInfo> object wrapped in {@link ServiceResponse} if successful. + * @return the Object object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> getSiteVNETConnections(String resourceGroupName, String name) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse getSiteVnetGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteVNETConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteVNETConnectionsDelegate(call.execute()); + Call call = service.getSiteVnetGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + return getSiteVnetGatewaySlotDelegate(call.execute()); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Retrieves a Virtual Network connection gateway associated with this web app and virtual network. * * @param resourceGroupName The resource group name * @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" + * @param slot The name of the slot for this web app. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String name, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall getSiteVnetGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -17369,6 +17383,18 @@ public ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (vnetName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + return null; + } + if (gatewayName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + return null; + } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } if (this.client.getSubscriptionId() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; @@ -17377,13 +17403,13 @@ public ServiceCall getSiteVNETConnectionsAsync(String resourceGroupName, String serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteVNETConnections(resourceGroupName, name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Call call = service.getSiteVnetGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteVNETConnectionsDelegate(response)); + serviceCallback.success(getSiteVnetGatewaySlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -17392,55 +17418,72 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> getSiteVNETConnectionsDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse getSiteVnetGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .register(404, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Updates the Virtual Network Gateway. * * @param resourceGroupName The resource group name * @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" * @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 List<VnetInfo> object wrapped in {@link ServiceResponse} if successful. + * @return the VnetGateway object wrapped in {@link ServiceResponse} if successful. */ - public ServiceResponse> getSiteVNETConnectionsSlot(String resourceGroupName, String name, String slot) throws CloudException, IOException, IllegalArgumentException { + public ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.getSubscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } if (this.client.getApiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); } - Call call = service.getSiteVNETConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); - return getSiteVNETConnectionsSlotDelegate(call.execute()); + Validator.validate(connectionEnvelope); + Call call = service.createOrUpdateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return createOrUpdateSiteVNETConnectionGatewaySlotDelegate(call.execute()); } /** - * Retrieves a list of all Virtual Network Connections associated with this web app. + * Updates the Virtual Network Gateway. * * @param resourceGroupName The resource group name * @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" * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if callback is null * @return the {@link Call} object */ - public ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, String name, String slot, final ServiceCallback> serviceCallback) throws IllegalArgumentException { + public ServiceCall createOrUpdateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException("ServiceCallback is required for async calls."); } @@ -17452,6 +17495,14 @@ public ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, Str serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); return null; } + if (vnetName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + return null; + } + if (gatewayName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + return null; + } if (slot == null) { serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); return null; @@ -17460,17 +17511,22 @@ public ServiceCall getSiteVNETConnectionsSlotAsync(String resourceGroupName, Str serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); return null; } + if (connectionEnvelope == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + return null; + } if (this.client.getApiVersion() == null) { serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); return null; } - Call call = service.getSiteVNETConnectionsSlot(resourceGroupName, name, slot, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage()); + Validator.validate(connectionEnvelope, serviceCallback); + Call call = service.createOrUpdateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); final ServiceCall serviceCall = new ServiceCall(call); - call.enqueue(new ServiceResponseCallback>(serviceCallback) { + call.enqueue(new ServiceResponseCallback(serviceCallback) { @Override public void onResponse(Call call, Response response) { try { - serviceCallback.success(getSiteVNETConnectionsSlotDelegate(response)); + serviceCallback.success(createOrUpdateSiteVNETConnectionGatewaySlotDelegate(response)); } catch (CloudException | IOException exception) { serviceCallback.failure(exception); } @@ -17479,9 +17535,125 @@ public void onResponse(Call call, Response response) return serviceCall; } - private ServiceResponse> getSiteVNETConnectionsSlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { - return new AzureServiceResponseBuilder, CloudException>(this.client.getMapperAdapter()) - .register(200, new TypeToken>() { }.getType()) + private ServiceResponse createOrUpdateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + + /** + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @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" + * @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 VnetGateway object wrapped in {@link ServiceResponse} if successful. + */ + public ServiceResponse updateSiteVNETConnectionGatewaySlot(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope) throws CloudException, IOException, IllegalArgumentException { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (name == null) { + throw new IllegalArgumentException("Parameter name is required and cannot be null."); + } + if (vnetName == null) { + throw new IllegalArgumentException("Parameter vnetName is required and cannot be null."); + } + if (gatewayName == null) { + throw new IllegalArgumentException("Parameter gatewayName is required and cannot be null."); + } + if (slot == null) { + throw new IllegalArgumentException("Parameter slot is required and cannot be null."); + } + if (this.client.getSubscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null."); + } + if (connectionEnvelope == null) { + throw new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null."); + } + if (this.client.getApiVersion() == null) { + throw new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null."); + } + Validator.validate(connectionEnvelope); + Call call = service.updateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + return updateSiteVNETConnectionGatewaySlotDelegate(call.execute()); + } + + /** + * Updates the Virtual Network Gateway. + * + * @param resourceGroupName The resource group name + * @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" + * @param slot The name of the slot for this web app. + * @param connectionEnvelope The properties to update this gateway with. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if callback is null + * @return the {@link Call} object + */ + public ServiceCall updateSiteVNETConnectionGatewaySlotAsync(String resourceGroupName, String name, String vnetName, String gatewayName, String slot, VnetGateway connectionEnvelope, final ServiceCallback serviceCallback) throws IllegalArgumentException { + if (serviceCallback == null) { + throw new IllegalArgumentException("ServiceCallback is required for async calls."); + } + if (resourceGroupName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.")); + return null; + } + if (name == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter name is required and cannot be null.")); + return null; + } + if (vnetName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter vnetName is required and cannot be null.")); + return null; + } + if (gatewayName == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter gatewayName is required and cannot be null.")); + return null; + } + if (slot == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter slot is required and cannot be null.")); + return null; + } + if (this.client.getSubscriptionId() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getSubscriptionId() is required and cannot be null.")); + return null; + } + if (connectionEnvelope == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter connectionEnvelope is required and cannot be null.")); + return null; + } + if (this.client.getApiVersion() == null) { + serviceCallback.failure(new IllegalArgumentException("Parameter this.client.getApiVersion() is required and cannot be null.")); + return null; + } + Validator.validate(connectionEnvelope, serviceCallback); + Call call = service.updateSiteVNETConnectionGatewaySlot(resourceGroupName, name, vnetName, gatewayName, slot, this.client.getSubscriptionId(), connectionEnvelope, this.client.getApiVersion(), this.client.getAcceptLanguage()); + final ServiceCall serviceCall = new ServiceCall(call); + call.enqueue(new ServiceResponseCallback(serviceCallback) { + @Override + public void onResponse(Call call, Response response) { + try { + serviceCallback.success(updateSiteVNETConnectionGatewaySlotDelegate(response)); + } catch (CloudException | IOException exception) { + serviceCallback.failure(exception); + } + } + }); + return serviceCall; + } + + private ServiceResponse updateSiteVNETConnectionGatewaySlotDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return new AzureServiceResponseBuilder(this.client.getMapperAdapter()) + .register(200, new TypeToken() { }.getType()) .registerError(CloudException.class) .build(response); } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/TopLevelDomainsOperationsImpl.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/TopLevelDomainsOperationsImpl.java index d4e2bf697d071..9c7b8dd6bf1ac 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/TopLevelDomainsOperationsImpl.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/TopLevelDomainsOperationsImpl.java @@ -220,7 +220,7 @@ public ServiceResponse listTopLevelDomainAgreements } final Boolean includePrivacy = null; TopLevelDomainAgreementOption agreementOption = new TopLevelDomainAgreementOption(); - agreementOption.setIncludePrivacy(includePrivacy); + agreementOption = null; Call call = service.listTopLevelDomainAgreements(name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), agreementOption); return listTopLevelDomainAgreementsDelegate(call.execute()); } @@ -251,7 +251,7 @@ public ServiceCall listTopLevelDomainAgreementsAsync(String name, final ServiceC } final Boolean includePrivacy = null; TopLevelDomainAgreementOption agreementOption = new TopLevelDomainAgreementOption(); - agreementOption.setIncludePrivacy(includePrivacy); + agreementOption = null; Call call = service.listTopLevelDomainAgreements(name, this.client.getSubscriptionId(), this.client.getApiVersion(), this.client.getAcceptLanguage(), agreementOption); final ServiceCall serviceCall = new ServiceCall(call); call.enqueue(new ServiceResponseCallback(serviceCallback) { diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Category.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Category.java new file mode 100644 index 0000000000000..5b3614e2265d7 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Category.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.website.models; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for Category. + */ +public enum Category { + /** Enum value Uncategorized. */ + UNCATEGORIZED("Uncategorized"), + + /** Enum value Test. */ + TEST("Test"), + + /** Enum value UpSell. */ + UPSELL("UpSell"), + + /** Enum value CrossSell. */ + CROSSSELL("CrossSell"), + + /** Enum value LiveSite. */ + LIVESITE("LiveSite"); + + /** The actual serialized value for a Category instance. */ + private String value; + + Category(String value) { + this.value = value; + } + + /** + * Gets the serialized value for a Category instance. + * + * @return the serialized value. + */ + @JsonValue + public String toValue() { + return this.value; + } + + /** + * Parses a serialized value to a Category instance. + * + * @param value the serialized value to parse. + * @return the parsed Category object, or null if unable to parse. + */ + @JsonCreator + public static Category fromValue(String value) { + Category[] items = Category.values(); + for (Category item : items) { + if (item.toValue().equals(value)) { + return item; + } + } + return null; + } + + @Override + public String toString() { + return toValue(); + } +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/DeletedSite.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/DeletedSite.java index 067932984cb47..42bd0d8b38458 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/DeletedSite.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/DeletedSite.java @@ -180,6 +180,19 @@ public class DeletedSite extends Resource { @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) private String outboundIpAddresses; + /** + * Size of a function container. + */ + @JsonProperty(value = "properties.containerSize") + private Integer containerSize; + + /** + * Maximum number of workers + * This only applies to function container. + */ + @JsonProperty(value = "properties.maxNumberOfWorkers") + private Integer maxNumberOfWorkers; + /** * This is only valid for web app creation. If specified, web app is * cloned from @@ -194,6 +207,18 @@ public class DeletedSite extends Resource { @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) private String resourceGroup; + /** + * Site is a default container. + */ + @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /** + * Default hostname of the web app. + */ + @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostName; + /** * Get the deletedTimestamp value. * @@ -527,6 +552,42 @@ public String getOutboundIpAddresses() { return this.outboundIpAddresses; } + /** + * Get the containerSize value. + * + * @return the containerSize value + */ + public Integer getContainerSize() { + return this.containerSize; + } + + /** + * Set the containerSize value. + * + * @param containerSize the containerSize value to set + */ + public void setContainerSize(Integer containerSize) { + this.containerSize = containerSize; + } + + /** + * Get the maxNumberOfWorkers value. + * + * @return the maxNumberOfWorkers value + */ + public Integer getMaxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Set the maxNumberOfWorkers value. + * + * @param maxNumberOfWorkers the maxNumberOfWorkers value to set + */ + public void setMaxNumberOfWorkers(Integer maxNumberOfWorkers) { + this.maxNumberOfWorkers = maxNumberOfWorkers; + } + /** * Get the cloningInfo value. * @@ -554,4 +615,22 @@ public String getResourceGroup() { return this.resourceGroup; } + /** + * Get the isDefaultContainer value. + * + * @return the isDefaultContainer value + */ + public Boolean getIsDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostName value. + * + * @return the defaultHostName value + */ + public String getDefaultHostName() { + return this.defaultHostName; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/HostingEnvironment.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/HostingEnvironment.java index a3c35e5e3a736..1dce493309453 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/HostingEnvironment.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/HostingEnvironment.java @@ -221,6 +221,12 @@ public class HostingEnvironment extends Resource { @JsonProperty(value = "properties.suspended") private Boolean suspended; + /** + * Custom settings for changing the behavior of the hosting environment. + */ + @JsonProperty(value = "properties.clusterSettings") + private List clusterSettings; + /** * Get the hostingEnvironmentName value. * @@ -761,4 +767,22 @@ public void setSuspended(Boolean suspended) { this.suspended = suspended; } + /** + * Get the clusterSettings value. + * + * @return the clusterSettings value + */ + public List getClusterSettings() { + return this.clusterSettings; + } + + /** + * Set the clusterSettings value. + * + * @param clusterSettings the clusterSettings value to set + */ + public void setClusterSettings(List clusterSettings) { + this.clusterSettings = clusterSettings; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/IpSecurityRestriction.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/IpSecurityRestriction.java new file mode 100644 index 0000000000000..e2d4f4c620f76 --- /dev/null +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/IpSecurityRestriction.java @@ -0,0 +1,60 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ + +package com.microsoft.azure.management.website.models; + + +/** + * Represents an ip security restriction on a web app. + */ +public class IpSecurityRestriction { + /** + * IP address the security restriction is valid for. + */ + private String ipAddress; + + /** + * Subnet mask for the range of IP addresses the restriction is valid for. + */ + private String subnetMask; + + /** + * Get the ipAddress value. + * + * @return the ipAddress value + */ + public String getIpAddress() { + return this.ipAddress; + } + + /** + * Set the ipAddress value. + * + * @param ipAddress the ipAddress value to set + */ + public void setIpAddress(String ipAddress) { + this.ipAddress = ipAddress; + } + + /** + * Get the subnetMask value. + * + * @return the subnetMask value + */ + public String getSubnetMask() { + return this.subnetMask; + } + + /** + * Set the subnetMask value. + * + * @param subnetMask the subnetMask value to set + */ + public void setSubnetMask(String subnetMask) { + this.subnetMask = subnetMask; + } + +} diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Recommendation.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Recommendation.java index fca22b707115d..2958ad00dd0a7 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Recommendation.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Recommendation.java @@ -65,6 +65,13 @@ public class Recommendation { @JsonProperty(required = true) private Channels channels; + /** + * The category that this recommendation belongs to. Possible values + * include: 'Uncategorized', 'Test', 'UpSell', 'CrossSell', 'LiveSite'. + */ + @JsonProperty(required = true) + private Category category; + /** * Name of action recommended by this object. */ @@ -75,6 +82,16 @@ public class Recommendation { */ private Integer enabled; + /** + * The beginning time of a range that the recommendation refers to. + */ + private DateTime startTime; + + /** + * The end time of a range that the recommendation refers to. + */ + private DateTime endTime; + /** * When to notify this recommendation next. Null means that this will * never be notified anymore. @@ -259,6 +276,24 @@ public void setChannels(Channels channels) { this.channels = channels; } + /** + * Get the category value. + * + * @return the category value + */ + public Category getCategory() { + return this.category; + } + + /** + * Set the category value. + * + * @param category the category value to set + */ + public void setCategory(Category category) { + this.category = category; + } + /** * Get the actionName value. * @@ -295,6 +330,42 @@ public void setEnabled(Integer enabled) { this.enabled = enabled; } + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime getStartTime() { + return this.startTime; + } + + /** + * Set the startTime value. + * + * @param startTime the startTime value to set + */ + public void setStartTime(DateTime startTime) { + this.startTime = startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime getEndTime() { + return this.endTime; + } + + /** + * Set the endTime value. + * + * @param endTime the endTime value to set + */ + public void setEndTime(DateTime endTime) { + this.endTime = endTime; + } + /** * Get the nextNotificationTime value. * diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/RecommendationRule.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/RecommendationRule.java index 9d9c136ffd6c1..f092f5defb629 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/RecommendationRule.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/RecommendationRule.java @@ -63,6 +63,13 @@ public class RecommendationRule { @JsonProperty(required = true) private Channels channels; + /** + * The category that the rule belongs to. Possible values include: + * 'Uncategorized', 'Test', 'UpSell', 'CrossSell', 'LiveSite'. + */ + @JsonProperty(required = true) + private Category category; + /** * Get the name value. * @@ -225,4 +232,22 @@ public void setChannels(Channels channels) { this.channels = channels; } + /** + * Get the category value. + * + * @return the category value + */ + public Category getCategory() { + return this.category; + } + + /** + * Set the category value. + * + * @param category the category value to set + */ + public void setCategory(Category category) { + this.category = category; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Site.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Site.java index 79aa55c113612..1420d91033233 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Site.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/Site.java @@ -174,6 +174,19 @@ public class Site extends Resource { @JsonProperty(value = "properties.outboundIpAddresses", access = JsonProperty.Access.WRITE_ONLY) private String outboundIpAddresses; + /** + * Size of a function container. + */ + @JsonProperty(value = "properties.containerSize") + private Integer containerSize; + + /** + * Maximum number of workers + * This only applies to function container. + */ + @JsonProperty(value = "properties.maxNumberOfWorkers") + private Integer maxNumberOfWorkers; + /** * This is only valid for web app creation. If specified, web app is * cloned from @@ -188,6 +201,18 @@ public class Site extends Resource { @JsonProperty(value = "properties.resourceGroup", access = JsonProperty.Access.WRITE_ONLY) private String resourceGroup; + /** + * Site is a default container. + */ + @JsonProperty(value = "properties.isDefaultContainer", access = JsonProperty.Access.WRITE_ONLY) + private Boolean isDefaultContainer; + + /** + * Default hostname of the web app. + */ + @JsonProperty(value = "properties.defaultHostName", access = JsonProperty.Access.WRITE_ONLY) + private String defaultHostName; + /** * Get the siteName value. * @@ -503,6 +528,42 @@ public String getOutboundIpAddresses() { return this.outboundIpAddresses; } + /** + * Get the containerSize value. + * + * @return the containerSize value + */ + public Integer getContainerSize() { + return this.containerSize; + } + + /** + * Set the containerSize value. + * + * @param containerSize the containerSize value to set + */ + public void setContainerSize(Integer containerSize) { + this.containerSize = containerSize; + } + + /** + * Get the maxNumberOfWorkers value. + * + * @return the maxNumberOfWorkers value + */ + public Integer getMaxNumberOfWorkers() { + return this.maxNumberOfWorkers; + } + + /** + * Set the maxNumberOfWorkers value. + * + * @param maxNumberOfWorkers the maxNumberOfWorkers value to set + */ + public void setMaxNumberOfWorkers(Integer maxNumberOfWorkers) { + this.maxNumberOfWorkers = maxNumberOfWorkers; + } + /** * Get the cloningInfo value. * @@ -530,4 +591,22 @@ public String getResourceGroup() { return this.resourceGroup; } + /** + * Get the isDefaultContainer value. + * + * @return the isDefaultContainer value + */ + public Boolean getIsDefaultContainer() { + return this.isDefaultContainer; + } + + /** + * Get the defaultHostName value. + * + * @return the defaultHostName value + */ + public String getDefaultHostName() { + return this.defaultHostName; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/SiteConfig.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/SiteConfig.java index 1d9dea4379227..4d0787fe5f8b5 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/SiteConfig.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/SiteConfig.java @@ -253,6 +253,12 @@ public class SiteConfig extends Resource { @JsonProperty(value = "properties.localMySqlEnabled") private Boolean localMySqlEnabled; + /** + * Ip Security restrictions. + */ + @JsonProperty(value = "properties.ipSecurityRestrictions") + private List ipSecurityRestrictions; + /** * Get the numberOfWorkers value. * @@ -955,4 +961,22 @@ public void setLocalMySqlEnabled(Boolean localMySqlEnabled) { this.localMySqlEnabled = localMySqlEnabled; } + /** + * Get the ipSecurityRestrictions value. + * + * @return the ipSecurityRestrictions value + */ + public List getIpSecurityRestrictions() { + return this.ipSecurityRestrictions; + } + + /** + * Set the ipSecurityRestrictions value. + * + * @param ipSecurityRestrictions the ipSecurityRestrictions value to set + */ + public void setIpSecurityRestrictions(List ipSecurityRestrictions) { + this.ipSecurityRestrictions = ipSecurityRestrictions; + } + } diff --git a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/VnetInfo.java b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/VnetInfo.java index 6f8dff0707996..617ea1e2707c9 100644 --- a/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/VnetInfo.java +++ b/azure-mgmt-website/src/main/java/com/microsoft/azure/management/website/models/VnetInfo.java @@ -43,6 +43,12 @@ public class VnetInfo extends Resource { @JsonProperty(value = "properties.routes") private List routes; + /** + * Flag to determine if a resync is required. + */ + @JsonProperty(value = "properties.resyncRequired") + private Boolean resyncRequired; + /** * Get the vnetResourceId value. * @@ -115,4 +121,22 @@ public void setRoutes(List routes) { this.routes = routes; } + /** + * Get the resyncRequired value. + * + * @return the resyncRequired value + */ + public Boolean getResyncRequired() { + return this.resyncRequired; + } + + /** + * Set the resyncRequired value. + * + * @param resyncRequired the resyncRequired value to set + */ + public void setResyncRequired(Boolean resyncRequired) { + this.resyncRequired = resyncRequired; + } + } From 4eef943a8b42c018163407f0e5920000c8f66072 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Wed, 30 Mar 2016 12:19:35 -0700 Subject: [PATCH 3/3] Fix compute tests --- .../management/compute/VirtualMachineOperationsTests.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/VirtualMachineOperationsTests.java b/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/VirtualMachineOperationsTests.java index aceb8cf08154b..6f331885cd691 100644 --- a/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/VirtualMachineOperationsTests.java +++ b/azure-mgmt-compute/src/test/java/com/microsoft/azure/management/compute/VirtualMachineOperationsTests.java @@ -1,6 +1,8 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.CloudException; +import com.microsoft.azure.management.compute.models.CachingTypes; +import com.microsoft.azure.management.compute.models.DiskCreateOptionTypes; import com.microsoft.azure.management.compute.models.HardwareProfile; import com.microsoft.azure.management.compute.models.ImageReference; import com.microsoft.azure.management.compute.models.NetworkInterfaceReference; @@ -69,8 +71,8 @@ public void canCreateVirtualMachine() throws Exception { request.getStorageProfile().setImageReference(getVMImage("MicrosoftWindowsServer", "WindowsServer", "2012-R2-Datacenter")); request.getStorageProfile().setDataDisks(null); request.getStorageProfile().setOsDisk(new OSDisk()); - request.getStorageProfile().getOsDisk().setCaching("None"); - request.getStorageProfile().getOsDisk().setCreateOption("fromImage"); + request.getStorageProfile().getOsDisk().setCaching(CachingTypes.NONE); + request.getStorageProfile().getOsDisk().setCreateOption(DiskCreateOptionTypes.FROMIMAGE); request.getStorageProfile().getOsDisk().setName("javatest"); request.getStorageProfile().getOsDisk().setVhd(new VirtualHardDisk()); request.getStorageProfile().getOsDisk().getVhd().setUri("https://" + accountName + ".blob.core.windows.net/javacontainer/osjavawindows.vhd");