diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java index c035c63fe9f..4ad1ac13198 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/ContainerServiceVMDiagnostics.java @@ -21,7 +21,7 @@ public class ContainerServiceVMDiagnostics { private boolean enabled; /** - * The URI of the storage account where diagnostics are stored. + * The storageUri property. */ @JsonProperty(value = "storageUri", access = JsonProperty.Access.WRITE_ONLY) private String storageUri; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java new file mode 100644 index 00000000000..8caf3e303f6 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoricalStatusInfoProperties.java @@ -0,0 +1,94 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.microsoft.azure.management.compute.implementation.ImageReferenceInner; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Describes each OS upgrade on the Virtual Machine Scale Set. + */ +public class UpgradeOperationHistoricalStatusInfoProperties { + /** + * Information about the overall status of the upgrade operation. + */ + @JsonProperty(value = "runningStatus", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoryStatus runningStatus; + + /** + * Counts of the VM's in each state. + */ + @JsonProperty(value = "progress", access = JsonProperty.Access.WRITE_ONLY) + private RollingUpgradeProgressInfo progress; + + /** + * Error Details for this upgrade if there are any. + */ + @JsonProperty(value = "error", access = JsonProperty.Access.WRITE_ONLY) + private ApiError error; + + /** + * Invoker of the Upgrade Operation. Possible values include: 'Unknown', + * 'User', 'Platform'. + */ + @JsonProperty(value = "startedBy", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationInvoker startedBy; + + /** + * Image Reference details. + */ + @JsonProperty(value = "targetImageReference", access = JsonProperty.Access.WRITE_ONLY) + private ImageReferenceInner targetImageReference; + + /** + * Get the runningStatus value. + * + * @return the runningStatus value + */ + public UpgradeOperationHistoryStatus runningStatus() { + return this.runningStatus; + } + + /** + * Get the progress value. + * + * @return the progress value + */ + public RollingUpgradeProgressInfo progress() { + return this.progress; + } + + /** + * Get the error value. + * + * @return the error value + */ + public ApiError error() { + return this.error; + } + + /** + * Get the startedBy value. + * + * @return the startedBy value + */ + public UpgradeOperationInvoker startedBy() { + return this.startedBy; + } + + /** + * Get the targetImageReference value. + * + * @return the targetImageReference value + */ + public ImageReferenceInner targetImageReference() { + return this.targetImageReference; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java new file mode 100644 index 00000000000..05246efb3db --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationHistoryStatus.java @@ -0,0 +1,64 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import org.joda.time.DateTime; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Information about the current running state of the overall upgrade. + */ +public class UpgradeOperationHistoryStatus { + /** + * Code indicating the current status of the upgrade. Possible values + * include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted'. + */ + @JsonProperty(value = "code", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeState code; + + /** + * Start time of the upgrade. + */ + @JsonProperty(value = "startTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime startTime; + + /** + * End time of the upgrade. + */ + @JsonProperty(value = "endTime", access = JsonProperty.Access.WRITE_ONLY) + private DateTime endTime; + + /** + * Get the code value. + * + * @return the code value + */ + public UpgradeState code() { + return this.code; + } + + /** + * Get the startTime value. + * + * @return the startTime value + */ + public DateTime startTime() { + return this.startTime; + } + + /** + * Get the endTime value. + * + * @return the endTime value + */ + public DateTime endTime() { + return this.endTime; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java new file mode 100644 index 00000000000..5347e60514b --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeOperationInvoker.java @@ -0,0 +1,56 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeOperationInvoker. + */ +public enum UpgradeOperationInvoker { + /** Enum value Unknown. */ + UNKNOWN("Unknown"), + + /** Enum value User. */ + USER("User"), + + /** Enum value Platform. */ + PLATFORM("Platform"); + + /** The actual serialized value for a UpgradeOperationInvoker instance. */ + private String value; + + UpgradeOperationInvoker(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeOperationInvoker instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeOperationInvoker object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeOperationInvoker fromString(String value) { + UpgradeOperationInvoker[] items = UpgradeOperationInvoker.values(); + for (UpgradeOperationInvoker item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java new file mode 100644 index 00000000000..4c8c2239ed9 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/UpgradeState.java @@ -0,0 +1,59 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * Defines values for UpgradeState. + */ +public enum UpgradeState { + /** Enum value RollingForward. */ + ROLLING_FORWARD("RollingForward"), + + /** Enum value Cancelled. */ + CANCELLED("Cancelled"), + + /** Enum value Completed. */ + COMPLETED("Completed"), + + /** Enum value Faulted. */ + FAULTED("Faulted"); + + /** The actual serialized value for a UpgradeState instance. */ + private String value; + + UpgradeState(String value) { + this.value = value; + } + + /** + * Parses a serialized value to a UpgradeState instance. + * + * @param value the serialized value to parse. + * @return the parsed UpgradeState object, or null if unable to parse. + */ + @JsonCreator + public static UpgradeState fromString(String value) { + UpgradeState[] items = UpgradeState.values(); + for (UpgradeState item : items) { + if (item.toString().equalsIgnoreCase(value)) { + return item; + } + } + return null; + } + + @JsonValue + @Override + public String toString() { + return this.value; + } +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java index d6eb8a39b22..346adc9f02f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetVMProfile.java @@ -72,7 +72,7 @@ public class VirtualMachineScaleSetVMProfile { private VirtualMachinePriorityTypes priority; /** - * Specifies the eviction policy for virtual machines in the low priority + * Specifies the eviction policy for virtual machines in a low priority * scale set. <br><br>Minimum api-version: 2017-10-30-preview. * Possible values include: 'Deallocate', 'Delete'. */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java index 6d26aa6a3fe..2b2474840db 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetUpdateInner.java @@ -18,15 +18,7 @@ /** * Specifies information about the availability set that the virtual machine - * should be assigned to. Virtual machines specified in the same availability - * set are allocated to different nodes to maximize availability. For more - * information about availability sets, see [Manage the availability of virtual - * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - * <br><br> For more information on Azure planned maintainance, see - * [Planned maintenance for virtual machines in - * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json) - * <br><br> Currently, a VM can only be added to availability set - * at creation time. An existing VM cannot be added to an availability set. + * should be assigned to. Only tags may be updated. */ @JsonFlatten public class AvailabilitySetUpdateInner extends UpdateResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java index 9fc6e2ade1c..7f58f99d2b0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/AvailabilitySetsInner.java @@ -157,7 +157,7 @@ public Observable> createOrUpdateWithServi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.createOrUpdate(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -249,7 +249,7 @@ public Observable> updateWithServiceRespon throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.update(resourceGroupName, availabilitySetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -333,7 +333,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.delete(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -418,7 +418,7 @@ public Observable> getByResourceGroupWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getByResourceGroup(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -499,7 +499,7 @@ public Observable>> listByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -584,7 +584,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listAvailableSizes(resourceGroupName, availabilitySetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java index 4f0e7eb94b5..9dfeec6b197 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ComputeManagementClientImpl.java @@ -51,6 +51,52 @@ public ComputeManagementClientImpl withSubscriptionId(String subscriptionId) { return this; } + /** The name of the resource group. */ + private String resourceGroupName; + + /** + * Gets The name of the resource group. + * + * @return the resourceGroupName value. + */ + public String resourceGroupName() { + return this.resourceGroupName; + } + + /** + * Sets The name of the resource group. + * + * @param resourceGroupName the resourceGroupName value. + * @return the service client itself + */ + public ComputeManagementClientImpl withResourceGroupName(String resourceGroupName) { + this.resourceGroupName = resourceGroupName; + return this; + } + + /** The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. */ + private String diskName; + + /** + * Gets The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * + * @return the diskName value. + */ + public String diskName() { + return this.diskName; + } + + /** + * Sets The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. + * + * @param diskName the diskName value. + * @return the service client itself + */ + public ComputeManagementClientImpl withDiskName(String diskName) { + this.diskName = diskName; + return this; + } + /** Gets or sets the preferred language for the response. */ private String acceptLanguage; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java index afa9d0e2925..4b9c3f6e22c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ContainerServiceInner.java @@ -27,14 +27,13 @@ @JsonFlatten public class ContainerServiceInner extends Resource { /** - * the current deployment or provisioning state, which only appears in the - * response. + * The provisioningState property. */ @JsonProperty(value = "properties.provisioningState", access = JsonProperty.Access.WRITE_ONLY) private String provisioningState; /** - * Properties of the orchestrator. + * The orchestratorProfile property. */ @JsonProperty(value = "properties.orchestratorProfile") private ContainerServiceOrchestratorProfile orchestratorProfile; diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java index 8b8b7ecb7cf..e44ef5635e3 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/DisksInner.java @@ -8,9 +8,6 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -44,7 +41,7 @@ * An instance of this class provides access to all the operations defined * in Disks. */ -public class DisksInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class DisksInner { /** The Retrofit service to perform REST calls. */ private DisksService service; /** The service client containing this operation class. */ @@ -131,43 +128,37 @@ interface DisksService { /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner createOrUpdate(String resourceGroupName, String diskName, DiskInner disk) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().last().body(); + public DiskInner createOrUpdate(DiskInner disk) { + return createOrUpdateWithServiceResponseAsync(disk).toBlocking().last().body(); } /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); + public ServiceFuture createOrUpdateAsync(DiskInner disk, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(disk), serviceCallback); } /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { + public Observable createOrUpdateAsync(DiskInner disk) { + return createOrUpdateWithServiceResponseAsync(disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { return response.body(); @@ -178,71 +169,63 @@ public DiskInner call(ServiceResponse response) { /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskInner disk) { + public Observable> createOrUpdateWithServiceResponseAsync(DiskInner disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (disk == null) { throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); final String apiVersion = "2018-04-01"; - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner beginCreateOrUpdate(String resourceGroupName, String diskName, DiskInner disk) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().single().body(); + public DiskInner beginCreateOrUpdate(DiskInner disk) { + return beginCreateOrUpdateWithServiceResponseAsync(disk).toBlocking().single().body(); } /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); + public ServiceFuture beginCreateOrUpdateAsync(DiskInner disk, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(disk), serviceCallback); } /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String diskName, DiskInner disk) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { + public Observable beginCreateOrUpdateAsync(DiskInner disk) { + return beginCreateOrUpdateWithServiceResponseAsync(disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { return response.body(); @@ -253,28 +236,26 @@ public DiskInner call(ServiceResponse response) { /** * Creates or updates a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskInner disk) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(DiskInner disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (disk == null) { throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); final String apiVersion = "2018-04-01"; - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginCreateOrUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -299,43 +280,37 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); + public ServiceFuture updateAsync(DiskUpdateInner disk, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(disk), serviceCallback); } /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { - return updateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { + public Observable updateAsync(DiskUpdateInner disk) { + return updateWithServiceResponseAsync(disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { return response.body(); @@ -346,71 +321,63 @@ public DiskInner call(ServiceResponse response) { /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> updateWithServiceResponseAsync(DiskUpdateInner disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (disk == null) { throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); final String apiVersion = "2018-04-01"; - Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.update(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner beginUpdate(String resourceGroupName, String diskName, DiskUpdateInner disk) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).toBlocking().single().body(); + public DiskInner beginUpdate(DiskUpdateInner disk) { + return beginUpdateWithServiceResponseAsync(disk).toBlocking().single().body(); } /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk), serviceCallback); + public ServiceFuture beginUpdateAsync(DiskUpdateInner disk, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(disk), serviceCallback); } /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, diskName, disk).map(new Func1, DiskInner>() { + public Observable beginUpdateAsync(DiskUpdateInner disk) { + return beginUpdateWithServiceResponseAsync(disk).map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { return response.body(); @@ -421,28 +388,26 @@ public DiskInner call(ServiceResponse response) { /** * Updates (patches) a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param disk Disk object supplied in the body of the Patch disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String diskName, DiskUpdateInner disk) { + public Observable> beginUpdateWithServiceResponseAsync(DiskUpdateInner disk) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (disk == null) { throw new IllegalArgumentException("Parameter disk is required and cannot be null."); } Validator.validate(disk); final String apiVersion = "2018-04-01"; - return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, disk, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -467,40 +432,34 @@ private ServiceResponse beginUpdateDelegate(Response re /** * Gets information about a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the DiskInner object if successful. */ - public DiskInner getByResourceGroup(String resourceGroupName, String diskName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public DiskInner getByResourceGroup() { + return getByResourceGroupWithServiceResponseAsync().toBlocking().single().body(); } /** * Gets information about a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture getByResourceGroupAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); + public ServiceFuture getByResourceGroupAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(), serviceCallback); } /** * Gets information about a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable getByResourceGroupAsync(String resourceGroupName, String diskName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, DiskInner>() { + public Observable getByResourceGroupAsync() { + return getByResourceGroupWithServiceResponseAsync().map(new Func1, DiskInner>() { @Override public DiskInner call(ServiceResponse response) { return response.body(); @@ -511,23 +470,21 @@ public DiskInner call(ServiceResponse response) { /** * Gets information about a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the DiskInner object */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> getByResourceGroupWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -551,40 +508,34 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); + public ServiceFuture deleteAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(), serviceCallback); } /** * Deletes a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String diskName) { - return deleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync() { + return deleteWithServiceResponseAsync().map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -595,63 +546,55 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> deleteWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.delete(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deletes a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public OperationStatusResponseInner beginDelete() { + return beginDeleteWithServiceResponseAsync().toBlocking().single().body(); } /** * Deletes a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); + public ServiceFuture beginDeleteAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(), serviceCallback); } /** * Deletes a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginDeleteAsync(String resourceGroupName, String diskName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync() { + return beginDeleteWithServiceResponseAsync().map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -662,23 +605,21 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginDeleteWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginDelete(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -704,14 +645,13 @@ private ServiceResponse beginDeleteDelegate(Respon /** * Lists all the disks under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<DiskInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + public PagedList listByResourceGroup() { + ServiceResponse> response = listByResourceGroupSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { @@ -723,14 +663,13 @@ public Page nextPage(String nextPageLink) { /** * Lists all the disks under a resource group. * - * @param resourceGroupName The name of the resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), + listByResourceGroupSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { @@ -743,12 +682,11 @@ public Observable>> call(String nextPageLink) { /** * Lists all the disks under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<DiskInner> object */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + public Observable> listByResourceGroupAsync() { + return listByResourceGroupWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -760,12 +698,11 @@ public Page call(ServiceResponse> response) { /** * Lists all the disks under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<DiskInner> object */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) + public Observable>> listByResourceGroupWithServiceResponseAsync() { + return listByResourceGroupSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -781,19 +718,18 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<DiskInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroup(this.client.subscriptionId(), this.client.resourceGroupName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -922,43 +858,37 @@ private ServiceResponse> listDelegate(Response grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); + public ServiceFuture grantAccessAsync(GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(grantAccessData), serviceCallback); } /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable grantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { - return grantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { + public Observable grantAccessAsync(GrantAccessDataInner grantAccessData) { + return grantAccessWithServiceResponseAsync(grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { return response.body(); @@ -969,71 +899,63 @@ public AccessUriInner call(ServiceResponse response) { /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(GrantAccessDataInner grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (grantAccessData == null) { throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); final String apiVersion = "2018-04-01"; - Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.grantAccess(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { - return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).toBlocking().single().body(); + public AccessUriInner beginGrantAccess(GrantAccessDataInner grantAccessData) { + return beginGrantAccessWithServiceResponseAsync(grantAccessData).toBlocking().single().body(); } /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData), serviceCallback); + public ServiceFuture beginGrantAccessAsync(GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(grantAccessData), serviceCallback); } /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable beginGrantAccessAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { - return beginGrantAccessWithServiceResponseAsync(resourceGroupName, diskName, grantAccessData).map(new Func1, AccessUriInner>() { + public Observable beginGrantAccessAsync(GrantAccessDataInner grantAccessData) { + return beginGrantAccessWithServiceResponseAsync(grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { return response.body(); @@ -1044,28 +966,26 @@ public AccessUriInner call(ServiceResponse response) { /** * Grants access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get disk access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String diskName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(GrantAccessDataInner grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } if (grantAccessData == null) { throw new IllegalArgumentException("Parameter grantAccessData is required and cannot be null."); } Validator.validate(grantAccessData); final String apiVersion = "2018-04-01"; - return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginGrantAccess(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1090,40 +1010,34 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); + public ServiceFuture revokeAccessAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(), serviceCallback); } /** * Revokes access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String diskName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync() { + return revokeAccessWithServiceResponseAsync().map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -1134,63 +1048,55 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> revokeAccessWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.revokeAccess(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Revokes access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).toBlocking().single().body(); + public OperationStatusResponseInner beginRevokeAccess() { + return beginRevokeAccessWithServiceResponseAsync().toBlocking().single().body(); } /** * Revokes access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String diskName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName), serviceCallback); + public ServiceFuture beginRevokeAccessAsync(final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(), serviceCallback); } /** * Revokes access to a disk. * - * @param resourceGroupName The name of the resource group. - * @param diskName The name of the managed disk that is being created. The name can't be changed after the disk is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The maximum name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String diskName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, diskName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync() { + return beginRevokeAccessWithServiceResponseAsync().map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -1201,23 +1107,21 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String diskName) { + public Observable> beginRevokeAccessWithServiceResponseAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } - if (diskName == null) { - throw new IllegalArgumentException("Parameter diskName is required and cannot be null."); + if (this.client.diskName() == null) { + throw new IllegalArgumentException("Parameter this.client.diskName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, diskName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginRevokeAccess(this.client.subscriptionId(), this.client.resourceGroupName(), this.client.diskName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java index 505fa198d32..2c00425ba57 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImageUpdateInner.java @@ -15,9 +15,7 @@ import com.microsoft.azure.management.compute.UpdateResource; /** - * The source user image virtual hard disk. The virtual hard disk will be - * copied before being attached to the virtual machine. If SourceImage is - * provided, the destination virtual hard drive must not exist. + * The source user image virtual hard disk. Only tags may be updated. */ @JsonFlatten public class ImageUpdateInner extends UpdateResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java index 8ce7c3e316c..cf44f6926fc 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/ImagesInner.java @@ -181,7 +181,7 @@ public Observable> createOrUpdateWithServiceResponse throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.createOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -256,7 +256,7 @@ public Observable> beginCreateOrUpdateWithServiceRes throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCreateOrUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -349,7 +349,7 @@ public Observable> updateWithServiceResponseAsync(St throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.update(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -424,7 +424,7 @@ public Observable> beginUpdateWithServiceResponseAsy throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginUpdate(resourceGroupName, imageName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -509,7 +509,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -576,7 +576,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, imageName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -662,7 +662,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String expand = null; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -744,7 +744,7 @@ public Observable> getByResourceGroupWithServiceResp if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getByResourceGroup(resourceGroupName, imageName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -857,7 +857,7 @@ public Observable>> listByResourceGroupSinglePa if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -962,7 +962,7 @@ public Observable>> listSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java index 652a8ced8a2..666b7c8ce69 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/LogAnalyticsInner.java @@ -134,7 +134,7 @@ public Observable> exportReque throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.exportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -202,7 +202,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginExportRequestRateByInterval(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -288,7 +288,7 @@ public Observable> exportThrot throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.exportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -356,7 +356,7 @@ public Observable> beginExport throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginExportThrottledRequests(location, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java index 896e51a2e50..fb757ac3bf6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/OperationsInner.java @@ -102,7 +102,7 @@ public List call(ServiceResponse>> listWithServiceResponseAsync() { - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java index 3e8637ef477..a112f4d81d8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/SnapshotsInner.java @@ -8,9 +8,6 @@ package com.microsoft.azure.management.compute.implementation; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsGet; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsDelete; -import com.microsoft.azure.management.resources.fluentcore.collection.InnerSupportsListing; import retrofit2.Retrofit; import com.google.common.reflect.TypeToken; import com.microsoft.azure.AzureServiceFuture; @@ -44,7 +41,7 @@ * An instance of this class provides access to all the operations defined * in Snapshots. */ -public class SnapshotsInner implements InnerSupportsGet, InnerSupportsDelete, InnerSupportsListing { +public class SnapshotsInner { /** The Retrofit service to perform REST calls. */ private SnapshotsService service; /** The service client containing this operation class. */ @@ -131,7 +128,6 @@ interface SnapshotsService { /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -139,35 +135,33 @@ interface SnapshotsService { * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SnapshotInner object if successful. */ - public SnapshotInner createOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().last().body(); + public SnapshotInner createOrUpdate(String snapshotName, SnapshotInner snapshot) { + return createOrUpdateWithServiceResponseAsync(snapshotName, snapshot).toBlocking().last().body(); } /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture createOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); + public ServiceFuture createOrUpdateAsync(String snapshotName, SnapshotInner snapshot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(snapshotName, snapshot), serviceCallback); } /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable createOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return createOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { + public Observable createOrUpdateAsync(String snapshotName, SnapshotInner snapshot) { + return createOrUpdateWithServiceResponseAsync(snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { return response.body(); @@ -178,18 +172,17 @@ public SnapshotInner call(ServiceResponse response) { /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { + public Observable> createOrUpdateWithServiceResponseAsync(String snapshotName, SnapshotInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -199,14 +192,13 @@ public Observable> createOrUpdateWithServiceRespo } Validator.validate(snapshot); final String apiVersion = "2018-04-01"; - Observable> observable = service.createOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.createOrUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -214,35 +206,33 @@ public Observable> createOrUpdateWithServiceRespo * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SnapshotInner object if successful. */ - public SnapshotInner beginCreateOrUpdate(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().single().body(); + public SnapshotInner beginCreateOrUpdate(String snapshotName, SnapshotInner snapshot) { + return beginCreateOrUpdateWithServiceResponseAsync(snapshotName, snapshot).toBlocking().single().body(); } /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginCreateOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); + public ServiceFuture beginCreateOrUpdateAsync(String snapshotName, SnapshotInner snapshot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(snapshotName, snapshot), serviceCallback); } /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable beginCreateOrUpdateAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { - return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { + public Observable beginCreateOrUpdateAsync(String snapshotName, SnapshotInner snapshot) { + return beginCreateOrUpdateWithServiceResponseAsync(snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { return response.body(); @@ -253,18 +243,17 @@ public SnapshotInner call(ServiceResponse response) { /** * Creates or updates a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Put disk operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable> beginCreateOrUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotInner snapshot) { + public Observable> beginCreateOrUpdateWithServiceResponseAsync(String snapshotName, SnapshotInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -274,7 +263,7 @@ public Observable> beginCreateOrUpdateWithService } Validator.validate(snapshot); final String apiVersion = "2018-04-01"; - return service.beginCreateOrUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginCreateOrUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -299,7 +288,6 @@ private ServiceResponse beginCreateOrUpdateDelegate(Response beginCreateOrUpdateDelegate(Response updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); + public ServiceFuture updateAsync(String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(updateWithServiceResponseAsync(snapshotName, snapshot), serviceCallback); } /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable updateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { - return updateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { + public Observable updateAsync(String snapshotName, SnapshotUpdateInner snapshot) { + return updateWithServiceResponseAsync(snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { return response.body(); @@ -346,18 +332,17 @@ public SnapshotInner call(ServiceResponse response) { /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> updateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> updateWithServiceResponseAsync(String snapshotName, SnapshotUpdateInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -367,14 +352,13 @@ public Observable> updateWithServiceResponseAsync } Validator.validate(snapshot); final String apiVersion = "2018-04-01"; - Observable> observable = service.update(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.update(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -382,35 +366,33 @@ public Observable> updateWithServiceResponseAsync * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the SnapshotInner object if successful. */ - public SnapshotInner beginUpdate(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).toBlocking().single().body(); + public SnapshotInner beginUpdate(String snapshotName, SnapshotUpdateInner snapshot) { + return beginUpdateWithServiceResponseAsync(snapshotName, snapshot).toBlocking().single().body(); } /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot), serviceCallback); + public ServiceFuture beginUpdateAsync(String snapshotName, SnapshotUpdateInner snapshot, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginUpdateWithServiceResponseAsync(snapshotName, snapshot), serviceCallback); } /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable beginUpdateAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { - return beginUpdateWithServiceResponseAsync(resourceGroupName, snapshotName, snapshot).map(new Func1, SnapshotInner>() { + public Observable beginUpdateAsync(String snapshotName, SnapshotUpdateInner snapshot) { + return beginUpdateWithServiceResponseAsync(snapshotName, snapshot).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { return response.body(); @@ -421,18 +403,17 @@ public SnapshotInner call(ServiceResponse response) { /** * Updates (patches) a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param snapshot Snapshot object supplied in the body of the Patch snapshot operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable> beginUpdateWithServiceResponseAsync(String resourceGroupName, String snapshotName, SnapshotUpdateInner snapshot) { + public Observable> beginUpdateWithServiceResponseAsync(String snapshotName, SnapshotUpdateInner snapshot) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -442,7 +423,7 @@ public Observable> beginUpdateWithServiceResponse } Validator.validate(snapshot); final String apiVersion = "2018-04-01"; - return service.beginUpdate(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginUpdate(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, snapshot, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -467,40 +448,37 @@ private ServiceResponse beginUpdateDelegate(Response getByResourceGroupAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); + public ServiceFuture getByResourceGroupAsync(String snapshotName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(getByResourceGroupWithServiceResponseAsync(snapshotName), serviceCallback); } /** * Gets information about a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable getByResourceGroupAsync(String resourceGroupName, String snapshotName) { - return getByResourceGroupWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, SnapshotInner>() { + public Observable getByResourceGroupAsync(String snapshotName) { + return getByResourceGroupWithServiceResponseAsync(snapshotName).map(new Func1, SnapshotInner>() { @Override public SnapshotInner call(ServiceResponse response) { return response.body(); @@ -511,23 +489,22 @@ public SnapshotInner call(ServiceResponse response) { /** * Gets information about a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the SnapshotInner object */ - public Observable> getByResourceGroupWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> getByResourceGroupWithServiceResponseAsync(String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.getByResourceGroup(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.getByResourceGroup(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -551,40 +528,37 @@ private ServiceResponse getByResourceGroupDelegate(Response deleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); + public ServiceFuture deleteAsync(String snapshotName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(snapshotName), serviceCallback); } /** * Deletes a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable deleteAsync(String resourceGroupName, String snapshotName) { - return deleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable deleteAsync(String snapshotName) { + return deleteWithServiceResponseAsync(snapshotName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -595,63 +569,59 @@ public OperationStatusResponseInner call(ServiceResponse> deleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> deleteWithServiceResponseAsync(String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } final String apiVersion = "2018-04-01"; - Observable> observable = service.delete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.delete(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Deletes a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginDelete(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public OperationStatusResponseInner beginDelete(String snapshotName) { + return beginDeleteWithServiceResponseAsync(snapshotName).toBlocking().single().body(); } /** * Deletes a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginDeleteAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); + public ServiceFuture beginDeleteAsync(String snapshotName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(snapshotName), serviceCallback); } /** * Deletes a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginDeleteAsync(String resourceGroupName, String snapshotName) { - return beginDeleteWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginDeleteAsync(String snapshotName) { + return beginDeleteWithServiceResponseAsync(snapshotName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -662,23 +632,22 @@ public OperationStatusResponseInner call(ServiceResponse> beginDeleteWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginDeleteWithServiceResponseAsync(String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.beginDelete(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginDelete(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -704,14 +673,13 @@ private ServiceResponse beginDeleteDelegate(Respon /** * Lists snapshots under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the PagedList<SnapshotInner> object if successful. */ - public PagedList listByResourceGroup(final String resourceGroupName) { - ServiceResponse> response = listByResourceGroupSinglePageAsync(resourceGroupName).toBlocking().single(); + public PagedList listByResourceGroup() { + ServiceResponse> response = listByResourceGroupSinglePageAsync().toBlocking().single(); return new PagedList(response.body()) { @Override public Page nextPage(String nextPageLink) { @@ -723,14 +691,13 @@ public Page nextPage(String nextPageLink) { /** * Lists snapshots under a resource group. * - * @param resourceGroupName The name of the resource group. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture> listByResourceGroupAsync(final String resourceGroupName, final ListOperationCallback serviceCallback) { + public ServiceFuture> listByResourceGroupAsync(final ListOperationCallback serviceCallback) { return AzureServiceFuture.fromPageResponse( - listByResourceGroupSinglePageAsync(resourceGroupName), + listByResourceGroupSinglePageAsync(), new Func1>>>() { @Override public Observable>> call(String nextPageLink) { @@ -743,12 +710,11 @@ public Observable>> call(String nextPageLink /** * Lists snapshots under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<SnapshotInner> object */ - public Observable> listByResourceGroupAsync(final String resourceGroupName) { - return listByResourceGroupWithServiceResponseAsync(resourceGroupName) + public Observable> listByResourceGroupAsync() { + return listByResourceGroupWithServiceResponseAsync() .map(new Func1>, Page>() { @Override public Page call(ServiceResponse> response) { @@ -760,12 +726,11 @@ public Page call(ServiceResponse> response) { /** * Lists snapshots under a resource group. * - * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the PagedList<SnapshotInner> object */ - public Observable>> listByResourceGroupWithServiceResponseAsync(final String resourceGroupName) { - return listByResourceGroupSinglePageAsync(resourceGroupName) + public Observable>> listByResourceGroupWithServiceResponseAsync() { + return listByResourceGroupSinglePageAsync() .concatMap(new Func1>, Observable>>>() { @Override public Observable>> call(ServiceResponse> page) { @@ -781,19 +746,18 @@ public Observable>> call(ServiceResponse> * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the PagedList<SnapshotInner> object wrapped in {@link ServiceResponse} if successful. */ - public Observable>> listByResourceGroupSinglePageAsync(final String resourceGroupName) { + public Observable>> listByResourceGroupSinglePageAsync() { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.listByResourceGroup(this.client.subscriptionId(), resourceGroupName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.listByResourceGroup(this.client.subscriptionId(), this.client.resourceGroupName(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override public Observable>> call(Response response) { @@ -922,7 +886,6 @@ private ServiceResponse> listDelegate(Response> listDelegate(Response grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); + public ServiceFuture grantAccessAsync(String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(grantAccessWithServiceResponseAsync(snapshotName, grantAccessData), serviceCallback); } /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable grantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { - return grantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { + public Observable grantAccessAsync(String snapshotName, GrantAccessDataInner grantAccessData) { + return grantAccessWithServiceResponseAsync(snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { return response.body(); @@ -969,18 +930,17 @@ public AccessUriInner call(ServiceResponse response) { /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable> grantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> grantAccessWithServiceResponseAsync(String snapshotName, GrantAccessDataInner grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -990,14 +950,13 @@ public Observable> grantAccessWithServiceRespons } Validator.validate(grantAccessData); final String apiVersion = "2018-04-01"; - Observable> observable = service.grantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.grantAccess(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation @@ -1005,35 +964,33 @@ public Observable> grantAccessWithServiceRespons * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the AccessUriInner object if successful. */ - public AccessUriInner beginGrantAccess(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { - return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).toBlocking().single().body(); + public AccessUriInner beginGrantAccess(String snapshotName, GrantAccessDataInner grantAccessData) { + return beginGrantAccessWithServiceResponseAsync(snapshotName, grantAccessData).toBlocking().single().body(); } /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData), serviceCallback); + public ServiceFuture beginGrantAccessAsync(String snapshotName, GrantAccessDataInner grantAccessData, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginGrantAccessWithServiceResponseAsync(snapshotName, grantAccessData), serviceCallback); } /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable beginGrantAccessAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { - return beginGrantAccessWithServiceResponseAsync(resourceGroupName, snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { + public Observable beginGrantAccessAsync(String snapshotName, GrantAccessDataInner grantAccessData) { + return beginGrantAccessWithServiceResponseAsync(snapshotName, grantAccessData).map(new Func1, AccessUriInner>() { @Override public AccessUriInner call(ServiceResponse response) { return response.body(); @@ -1044,18 +1001,17 @@ public AccessUriInner call(ServiceResponse response) { /** * Grants access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param grantAccessData Access data object supplied in the body of the get snapshot access operation. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the AccessUriInner object */ - public Observable> beginGrantAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName, GrantAccessDataInner grantAccessData) { + public Observable> beginGrantAccessWithServiceResponseAsync(String snapshotName, GrantAccessDataInner grantAccessData) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); @@ -1065,7 +1021,7 @@ public Observable> beginGrantAccessWithServiceRe } Validator.validate(grantAccessData); final String apiVersion = "2018-04-01"; - return service.beginGrantAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginGrantAccess(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, grantAccessData, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { @@ -1090,40 +1046,37 @@ private ServiceResponse beginGrantAccessDelegate(Response revokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); + public ServiceFuture revokeAccessAsync(String snapshotName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(revokeAccessWithServiceResponseAsync(snapshotName), serviceCallback); } /** * Revokes access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ - public Observable revokeAccessAsync(String resourceGroupName, String snapshotName) { - return revokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable revokeAccessAsync(String snapshotName) { + return revokeAccessWithServiceResponseAsync(snapshotName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -1134,63 +1087,59 @@ public OperationStatusResponseInner call(ServiceResponse> revokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> revokeAccessWithServiceResponseAsync(String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } final String apiVersion = "2018-04-01"; - Observable> observable = service.revokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); + Observable> observable = service.revokeAccess(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } /** * Revokes access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudException thrown if the request is rejected by server * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent * @return the OperationStatusResponseInner object if successful. */ - public OperationStatusResponseInner beginRevokeAccess(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).toBlocking().single().body(); + public OperationStatusResponseInner beginRevokeAccess(String snapshotName) { + return beginRevokeAccessWithServiceResponseAsync(snapshotName).toBlocking().single().body(); } /** * Revokes access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */ - public ServiceFuture beginRevokeAccessAsync(String resourceGroupName, String snapshotName, final ServiceCallback serviceCallback) { - return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName), serviceCallback); + public ServiceFuture beginRevokeAccessAsync(String snapshotName, final ServiceCallback serviceCallback) { + return ServiceFuture.fromResponse(beginRevokeAccessWithServiceResponseAsync(snapshotName), serviceCallback); } /** * Revokes access to a snapshot. * - * @param resourceGroupName The name of the resource group. * @param snapshotName The name of the snapshot that is being created. The name can't be changed after the snapshot is created. Supported characters for the name are a-z, A-Z, 0-9 and _. The max name length is 80 characters. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable to the OperationStatusResponseInner object */ - public Observable beginRevokeAccessAsync(String resourceGroupName, String snapshotName) { - return beginRevokeAccessWithServiceResponseAsync(resourceGroupName, snapshotName).map(new Func1, OperationStatusResponseInner>() { + public Observable beginRevokeAccessAsync(String snapshotName) { + return beginRevokeAccessWithServiceResponseAsync(snapshotName).map(new Func1, OperationStatusResponseInner>() { @Override public OperationStatusResponseInner call(ServiceResponse response) { return response.body(); @@ -1201,23 +1150,22 @@ public OperationStatusResponseInner call(ServiceResponse> beginRevokeAccessWithServiceResponseAsync(String resourceGroupName, String snapshotName) { + public Observable> beginRevokeAccessWithServiceResponseAsync(String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - if (resourceGroupName == null) { - throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + if (this.client.resourceGroupName() == null) { + throw new IllegalArgumentException("Parameter this.client.resourceGroupName() is required and cannot be null."); } if (snapshotName == null) { throw new IllegalArgumentException("Parameter snapshotName is required and cannot be null."); } final String apiVersion = "2018-04-01"; - return service.beginRevokeAccess(this.client.subscriptionId(), resourceGroupName, snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + return service.beginRevokeAccess(this.client.subscriptionId(), this.client.resourceGroupName(), snapshotName, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override public Observable> call(Response response) { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.java new file mode 100644 index 00000000000..18e68d2cb21 --- /dev/null +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UpgradeOperationHistoricalStatusInfoInner.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. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + */ + +package com.microsoft.azure.management.compute.implementation; + +import com.microsoft.azure.management.compute.UpgradeOperationHistoricalStatusInfoProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * Virtual Machine Scale Set OS Upgrade History operation response. + */ +public class UpgradeOperationHistoricalStatusInfoInner { + /** + * Information about the properties of the upgrade operation. + */ + @JsonProperty(value = "properties", access = JsonProperty.Access.WRITE_ONLY) + private UpgradeOperationHistoricalStatusInfoProperties properties; + + /** + * Resource type. + */ + @JsonProperty(value = "type", access = JsonProperty.Access.WRITE_ONLY) + private String type; + + /** + * Resource location. + */ + @JsonProperty(value = "location", access = JsonProperty.Access.WRITE_ONLY) + private String location; + + /** + * Get the properties value. + * + * @return the properties value + */ + public UpgradeOperationHistoricalStatusInfoProperties properties() { + return this.properties; + } + + /** + * Get the type value. + * + * @return the type value + */ + public String type() { + return this.type; + } + + /** + * Get the location value. + * + * @return the location value + */ + public String location() { + return this.location; + } + +} diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java index c3d91764761..ed6275ad74d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/UsagesInner.java @@ -157,7 +157,7 @@ public Observable>> listSinglePageAsync(final S if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java index 821c88e1a11..aca254a6ea4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionImagesInner.java @@ -142,7 +142,7 @@ public Observable> getWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.get(location, publisherName, type, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -226,7 +226,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listTypes(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -317,7 +317,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String filter = null; final Integer top = null; final String orderby = null; @@ -416,7 +416,7 @@ public Observable>> list if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listVersions(location, publisherName, type, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java index eaf7bcb2d6d..53977513e4e 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineExtensionsInner.java @@ -163,7 +163,7 @@ public Observable> createOrUpdateW throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -245,7 +245,7 @@ public Observable> beginCreateOrUp throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCreateOrUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -345,7 +345,7 @@ public Observable> updateWithServi throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.update(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -427,7 +427,7 @@ public Observable> beginUpdateWith throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginUpdate(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -518,7 +518,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -592,7 +592,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -685,7 +685,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String expand = null; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -774,7 +774,7 @@ public Observable> getWithServiceR if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.get(resourceGroupName, vmName, vmExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java index ddda82d3f99..2f06093ce18 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImagesInner.java @@ -157,7 +157,7 @@ public Observable> getWithServiceRespo if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.get(location, publisherName, offer, skus, version, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -255,7 +255,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String filter = null; final Integer top = null; final String orderby = null; @@ -361,7 +361,7 @@ public Observable>> listW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(location, publisherName, offer, skus, this.client.subscriptionId(), filter, top, orderby, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -445,7 +445,7 @@ public Observable>> listO if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listOffers(location, publisherName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -522,7 +522,7 @@ public Observable>> listP if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listPublishers(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -613,7 +613,7 @@ public Observable>> listS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listSkus(location, publisherName, offer, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java index c6227de9e0d..5359a167e44 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetExtensionsInner.java @@ -168,7 +168,7 @@ public Observable> createO throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -250,7 +250,7 @@ public Observable> beginCr throw new IllegalArgumentException("Parameter extensionParameters is required and cannot be null."); } Validator.validate(extensionParameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), extensionParameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -342,7 +342,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -416,7 +416,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -509,7 +509,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String expand = null; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -598,7 +598,7 @@ public Observable> getWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.get(resourceGroupName, vmScaleSetName, vmssExtensionName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -719,7 +719,7 @@ public Observable>> l if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java index 29bc0ff7187..b95cab1c68c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetRollingUpgradesInner.java @@ -136,7 +136,7 @@ public Observable> cancelWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.cancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -203,7 +203,7 @@ public Observable> beginCancelWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCancel(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -288,7 +288,7 @@ public Observable> startOSUpgradeW if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.startOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -355,7 +355,7 @@ public Observable> beginStartOSUpg if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginStartOSUpgrade(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -440,7 +440,7 @@ public Observable> getLatestWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getLatest(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java index f5d03c6fd32..4198a573c98 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetUpdateNetworkConfigurationInner.java @@ -8,6 +8,7 @@ package com.microsoft.azure.management.compute.implementation; +import java.util.UUID; import com.microsoft.azure.SubResource; import com.microsoft.azure.management.compute.VirtualMachineScaleSetNetworkConfigurationDnsSettings; import java.util.List; @@ -24,7 +25,7 @@ public class VirtualMachineScaleSetUpdateNetworkConfigurationInner extends SubRe * The network configuration name. */ @JsonProperty(value = "name") - private String name; + private UUID name; /** * Whether this is a primary NIC on a virtual machine. @@ -68,7 +69,7 @@ public class VirtualMachineScaleSetUpdateNetworkConfigurationInner extends SubRe * * @return the name value */ - public String name() { + public UUID name() { return this.name; } @@ -78,7 +79,7 @@ public String name() { * @param name the name value to set * @return the VirtualMachineScaleSetUpdateNetworkConfigurationInner object itself. */ - public VirtualMachineScaleSetUpdateNetworkConfigurationInner withName(String name) { + public VirtualMachineScaleSetUpdateNetworkConfigurationInner withName(UUID name) { this.name = name; return this; } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java index b7c3251ed48..83e53d9e06f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetVMsInner.java @@ -229,7 +229,7 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.reimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -303,7 +303,7 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginReimage(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -395,7 +395,7 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.reimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -469,7 +469,7 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginReimageAll(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -561,7 +561,7 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.deallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -635,7 +635,7 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDeallocate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -735,7 +735,7 @@ public Observable> updateWithServ throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -817,7 +817,7 @@ public Observable> beginUpdateWit throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginUpdate(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -909,7 +909,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -983,7 +983,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1076,7 +1076,7 @@ public Observable> getWithService if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.get(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1167,7 +1167,7 @@ public Observable> ge if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getInstanceView(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1288,7 +1288,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String filter = null; final String select = null; final String expand = null; @@ -1420,7 +1420,7 @@ public Observable>> listSing if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(resourceGroupName, virtualMachineScaleSetName, this.client.subscriptionId(), filter, select, expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1511,7 +1511,7 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.powerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1585,7 +1585,7 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginPowerOff(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1677,7 +1677,7 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.restart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1751,7 +1751,7 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginRestart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1843,7 +1843,7 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.start(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1917,7 +1917,7 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginStart(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2009,7 +2009,7 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.redeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2083,7 +2083,7 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginRedeploy(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2175,7 +2175,7 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.performMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2249,7 +2249,7 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginPerformMaintenance(resourceGroupName, vmScaleSetName, instanceId, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java index 9ca36448448..4780ffb5f07 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetsInner.java @@ -128,6 +128,10 @@ interface VirtualMachineScaleSetsService { @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/skus") Observable> listSkus(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistory" }) + @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/osUpgradeHistory") + Observable> getOSUpgradeHistory(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets powerOff" }) @POST("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/poweroff") Observable> powerOff(@Path("resourceGroupName") String resourceGroupName, @Path("vmScaleSetName") String vmScaleSetName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs, @Header("User-Agent") String userAgent); @@ -208,6 +212,10 @@ interface VirtualMachineScaleSetsService { @GET Observable> listSkusNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.compute.VirtualMachineScaleSets getOSUpgradeHistoryNext" }) + @GET + Observable> getOSUpgradeHistoryNext(@Url String nextUrl, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent); + } /** @@ -280,7 +288,7 @@ public Observable> createOrUpdateWi throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.createOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -355,7 +363,7 @@ public Observable> beginCreateOrUpd throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCreateOrUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -448,7 +456,7 @@ public Observable> updateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.update(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -523,7 +531,7 @@ public Observable> beginUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginUpdate(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -607,7 +615,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -674,7 +682,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -760,7 +768,7 @@ public Observable> getByResourceGro if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getByResourceGroup(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -844,7 +852,7 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -918,7 +926,7 @@ public Observable> deallocateWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -990,7 +998,7 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -1075,7 +1083,7 @@ public Observable> beginDeallocate throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -1173,7 +1181,7 @@ public Observable> deleteInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.deleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); @@ -1250,7 +1258,7 @@ public Observable> beginDeleteInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginDeleteInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) @@ -1337,7 +1345,7 @@ public Observable> getI if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getInstanceView(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1450,7 +1458,7 @@ public Observable>> listByReso if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1555,7 +1563,7 @@ public Observable>> listSingle if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1676,7 +1684,7 @@ public Observable>> listSku if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listSkus(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1698,6 +1706,127 @@ private ServiceResponse> listSkusDeleg .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistory(final String resourceGroupName, final String vmScaleSetName) { + ServiceResponse> response = getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistoryWithServiceResponseAsync(resourceGroupName, vmScaleSetName) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param resourceGroupName The name of the resource group. + * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryWithServiceResponseAsync(final String resourceGroupName, final String vmScaleSetName) { + return getOSUpgradeHistorySinglePageAsync(resourceGroupName, vmScaleSetName) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param resourceGroupName The name of the resource group. + ServiceResponse> * @param vmScaleSetName The name of the VM scale set. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistorySinglePageAsync(final String resourceGroupName, final String vmScaleSetName) { + if (resourceGroupName == null) { + throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); + } + if (vmScaleSetName == null) { + throw new IllegalArgumentException("Parameter vmScaleSetName is required and cannot be null."); + } + if (this.client.subscriptionId() == null) { + throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); + } + final String apiVersion = "2017-12-01-alphadummy"; + return service.getOSUpgradeHistory(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + /** * Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. * @@ -1760,7 +1889,7 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -1834,7 +1963,7 @@ public Observable> powerOffWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -1906,7 +2035,7 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -1991,7 +2120,7 @@ public Observable> beginPowerOffWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2081,7 +2210,7 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2155,7 +2284,7 @@ public Observable> restartWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2227,7 +2356,7 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2312,7 +2441,7 @@ public Observable> beginRestartWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2402,7 +2531,7 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2476,7 +2605,7 @@ public Observable> startWithServic throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2548,7 +2677,7 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2633,7 +2762,7 @@ public Observable> beginStartWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2723,7 +2852,7 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2797,7 +2926,7 @@ public Observable> redeployWithSer throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -2869,7 +2998,7 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -2954,7 +3083,7 @@ public Observable> beginRedeployWi throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -3044,7 +3173,7 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -3118,7 +3247,7 @@ public Observable> performMaintena throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -3190,7 +3319,7 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -3275,7 +3404,7 @@ public Observable> beginPerformMai throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -3373,7 +3502,7 @@ public Observable> updateInstances throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); Observable> observable = service.updateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()); @@ -3450,7 +3579,7 @@ public Observable> beginUpdateInst throw new IllegalArgumentException("Parameter instanceIds is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); vmInstanceIDs.withInstanceIds(instanceIds); return service.beginUpdateInstances(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), vmInstanceIDs, this.client.userAgent()) @@ -3537,7 +3666,7 @@ public Observable> reimageWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -3611,7 +3740,7 @@ public Observable> reimageWithServ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -3683,7 +3812,7 @@ public Observable> beginReimageWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -3768,7 +3897,7 @@ public Observable> beginReimageWit throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -3858,7 +3987,7 @@ public Observable> reimageAllWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String instanceIdsConverted = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -3932,7 +4061,7 @@ public Observable> reimageAllWithS throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -4004,7 +4133,7 @@ public Observable> beginReimageAll if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final List instanceIds = null; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); vmInstanceIDs.withInstanceIds(null); @@ -4089,7 +4218,7 @@ public Observable> beginReimageAll throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } Validator.validate(instanceIds); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = null; if (instanceIds != null) { vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); @@ -4183,7 +4312,7 @@ public Observable> forceRecoveryServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.forceRecoveryServiceFabricPlatformUpdateDomainWalk(resourceGroupName, vmScaleSetName, this.client.subscriptionId(), apiVersion, platformUpdateDomain, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -4538,4 +4667,115 @@ private ServiceResponse> listSkusNextD .build(response); } + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @throws CloudException thrown if the request is rejected by server + * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object if successful. + */ + public PagedList getOSUpgradeHistoryNext(final String nextPageLink) { + ServiceResponse> response = getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single(); + return new PagedList(response.body()) { + @Override + public Page nextPage(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink).toBlocking().single().body(); + } + }; + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param serviceFuture the ServiceFuture object tracking the Retrofit calls + * @param serviceCallback the async ServiceCallback to handle successful and failed responses. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the {@link ServiceFuture} object + */ + public ServiceFuture> getOSUpgradeHistoryNextAsync(final String nextPageLink, final ServiceFuture> serviceFuture, final ListOperationCallback serviceCallback) { + return AzureServiceFuture.fromPageResponse( + getOSUpgradeHistoryNextSinglePageAsync(nextPageLink), + new Func1>>>() { + @Override + public Observable>> call(String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink); + } + }, + serviceCallback); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable> getOSUpgradeHistoryNextAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink) + .map(new Func1>, Page>() { + @Override + public Page call(ServiceResponse> response) { + return response.body(); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the observable to the PagedList<UpgradeOperationHistoricalStatusInfoInner> object + */ + public Observable>> getOSUpgradeHistoryNextWithServiceResponseAsync(final String nextPageLink) { + return getOSUpgradeHistoryNextSinglePageAsync(nextPageLink) + .concatMap(new Func1>, Observable>>>() { + @Override + public Observable>> call(ServiceResponse> page) { + String nextPageLink = page.body().nextPageLink(); + if (nextPageLink == null) { + return Observable.just(page); + } + return Observable.just(page).concatWith(getOSUpgradeHistoryNextWithServiceResponseAsync(nextPageLink)); + } + }); + } + + /** + * Gets list of OS upgrades on a VM scale set instance. + * + ServiceResponse> * @param nextPageLink The NextLink from the previous successful call to List operation. + * @throws IllegalArgumentException thrown if parameters fail the validation + * @return the PagedList<UpgradeOperationHistoricalStatusInfoInner> object wrapped in {@link ServiceResponse} if successful. + */ + public Observable>> getOSUpgradeHistoryNextSinglePageAsync(final String nextPageLink) { + if (nextPageLink == null) { + throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); + } + String nextUrl = String.format("%s", nextPageLink); + return service.getOSUpgradeHistoryNext(nextUrl, this.client.acceptLanguage(), this.client.userAgent()) + .flatMap(new Func1, Observable>>>() { + @Override + public Observable>> call(Response response) { + try { + ServiceResponse> result = getOSUpgradeHistoryNextDelegate(response); + return Observable.just(new ServiceResponse>(result.body(), result.response())); + } catch (Throwable t) { + return Observable.error(t); + } + } + }); + } + + private ServiceResponse> getOSUpgradeHistoryNextDelegate(Response response) throws CloudException, IOException, IllegalArgumentException { + return this.client.restClient().responseBuilderFactory()., CloudException>newInstance(this.client.serializerAdapter()) + .register(200, new TypeToken>() { }.getType()) + .registerError(CloudException.class) + .build(response); + } + } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java index 3fbac623fa6..fbe3d3a7f95 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineSizesInner.java @@ -113,7 +113,7 @@ public Observable>> listWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(location, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java index beebee6fe43..26d3a8aa84c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineUpdateInner.java @@ -22,7 +22,7 @@ import com.microsoft.azure.management.compute.UpdateResource; /** - * Describes a Virtual Machine. + * Describes a Virtual Machine Update. */ @JsonFlatten public class VirtualMachineUpdateInner extends UpdateResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java index 83d7664d18c..4219d738a5c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachinesInner.java @@ -263,7 +263,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final String expand = null; return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -345,7 +345,7 @@ public Observable> getE if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getExtensions(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -437,7 +437,7 @@ public Observable> captureWith throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.capture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -512,7 +512,7 @@ public Observable> beginCaptur throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCapture(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -605,7 +605,7 @@ public Observable> createOrUpdateWithServic throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.createOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -680,7 +680,7 @@ public Observable> beginCreateOrUpdateWithS throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginCreateOrUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -773,7 +773,7 @@ public Observable> updateWithServiceRespons throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.update(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken() { }.getType()); } @@ -848,7 +848,7 @@ public Observable> beginUpdateWithServiceRe throw new IllegalArgumentException("Parameter parameters is required and cannot be null."); } Validator.validate(parameters); - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginUpdate(resourceGroupName, vmName, this.client.subscriptionId(), parameters, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -933,7 +933,7 @@ public Observable> deleteWithServi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.delete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1000,7 +1000,7 @@ public Observable> beginDeleteWith if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDelete(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1086,7 +1086,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; final InstanceViewTypes expand = null; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @@ -1168,7 +1168,7 @@ public Observable> getByResourceGroupWithSe if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.getByResourceGroup(resourceGroupName, vmName, this.client.subscriptionId(), expand, apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1252,7 +1252,7 @@ public Observable> instanceView if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.instanceView(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1336,7 +1336,7 @@ public Observable> convertToManage if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.convertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1403,7 +1403,7 @@ public Observable> beginConvertToM if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginConvertToManagedDisks(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1488,7 +1488,7 @@ public Observable> deallocateWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.deallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -1555,7 +1555,7 @@ public Observable> beginDeallocate if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginDeallocate(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1640,7 +1640,7 @@ public Observable> generalizeWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.generalize(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -1753,7 +1753,7 @@ public Observable>> listByResourceGrou if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listByResourceGroup(resourceGroupName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1858,7 +1858,7 @@ public Observable>> listSinglePageAsyn if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.list(this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -1942,7 +1942,7 @@ public Observable>> listAvailableS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.listAvailableSizes(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>>() { @Override @@ -2027,7 +2027,7 @@ public Observable> powerOffWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.powerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2094,7 +2094,7 @@ public Observable> beginPowerOffWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginPowerOff(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2179,7 +2179,7 @@ public Observable> restartWithServ if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.restart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2246,7 +2246,7 @@ public Observable> beginRestartWit if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginRestart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2331,7 +2331,7 @@ public Observable> startWithServic if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.start(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2398,7 +2398,7 @@ public Observable> beginStartWithS if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginStart(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2483,7 +2483,7 @@ public Observable> redeployWithSer if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.redeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2550,7 +2550,7 @@ public Observable> beginRedeployWi if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginRedeploy(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override @@ -2635,7 +2635,7 @@ public Observable> performMaintena if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; Observable> observable = service.performMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPostOrDeleteResultAsync(observable, new TypeToken() { }.getType()); } @@ -2702,7 +2702,7 @@ public Observable> beginPerformMai if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } - final String apiVersion = "2017-12-01"; + final String apiVersion = "2017-12-01-alphadummy"; return service.beginPerformMaintenance(resourceGroupName, vmName, this.client.subscriptionId(), apiVersion, this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1, Observable>>() { @Override