From 5daced919b2e75c0b09e4f21c5d70937c7a4dedf Mon Sep 17 00:00:00 2001 From: anuchan Date: Thu, 29 Sep 2016 11:28:57 -0700 Subject: [PATCH 1/2] Adding subinterfaces to DataDisk::UpdateStages --- .../compute/VirtualMachineDataDisk.java | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineDataDisk.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineDataDisk.java index 6fafcda1646c..8808a91e798a 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineDataDisk.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineDataDisk.java @@ -270,35 +270,52 @@ interface UpdateDefinition extends */ interface UpdateStages { /** - * Specifies the new size in GB for data disk. - * - * @param sizeInGB the disk size in GB - * @return the next stage of data disk update + * The stage of the virtual machine data disk update allowing to set the disk size. */ - Update withSizeInGB(Integer sizeInGB); + interface WithDiskSize { + /** + * Specifies the new size in GB for data disk. + * + * @param sizeInGB the disk size in GB + * @return the next stage of data disk update + */ + Update withSizeInGB(Integer sizeInGB); + } /** - * Specifies the new logical unit number for the data disk. - * - * @param lun the logical unit number - * @return the next stage of data disk update + * The stage of the virtual machine data disk update allowing to set the disk lun. */ - Update withLun(Integer lun); + interface WithDiskLun { + /** + * Specifies the new logical unit number for the data disk. + * + * @param lun the logical unit number + * @return the next stage of data disk update + */ + Update withLun(Integer lun); + } /** - * Specifies the new caching type for the data disk. - * - * @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' - * @return the next stage of data disk update + * The stage of the virtual machine data disk update allowing to set the disk caching type. */ - Update withCaching(CachingTypes cachingType); + interface WithDiskCaching { + /** + * Specifies the new caching type for the data disk. + * + * @param cachingType the disk caching type. Possible values include: 'None', 'ReadOnly', 'ReadWrite' + * @return the next stage of data disk update + */ + Update withCaching(CachingTypes cachingType); + } } /** * The entirety of a data disk update as part of a virtual machine update. */ interface Update extends - UpdateStages, + UpdateStages.WithDiskSize, + UpdateStages.WithDiskLun, + UpdateStages.WithDiskCaching, Settable { } } \ No newline at end of file From 88f7a827394654bb5d595e90666f189f25df49f7 Mon Sep 17 00:00:00 2001 From: anuchan Date: Thu, 29 Sep 2016 13:00:41 -0700 Subject: [PATCH 2/2] Adding Method annotations --- .../com/microsoft/azure/management/compute/VirtualMachine.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java index 52c178fd7be1..9812398cb540 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -72,6 +72,7 @@ public interface VirtualMachine extends * * @return the virtual machine sizes */ + @Method PagedList availableSizes(); /** @@ -530,6 +531,7 @@ interface WithWindowsCreate extends WithCreate { * * @return the stage representing creatable Windows VM definition */ + @Method WithWindowsCreate disableVmAgent(); /** @@ -537,6 +539,7 @@ interface WithWindowsCreate extends WithCreate { * * @return the stage representing creatable Windows VM definition */ + @Method WithWindowsCreate disableAutoUpdate(); /**