diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java index f2cb9800a6ab..d05f27608b26 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySet.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.AvailabilitySetInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -20,7 +20,7 @@ /** * An immutable client-side representation of an Azure availability set. */ -@LangDefinition(ContainerName = "~/") +@Fluent() public interface AvailabilitySet extends GroupableResource, Refreshable, @@ -69,7 +69,6 @@ public interface AvailabilitySet extends /** * Container interface for all the definitions. */ - @LangDefinition(ContainerName = "~/AvailabilitySet.Definition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -79,7 +78,6 @@ interface Definition extends /** * Grouping of availability set definition stages. */ - @LangDefinition(ContainerName = "~/AvailabilitySet.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of an availability set definition. @@ -136,7 +134,6 @@ interface WithCreate extends *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "~/AvailabilitySet.Update") interface Update extends Appliable, Resource.UpdateWithTags { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java index b9c15e5b0187..c43dc03fcf44 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/AvailabilitySets.java @@ -1,6 +1,6 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -13,7 +13,7 @@ /** * Entry point to availability set management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface AvailabilitySets extends SupportsListingByGroup, SupportsGettingByGroup, 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 21c4293598c5..1c0b104c536f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachine.java @@ -1,7 +1,9 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.PagedList; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.compute.implementation.VirtualMachineInner; import com.microsoft.azure.management.network.Network; import com.microsoft.azure.management.network.NetworkInterface; @@ -22,7 +24,7 @@ /** * An immutable client-side representation of an Azure virtual machine. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachine extends GroupableResource, Refreshable, @@ -137,7 +139,13 @@ public interface VirtualMachine extends * * @return the public IP of the primary network interface */ - PublicIpAddress primaryPublicIpAddress(); + @LangMethodDefinition(AsType = LangMethodType.Method) + PublicIpAddress getPrimaryPublicIpAddress(); + + /** + * @return the resource ID of the public IP address associated with this virtual machine's primary network interface + */ + String primaryPublicIpAddressId(); /** * Returns id to the availability set this virtual machine associated with. @@ -222,7 +230,6 @@ public interface VirtualMachine extends /** * The entirety of the virtual machine definition. */ - @LangDefinition(ContainerName = "~/VirtualMachine.Definition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -242,7 +249,6 @@ interface Definition extends /** * Grouping of virtual machine definition stages. */ - @LangDefinition(ContainerName = "~/VirtualMachine.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a virtual machine definition. @@ -815,7 +821,6 @@ interface WithCreate extends /** * Grouping of virtual machine update stages. */ - @LangDefinition(ContainerName = "~/VirtualMachine.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the virtual machine definition allowing to specify data disk configuration. @@ -958,7 +963,6 @@ interface WithExtension { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "~/VirtualMachine.Update") interface Update extends Appliable, Resource.UpdateWithTags, 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 23a1e8f499d4..1959e8612d9f 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 @@ -1,6 +1,6 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; @@ -9,7 +9,7 @@ /** * A data disk of a virtual machine. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineDataDisk extends Wrapper, ChildResource { @@ -68,7 +68,6 @@ public interface VirtualMachineDataDisk extends /** * Grouping of data disk definition stages applicable as part of a virtual machine creation. */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a data disk definition. @@ -165,7 +164,6 @@ interface WithAttach extends Attachable.InUpdate { * The entirety of a data disk definition. * @param the return type of the final {@link Attachable#attach()} */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Definition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -175,7 +173,6 @@ interface Definition extends /** * Grouping of data disk definition stages applicable as part of a virtual machine update. */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Update", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true) interface UpdateDefinitionStages { /** * The first stage of a data disk definition. @@ -271,7 +268,6 @@ interface WithAttach extends Attachable.InDefinition { /** The entirety of a data disk definition as part of a virtual machine update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Update", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, @@ -281,7 +277,6 @@ interface UpdateDefinition extends /** * Grouping of data disk update stages. */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Update", ContainerFileName = "IUpdate") interface UpdateStages { /** * Specifies the new size in GB for data disk. @@ -311,7 +306,6 @@ interface UpdateStages { /** * The entirety of a data disk update as part of a virtual machine update. */ - @LangDefinition(ContainerName = "~/VirtualMachineDataDisk.Update") interface Update extends UpdateStages, Settable { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtension.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtension.java index 0a5d10691011..b19ed320dd97 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtension.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtension.java @@ -1,6 +1,5 @@ package com.microsoft.azure.management.compute; - -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ExternalChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -14,7 +13,7 @@ * An immutable client-side representation of an Azure virtual machine extension. * An extension associated with a virtual machine will be created from a {@link VirtualMachineExtensionImage }. */ -@LangDefinition +@Fluent public interface VirtualMachineExtension extends ExternalChildResource, Wrapper { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImage.java index 6cf667ebaaff..caf64f2dd4e2 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImage.java @@ -1,5 +1,6 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; @@ -8,6 +9,7 @@ *

* Note: Azure virtual machine extension image is also referred as virtual machine extension handler. */ +@Fluent public interface VirtualMachineExtensionImage extends Wrapper { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageType.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageType.java index 6b6544d94e45..bcf13416a17c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageType.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageType.java @@ -1,11 +1,13 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; /** * An immutable client-side representation of an Azure virtual machine extension image type. */ +@Fluent public interface VirtualMachineExtensionImageType extends Wrapper { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageTypes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageTypes.java index 00b9f10d46af..b56c5185132c 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageTypes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageTypes.java @@ -1,9 +1,11 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to virtual machine image extension types. */ +@Fluent public interface VirtualMachineExtensionImageTypes extends SupportsListing { } \ No newline at end of file diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java index ea5dee05085e..b08462dc22f4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersion.java @@ -1,11 +1,13 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; /** * An immutable client-side representation of an Azure virtual machine extension image version. */ +@Fluent public interface VirtualMachineExtensionImageVersion extends Wrapper { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersions.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersions.java index ba4c300fcc5d..6973f7ae644d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersions.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImageVersions.java @@ -1,9 +1,11 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to virtual machine image extension versions. */ +@Fluent public interface VirtualMachineExtensionImageVersions extends SupportsListing { } \ No newline at end of file diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImages.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImages.java index a6a80ea663fb..4dbe063656eb 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImages.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineExtensionImages.java @@ -1,10 +1,12 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListingByRegion; /** * Entry point to virtual machine extension image management API. */ +@Fluent public interface VirtualMachineExtensionImages extends SupportsListingByRegion { /** * @return entry point to virtual machine extension image publishers diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java index a57bf77b3007..ef45e4aef0b4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImage.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineImageInner; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; @@ -15,7 +15,7 @@ /** * An immutable client-side representation of an Azure virtual machine image. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineImage extends Wrapper { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java index 5b1a7e68a8b5..eaced37c7321 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImages.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListingByRegion; /** * Entry point to virtual machine image management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineImages extends SupportsListingByRegion { /** diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImagesInSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImagesInSku.java index 3fb591b1c127..5fac8741aec0 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImagesInSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineImagesInSku.java @@ -1,10 +1,10 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to virtual machine sku images. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineImagesInSku extends SupportsListing { } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffer.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffer.java index 192f82183d2a..ceda0158f164 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffer.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffer.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; /** * Represents a virtual machine image offer. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineOffer { /** * @return the region where this virtual machine image offer is available diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffers.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffers.java index d3dbac4920de..d3d11ba7e867 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffers.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineOffers.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to virtual machine image offers. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineOffers extends SupportsListing { } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublisher.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublisher.java index fd5afda6f86b..d0f2c93227a9 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublisher.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublisher.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; /** * Represents a virtual machine image publisher. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachinePublisher { /** * @return the region where virtual machine images from this publisher is available diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublishers.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublishers.java index c1692f1bdb60..9d5defd95587 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublishers.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachinePublishers.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListingByRegion; /** * Entry point to virtual machine image publishers. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachinePublishers extends SupportsListingByRegion { } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSet.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSet.java index 71d2ec540d89..1cc7058ae845 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSet.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSet.java @@ -2,6 +2,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.PagedList; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetInner; import com.microsoft.azure.management.network.Backend; @@ -24,7 +25,7 @@ /** * An immutable client-side representation of an Azure virtual machine scale set. */ -@LangDefinition() +@Fluent public interface VirtualMachineScaleSet extends GroupableResource, Refreshable, @@ -108,7 +109,7 @@ public interface VirtualMachineScaleSet extends CachingTypes osDiskCachingType(); /** - * @return gets the name of the OS disk of virtual machines in the scale set + * @return the name of the OS disk of virtual machines in the scale set */ String osDiskName(); diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtension.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtension.java index ceb12a32f505..d2308cbd5da1 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtension.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetExtension.java @@ -1,5 +1,6 @@ package com.microsoft.azure.management.compute; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetExtensionInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -14,7 +15,7 @@ * An immutable client-side representation of an extension associated with virtual machines in a scale set. * An extension associated with a virtual machine scale set will be created from a {@link VirtualMachineExtensionImage }. */ -@LangDefinition() +@Fluent public interface VirtualMachineScaleSetExtension extends Wrapper, ChildResource { diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSku.java index 1f66e3ee92b5..6d469713a286 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSetSku.java @@ -1,11 +1,11 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; /** * A type representing sku available for virtual machines in a scale set. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineScaleSetSku { /** * @return the type of resource the sku applies to. diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSets.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSets.java index db7b57e0f646..7cb290d53b5f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSets.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineScaleSets.java @@ -1,7 +1,7 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.CloudException; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -16,7 +16,7 @@ /** * Entry point to virtual machine scale set management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineScaleSets extends SupportsListing, SupportsListingByGroup, diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java index 85a03138194e..3034eebe472d 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSize.java @@ -5,12 +5,12 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; /** * A type representing virtual machine size available for a subscription in a region. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineSize { /** * @return the VM size name diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizes.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizes.java index ddbee2edfcc1..a418dfe5cb93 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizes.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSizes.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListingByRegion; /** * Entry point to virtual machine sizes API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineSizes extends SupportsListingByRegion { } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSku.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSku.java index 3f15803b8231..22851bfba2d6 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSku.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSku.java @@ -5,13 +5,13 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; /** * Represents a virtual machine image SKU. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineSku { /** * @return the region where this virtual machine image offer SKU is available diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSkus.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSkus.java index a25a339a29f1..57500d0f0bb4 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSkus.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachineSkus.java @@ -5,12 +5,12 @@ */ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to virtual machine image offer skus. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachineSkus extends SupportsListing { } diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java index 4aca1c10e329..af6eceac6f1b 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/VirtualMachines.java @@ -1,6 +1,6 @@ package com.microsoft.azure.management.compute; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -13,7 +13,7 @@ /** * Entry point to virtual machine management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachines extends SupportsListing, SupportsListingByGroup, diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java index 5d3431b1b077..0d33dda324d8 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineImpl.java @@ -100,7 +100,6 @@ class VirtualMachineImpl private List existingSecondaryNetworkInterfacesToAssociate; // Cached related resources private NetworkInterface primaryNetworkInterface; - private PublicIpAddress primaryPublicIpAddress; private VirtualMachineInstanceView virtualMachineInstanceView; private boolean isMarketplaceLinuxImage; // The data disks associated with the virtual machine @@ -761,11 +760,13 @@ public NetworkInterface primaryNetworkInterface() { } @Override - public PublicIpAddress primaryPublicIpAddress() { - if (this.primaryPublicIpAddress == null) { - this.primaryPublicIpAddress = this.primaryNetworkInterface().primaryPublicIpAddress(); - } - return this.primaryPublicIpAddress; + public PublicIpAddress getPrimaryPublicIpAddress() { + return this.primaryNetworkInterface().primaryIpConfiguration().getPublicIpAddress(); + } + + @Override + public String primaryPublicIpAddressId() { + return this.primaryNetworkInterface().primaryIpConfiguration().publicIpAddressId(); } @Override @@ -1190,7 +1191,6 @@ private String getStatusCodeFromInstanceView(String codePrefix) { private void clearCachedRelatedResources() { this.primaryNetworkInterface = null; - this.primaryPublicIpAddress = null; this.virtualMachineInstanceView = null; } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Backend.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Backend.java index 8bd6a9626062..89dc101bfc09 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Backend.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Backend.java @@ -8,6 +8,9 @@ import java.util.Map; import java.util.Set; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.network.implementation.BackendAddressPoolInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -18,6 +21,7 @@ /** * An immutable client-side representation of an load balancer's backend address pool. */ +@Fluent() public interface Backend extends Wrapper, ChildResource, @@ -32,6 +36,7 @@ public interface Backend extends /** * @return a list of the resource IDs of the virtual machines associated with this backend */ + @LangMethodDefinition(AsType = LangMethodType.Method) Set getVirtualMachineIds(); /** diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Frontend.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Frontend.java index e0d80227c08d..36b1202c5b00 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Frontend.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Frontend.java @@ -7,6 +7,7 @@ import java.util.Map; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.FrontendIPConfigurationInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -15,6 +16,7 @@ /** * An immutable client-side representation of a load balancer frontend. */ +@Fluent() public interface Frontend extends Wrapper, ChildResource, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpProbe.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpProbe.java index f367cdbe2690..5a1b3a6e7913 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpProbe.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpProbe.java @@ -5,12 +5,14 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of an HTTP load balancing probe. */ +@Fluent() public interface HttpProbe extends Probe { /** diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatPool.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatPool.java index 6da91cc07785..dbb489a297fa 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatPool.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatPool.java @@ -5,6 +5,7 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.InboundNatPoolInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFrontend; @@ -17,6 +18,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ +@Fluent() public interface InboundNatPool extends HasFrontend, HasBackendPort, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatRule.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatRule.java index a09317219832..26a4ddfe4a5e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatRule.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/InboundNatRule.java @@ -5,6 +5,7 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.InboundNatRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -18,6 +19,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ +@Fluent() public interface InboundNatRule extends HasFrontend, HasBackendPort, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancer.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancer.java index 18a939d4e319..888fa8c24ab5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancer.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancer.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.LoadBalancerInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.network.model.HasNetworkInterfaces; @@ -23,7 +23,7 @@ /** * Entry point for load balancer management API in Azure. */ -@LangDefinition() +@Fluent() public interface LoadBalancer extends GroupableResource, Refreshable, @@ -33,7 +33,7 @@ public interface LoadBalancer extends // Getters /** - * @return resource IDs of the public IP addresses assigned to the front end of this load balancer + * @return resource IDs of the public IP addresses assigned to the frontends of this load balancer */ List publicIpAddressIds(); @@ -70,7 +70,6 @@ public interface LoadBalancer extends /** * The entirety of the load balancer definition. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -93,7 +92,6 @@ interface Definition extends /** * Grouping of load balancer definition stages. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a load balancer definition. @@ -414,7 +412,6 @@ interface WithInboundNatPool { /** * Grouping of load balancer update stages. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the load balancer update allowing to add or remove backends. @@ -714,7 +711,6 @@ interface WithInboundNatPool { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancers.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancers.java index d2e27b8b62df..a9541b7ea0de 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancers.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancers.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point to load balancer management API in Azure. */ -@LangDefinition() +@Fluent() public interface LoadBalancers extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancingRule.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancingRule.java index 26d58a62daaf..219fa015a9f2 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancingRule.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancingRule.java @@ -5,6 +5,7 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.LoadBalancingRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -18,6 +19,7 @@ /** * An immutable client-side representation of an HTTP load balancing rule. */ +@Fluent() public interface LoadBalancingRule extends Wrapper, ChildResource, @@ -26,8 +28,6 @@ public interface LoadBalancingRule extends HasFloatingIp, HasProtocol { - //TODO: - /* withProbe and return them */ /** * @return the method of load distribution */ diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java index f17768bea6f8..a86c50dfa533 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Network.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.VirtualNetworkInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -21,7 +21,7 @@ /** * Entry point for Virtual Network management API in Azure. */ -@LangDefinition() +@Fluent() public interface Network extends GroupableResource, Refreshable, @@ -52,7 +52,6 @@ public interface Network extends /** * The entirety of the virtual network definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -64,7 +63,6 @@ interface Definition extends /** * Grouping of virtual network definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a virtual network definition. @@ -165,7 +163,6 @@ interface WithCreateAndSubnet extends /** * Grouping of virtual network update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the virtual network update allowing to add or remove subnets. @@ -251,7 +248,6 @@ interface WithAddressSpace { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java index 6351e8518f7c..1f713616a40b 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java @@ -6,7 +6,9 @@ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.network.implementation.NetworkInterfaceInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -22,7 +24,7 @@ /** * Network interface. */ -@LangDefinition() +@Fluent() public interface NetworkInterface extends GroupableResource, Refreshable, @@ -69,29 +71,6 @@ public interface NetworkInterface extends */ List appliedDnsServers(); - /** - * Gets the public IP address associated with this network interface. - *

- * This method makes a rest API call to fetch the public IP. - * - * @return the public IP associated with this network interface - */ - PublicIpAddress primaryPublicIpAddress(); - - /** - * @return the resource id of the virtual network subnet associated with this network interface. - */ - String primarySubnetId(); - - /** - * Gets the virtual network associated this network interface's primary IP configuration. - *

- * This method makes a rest API call to fetch the virtual network. - * - * @return the virtual network associated with this network interface. - */ - Network primaryNetwork(); - /** * Gets the private IP address allocated to this network interface's primary IP configuration. *

@@ -130,6 +109,7 @@ public interface NetworkInterface extends * * @return the network security group associated with this network interface. */ + @LangMethodDefinition(AsType = LangMethodType.Method) NetworkSecurityGroup getNetworkSecurityGroup(); /** @@ -142,7 +122,6 @@ public interface NetworkInterface extends /** * The entirety of the network interface definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -155,7 +134,6 @@ interface Definition extends /** * Grouping of network interface definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the network interface. @@ -376,7 +354,6 @@ interface WithCreate extends /** * Grouping of network interface update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the network interface update allowing to specify subnet. @@ -580,7 +557,6 @@ interface WithIpConfiguration { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaces.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaces.java index cdb333ea9108..51c61a9f8a16 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaces.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterfaces.java @@ -1,6 +1,6 @@ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -13,7 +13,7 @@ /** * Entry point to network interface management. */ -@LangDefinition() +@Fluent() public interface NetworkInterfaces extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroup.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroup.java index 936b9b996633..f7b0e5e8fb77 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroup.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroup.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.NetworkSecurityGroupInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -22,7 +22,7 @@ /** * Network security group. */ -@LangDefinition() +@Fluent() public interface NetworkSecurityGroup extends GroupableResource, Refreshable, @@ -58,7 +58,6 @@ public interface NetworkSecurityGroup extends /** * The entirety of the network security group definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -68,7 +67,6 @@ interface Definition extends /** * Grouping of network security group definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the definition. @@ -114,7 +112,6 @@ interface WithCreate extends /** * Grouping of network security group update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the resource definition allowing to add or remove security rules. @@ -149,7 +146,6 @@ interface WithRule { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroups.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroups.java index d9e824511150..8e47ab56d0d5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroups.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityGroups.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point to network security group management. */ -@LangDefinition() +@Fluent() public interface NetworkSecurityGroups extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityRule.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityRule.java index 778e71800305..ab615fc6550e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityRule.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkSecurityRule.java @@ -5,8 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; -import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.SecurityRuleInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -16,7 +15,7 @@ /** * A network security rule in a network security group. */ -@LangDefinition() +@Fluent() public interface NetworkSecurityRule extends Wrapper, ChildResource { @@ -73,7 +72,6 @@ public interface NetworkSecurityRule extends * The entirety of a network security rule definition. * @param the return type of the final {@link Attachable#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -88,7 +86,6 @@ interface Definition extends /** * Grouping of security rule definition stages applicable as part of a network security group creation. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a security rule definition. @@ -282,7 +279,6 @@ interface WithAttach extends /** The entirety of a network security rule definition as part of a network security group update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithDirectionAccess, @@ -297,7 +293,6 @@ interface UpdateDefinition extends /** * Grouping of security rule definition stages applicable as part of a network security group update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a security rule description as part of an update of a networking security group. @@ -476,7 +471,6 @@ interface WithAttach extends Attachable.InUpdate { /** * The entirety of a security rule update as part of a network security group update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends UpdateStages.WithDirectionAccess, UpdateStages.WithSourceAddress, @@ -505,7 +499,6 @@ interface Update extends /** * Grouping of security rule update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the network rule description allowing the direction and the access type to be specified. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java index cda1a05f1bdd..f1df7656f1c5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Networks.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point to virtual network management API in Azure. */ -@LangDefinition() +@Fluent() public interface Networks extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java index 2bc722b22f85..0c5ee2a4a229 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java @@ -1,9 +1,13 @@ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; +import com.microsoft.azure.management.network.model.HasPublicIpAddress; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasSubnet; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; @@ -12,33 +16,19 @@ /** * An IP configuration in a network interface. */ -@LangDefinition() +@Fluent() public interface NicIpConfiguration extends Wrapper, ChildResource, - HasPrivateIpAddress { + HasPrivateIpAddress, + HasPublicIpAddress, + HasSubnet { // Getters /** - * Gets the resource id of the public IP address associated with this IP configuration. - * - * @return public IP resource ID or null if there is no public IP associated - */ - String publicIpAddressId(); - - /** - * @return the public IP associated with this IP configuration or null if there is no public IP associated - */ - PublicIpAddress getPublicIpAddress(); - - /** - * @return the resource id of the virtual network subnet associated with this IP configuration. - */ - String subnetId(); - - /** - * @return the virtual network associated with this this IP configuration. + * @return the virtual network associated with this IP configuration */ + @LangMethodDefinition(AsType = LangMethodType.Method) Network getNetwork(); /** @@ -52,7 +42,6 @@ public interface NicIpConfiguration extends * The entirety of the network interface IP configuration definition. * @param the return type of the final {@link Attachable#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -65,7 +54,6 @@ interface Definition extends * Grouping of network interface IP configuration definition stages applicable as part of a * network interface update. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -160,44 +148,7 @@ interface WithSubnet { * * @param the return type of the final {@link Attachable#attach()} */ - interface WithPublicIpAddress { - /** - * Create a new public IP address to associate with the network interface IP configuration, - * based on the provided definition. - * - * @param creatable a creatable definition for a new public IP - * @return the next stage of the network interface IP configuration definition - */ - WithAttach withNewPublicIpAddress(Creatable creatable); - - /** - * Creates a new public IP address in the same region and group as the resource and associate it - * with with the network interface IP configuration. - *

- * The internal name and DNS label for the public IP address will be derived from the network interface name. - * - * @return the next stage of the network interface IP configuration definition - */ - WithAttach withNewPublicIpAddress(); - - /** - * Creates a new public IP address in the same region and group as the resource, with the specified DNS label - * and associate it with the network interface IP configuration. - *

- * The internal name for the public IP address will be derived from the DNS label. - * - * @param leafDnsLabel the leaf domain label - * @return tthe next stage of the IP configuration definition - */ - WithAttach withNewPublicIpAddress(String leafDnsLabel); - - /** - * Associates an existing public IP address with the network interface IP configuration. - * - * @param publicIpAddress an existing public IP address - * @return the next stage of the IP configuration definition - */ - WithAttach withExistingPublicIpAddress(PublicIpAddress publicIpAddress); + interface WithPublicIpAddress extends HasPublicIpAddress.DefinitionStages.WithPublicIpAddress> { } /** @@ -218,7 +169,6 @@ interface WithAttach /** The entirety of a network interface IP configuration definition as part of a network interface update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, @@ -231,7 +181,6 @@ interface UpdateDefinition extends /** * Grouping of network interface IP configuration definition stages. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true) interface UpdateDefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -326,44 +275,7 @@ interface WithSubnet { * * @param the return type of the final {@link Attachable#attach()} */ - interface WithPublicIpAddress { - /** - * Create a new public IP address to associate with the network interface IP configuration, - * based on the provided definition. - * - * @param creatable a creatable definition for a new public IP - * @return the next stage of the network interface IP configuration definition - */ - WithAttach withNewPublicIpAddress(Creatable creatable); - - /** - * Creates a new public IP address in the same region and group as the resource and associate it - * with with the network interface IP configuration. - *

- * The internal name and DNS label for the public IP address will be derived from the network interface name. - * - * @return the next stage of the network interface IP configuration definition - */ - WithAttach withNewPublicIpAddress(); - - /** - * Creates a new public IP address in the same region and group as the resource, with the specified DNS label - * and associate it with the network interface IP configuration. - *

- * The internal name for the public IP address will be derived from the DNS label. - * - * @param leafDnsLabel the leaf domain label - * @return tthe next stage of the IP configuration definition - */ - WithAttach withNewPublicIpAddress(String leafDnsLabel); - - /** - * Associates an existing public IP address with the network interface IP configuration. - * - * @param publicIpAddress an existing public IP address - * @return the next stage of the IP configuration definition - */ - WithAttach withExistingPublicIpAddress(PublicIpAddress publicIpAddress); + interface WithPublicIpAddress extends HasPublicIpAddress.UpdateDefinitionStages.WithPublicIpAddress> { } /** @@ -384,7 +296,6 @@ interface WithAttach /** * The entirety of a network interface IP configuration update as part of a network interface update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Settable, UpdateStages.WithSubnet, @@ -397,7 +308,6 @@ interface Update extends /** * Grouping of network interface IP configuration update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the network interface IP configuration update allowing to specify subnet. @@ -427,48 +337,7 @@ interface WithPrivateIp extends HasPrivateIpAddress.UpdateStages.WithPrivateIpAd /** * The stage of the network interface IP configuration update allowing to specify public IP address. */ - interface WithPublicIpAddress { - /** - * Create a new public IP address to associate the network interface IP configuration with, - * based on the provided definition. - *

- * If there is public IP associated with the IP configuration then that will be removed in - * favour of this. - * - * @param creatable a creatable definition for a new public IP - * @return the next stage of the network interface IP configuration update - */ - Update withNewPublicIpAddress(Creatable creatable); - - /** - * Creates a new public IP address in the same region and group as the resource and associate it - * with the IP configuration. - *

- * The internal name and DNS label for the public IP address will be derived from the network interface - * name, if there is an existing public IP association then that will be removed in favour of this. - * - * @return the next stage of the network interface IP configuration update - */ - Update withNewPublicIpAddress(); - - /** - * Creates a new public IP address in the same region and group as the resource, with the specified DNS - * label and associate it with the IP configuration. - *

- * The internal name for the public IP address will be derived from the DNS label, if there is an existing - * public IP association then that will be removed in favour of this - * - * @param leafDnsLabel the leaf domain label - * @return the next stage of the network interface IP configuration update - */ - Update withNewPublicIpAddress(String leafDnsLabel); - - /** - * Specifies that remove any public IP associated with the IP configuration. - * - * @return the next stage of the network interface IP configuration update - */ - Update withoutPublicIpAddress(); + interface WithPublicIpAddress extends HasPublicIpAddress.UpdateStages.WithPublicIpAddress { } /** diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PrivateFrontend.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PrivateFrontend.java index ae9164ab6c37..f0ef7c2831a7 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PrivateFrontend.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PrivateFrontend.java @@ -5,26 +5,20 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasSubnet; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of a private frontend of an internal load balancer. */ +@Fluent() public interface PrivateFrontend extends Frontend, - HasPrivateIpAddress { - - /** - * @return the resource ID of the virtual network whose subnet is associated with this frontend - */ - String networkId(); - - /** - * @return the name of the subnet associated with this frontend - */ - String subnetName(); + HasPrivateIpAddress, + HasSubnet { /** * @return the private IP allocation method within the associated subnet for this private frontend @@ -46,7 +40,7 @@ interface Blank extends WithSubnet { * The stage of a private frontend definition allowing to specify a subnet from the selected network. * @param the next stage of the parent definition */ - interface WithSubnet { + interface WithSubnet extends HasSubnet.DefinitionStages.WithSubnet> { /** * Assigns the specified subnet to this private frontend of an internal load balancer. * @param network the virtual network the subnet exists in diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Probe.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Probe.java index dd926afb48f2..1238eae6c02e 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Probe.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Probe.java @@ -5,6 +5,7 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.ProbeInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.network.model.HasProtocol; @@ -14,6 +15,7 @@ /** * An immutable client-side representation of a load balancing probe. */ +@Fluent() public interface Probe extends Wrapper, ChildResource, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicFrontend.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicFrontend.java index 8a45d8fb6164..f7afc1561f19 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicFrontend.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicFrontend.java @@ -5,18 +5,18 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.network.model.HasPublicIpAddress; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of a public frontend of an Internet-facing load balancer. */ -public interface PublicFrontend extends Frontend { - - /** - * @return the resource ID of the public IP address associated with this frontend - */ - String publicIpAddressId(); +@Fluent() +public interface PublicFrontend extends + Frontend, + HasPublicIpAddress { /** * Grouping of public frontend definition stages. @@ -33,20 +33,7 @@ interface Blank extends WithPublicIpAddress { * The stage of a public frontend definition allowing to specify an existing public IP address. * @param the return type of the final {@link WithAttach#attach()} */ - interface WithPublicIpAddress { - /** - * Associates the specified existing public IP address with this public frontend of the Internet-facing load balancer. - * @param pip a public IP address - * @return the next stage of the definition - */ - WithAttach withExistingPublicIpAddress(PublicIpAddress pip); - - /** - * Associates the specified existing public IP address with this public frontend of the intrenet-facing load balancer. - * @param resourceId the resource ID of an existing public IP address - * @return the next stage of the definition - */ - WithAttach withExistingPublicIpAddress(String resourceId); + interface WithPublicIpAddress extends HasPublicIpAddress.DefinitionStages.WithExistingPublicIpAddress> { } /** @@ -77,20 +64,7 @@ interface UpdateStages { /** * The stage of a public frontend update allowing to specify an existing public IP address. */ - interface WithPublicIpAddress { - /** - * Associates the specified existing public IP address with this public frontend of the Internet-facing load balancer. - * @param pip a public IP address - * @return the next stage of the update - */ - Update withExistingPublicIpAddress(PublicIpAddress pip); - - /** - * Associates the specified existing public IP address with this public frontend of the Internet-facing load balancer. - * @param resourceId the resource ID of an existing public IP address - * @return the next stage of the update - */ - Update withExistingPublicIpAddress(String resourceId); + interface WithPublicIpAddress extends HasPublicIpAddress.UpdateStages.WithExistingPublicIpAddress { } } @@ -117,20 +91,7 @@ interface Blank extends WithPublicIpAddress { * The stage of a public frontend definition allowing to specify an existing public IP address. * @param the return type of the final {@link WithAttach#attach()} */ - interface WithPublicIpAddress { - /** - * Associates the specified existing public IP address with this frontend of the load balancer. - * @param pip a public IP address - * @return the next stage of the definition - */ - WithAttach withExistingPublicIpAddress(PublicIpAddress pip); - - /** - * Associates the specified existing public IP address with this public frontend of the Internet-facing load balancer. - * @param resourceId the resource ID of an existing public IP address - * @return the next stage of the definition - */ - WithAttach withExistingPublicIpAddress(String resourceId); + interface WithPublicIpAddress extends HasPublicIpAddress.UpdateDefinitionStages.WithExistingPublicIpAddress> { } /** The final stage of the public frontend definition. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java index 076313f066b7..3ec595621372 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddress.java @@ -5,7 +5,9 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.network.implementation.PublicIPAddressInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -18,7 +20,7 @@ /** * Public IP address. */ -@LangDefinition() +@Fluent() public interface PublicIpAddress extends GroupableResource, Refreshable, @@ -65,6 +67,7 @@ public interface PublicIpAddress extends /** * @return the load balancer public frontend that this public IP address is assigned to */ + @LangMethodDefinition(AsType = LangMethodType.Method) PublicFrontend getAssignedLoadBalancerFrontend(); /** @@ -75,6 +78,7 @@ public interface PublicIpAddress extends /** * @return the network interface IP configuration that this public IP address is assigned to */ + @LangMethodDefinition(AsType = LangMethodType.Method) NicIpConfiguration getAssignedNetworkInterfaceIpConfiguration(); /** @@ -85,7 +89,6 @@ public interface PublicIpAddress extends /** * Container interface for all the definitions. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -95,7 +98,6 @@ interface Definition extends /** * Grouping of public IP address definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a public IP address definition. @@ -209,7 +211,6 @@ interface WithCreate extends *

* Use {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Appliable, UpdateStages.WithIpAddress, @@ -222,7 +223,6 @@ interface Update extends /** * Grouping of public IP address update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * A public IP address update allowing to change the IP allocation method (static or dynamic). diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java index 8be7456b2911..c5d58c91c44c 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/PublicIpAddresses.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point to public IP address management. */ -@LangDefinition() +@Fluent() public interface PublicIpAddresses extends SupportsListing, SupportsCreating, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java index 3d3fe90ff363..af5ab4b63623 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java @@ -5,7 +5,7 @@ */ package com.microsoft.azure.management.network; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.network.implementation.SubnetInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -15,7 +15,7 @@ /** * An immutable client-side representation of a subnet of a virtual network. */ -@LangDefinition() +@Fluent() public interface Subnet extends Wrapper, ChildResource { @@ -35,7 +35,6 @@ public interface Subnet extends /** * Grouping of subnet definition stages. */ - @LangDefinition(ContainerName = "~/Subnet.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the subnet definition. @@ -92,7 +91,6 @@ interface WithAttach extends /** The entirety of a Subnet definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "~/Subnet.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAddressPrefix, @@ -102,7 +100,6 @@ interface Definition extends /** * Grouping of subnet update stages. */ - @LangDefinition(ContainerName = "~/Subnet.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the subnet update allowing to change the address space for the subnet. @@ -139,7 +136,6 @@ interface WithNetworkSecurityGroup { /** * The entirety of a subnet update as part of a network update. */ - @LangDefinition(ContainerName = "~/Subnet.Update", ContainerFileName = "IUpdate") interface Update extends UpdateStages.WithAddressPrefix, UpdateStages.WithNetworkSecurityGroup, @@ -149,7 +145,6 @@ interface Update extends /** * Grouping of subnet definition stages applicable as part of a virtual network update. */ - @LangDefinition(ContainerName = "~/Subnet.UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true) interface UpdateDefinitionStages { /** * The first stage of the subnet definition. @@ -206,7 +201,6 @@ interface WithAttach extends /** The entirety of a subnet definition as part of a virtual network update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "~/Subnet.UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAddressPrefix, diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TcpProbe.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TcpProbe.java index 2332d227d164..6da713235813 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TcpProbe.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TcpProbe.java @@ -5,12 +5,14 @@ */ package com.microsoft.azure.management.network; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of a TCP load balancing probe. */ +@Fluent() public interface TcpProbe extends Probe { /** diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendImpl.java index d2d133377f6e..fd603d789829 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendImpl.java @@ -13,6 +13,7 @@ import com.microsoft.azure.CloudException; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Backend; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancingRule; @@ -23,6 +24,7 @@ /** * Implementation for {@link Backend}. */ +@LangDefinition class BackendImpl extends ChildResourceImpl implements diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java index c034669e2a2f..550352fc3698 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java @@ -10,6 +10,7 @@ import java.util.TreeMap; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Frontend; import com.microsoft.azure.management.network.IPAllocationMethod; import com.microsoft.azure.management.network.InboundNatPool; @@ -26,6 +27,7 @@ /** * Implementation for {@link PublicFrontend}. */ +@LangDefinition class FrontendImpl extends ChildResourceImpl implements @@ -142,10 +144,16 @@ public Map inboundNatRules() { @Override public FrontendImpl withExistingSubnet(Network network, String subnetName) { + return this.withExistingSubnet(network.id(), subnetName); + } + + @Override + public FrontendImpl withExistingSubnet(String parentNetworkResourceId, String subnetName) { SubResource subnetRef = new SubResource() - .withId(network.id() + "/subnets/" + subnetName); - this.inner().withSubnet(subnetRef); - this.inner().withPublicIPAddress(null); // Ensure no conflicting public and private settings + .withId(parentNetworkResourceId + "/subnets/" + subnetName); + this.inner() + .withSubnet(subnetRef) + .withPublicIPAddress(null); // Ensure no conflicting public and private settings return this; } @@ -167,6 +175,12 @@ public FrontendImpl withExistingPublicIpAddress(String resourceId) { return this; } + @Override + public FrontendImpl withoutPublicIpAddress() { + this.inner().withPublicIPAddress(null); + return this; + } + @Override public FrontendImpl withPrivateIpAddressDynamic() { this.inner() @@ -195,4 +209,14 @@ public FrontendImpl withPrivateIpAddressStatic(String ipAddress) { public LoadBalancerImpl attach() { return this.parent().withFrontend(this); } + + @Override + public PublicIpAddress getPublicIpAddress() { + final String pipId = this.publicIpAddressId(); + if (pipId == null) { + return null; + } else { + return this.parent().manager().publicIpAddresses().getById(pipId); + } + } } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolImpl.java index 79ff88ebe00d..814458b90172 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatPoolImpl.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Frontend; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.LoadBalancer; @@ -16,6 +17,7 @@ /** * Implementation for {@link InboundNatRule}. */ +@LangDefinition class InboundNatPoolImpl extends ChildResourceImpl implements diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleImpl.java index 580411c0336d..d7a46541d8cb 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/InboundNatRuleImpl.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Frontend; import com.microsoft.azure.management.network.InboundNatRule; import com.microsoft.azure.management.network.LoadBalancer; @@ -16,6 +17,7 @@ /** * Implementation for {@link InboundNatRule}. */ +@LangDefinition class InboundNatRuleImpl extends ChildResourceImpl implements diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java index 72cab0f153f2..3850521d12d4 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerImpl.java @@ -19,6 +19,7 @@ import com.microsoft.azure.management.network.NicIpConfiguration; import com.microsoft.azure.management.network.Probe; import com.microsoft.azure.management.network.ProbeProtocol; +import com.microsoft.azure.management.network.PublicFrontend; import com.microsoft.azure.management.network.PublicIpAddress; import com.microsoft.azure.management.network.PublicIpAddress.DefinitionStages.WithGroup; import com.microsoft.azure.management.network.TcpProbe; @@ -663,12 +664,10 @@ public Map loadBalancingRules() { @Override public List publicIpAddressIds() { List publicIpAddressIds = new ArrayList<>(); - if (this.inner().frontendIPConfigurations() != null) { - for (FrontendIPConfigurationInner frontEndIpConfig : this.inner().frontendIPConfigurations()) { - SubResource pipReference = frontEndIpConfig.publicIPAddress(); - if (pipReference != null) { - publicIpAddressIds.add(frontEndIpConfig.publicIPAddress().id()); - } + for (Frontend frontend : this.frontends().values()) { + if (frontend.isPublic()) { + String pipId = ((PublicFrontend) frontend).publicIpAddressId(); + publicIpAddressIds.add(pipId); } } return Collections.unmodifiableList(publicIpAddressIds); diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleImpl.java index e297d44dece1..494bdc1835aa 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancingRuleImpl.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.Backend; import com.microsoft.azure.management.network.Frontend; import com.microsoft.azure.management.network.LoadBalancer; @@ -19,6 +20,7 @@ /** * Implementation for {@link LoadBalancingRule}. */ +@LangDefinition class LoadBalancingRuleImpl extends ChildResourceImpl implements diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java index 3d3a516f0b8a..81a1ade60a7a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NetworkInterfaceImpl.java @@ -60,8 +60,6 @@ class NetworkInterfaceImpl // reference to an network security group to be associated with the network interface private NetworkSecurityGroup existingNetworkSecurityGroupToAssociate; // Cached related resources. - private PublicIpAddress primaryPublicIp; - private Network primaryNetwork; private NetworkSecurityGroup networkSecurityGroup; NetworkInterfaceImpl(String name, @@ -279,27 +277,6 @@ public List dnsServers() { return this.dnsServerIps(); } - @Override - public PublicIpAddress primaryPublicIpAddress() { - if (this.primaryPublicIp == null) { - this.primaryPublicIp = this.primaryIpConfiguration().getPublicIpAddress(); - } - return primaryPublicIp; - } - - @Override - public String primarySubnetId() { - return this.primaryIpConfiguration().subnetId(); - } - - @Override - public Network primaryNetwork() { - if (this.primaryNetwork == null) { - this.primaryNetwork = this.primaryIpConfiguration().getNetwork(); - } - return this.primaryNetwork; - } - @Override public String primaryPrivateIp() { return this.primaryIpConfiguration().privateIpAddress(); @@ -396,8 +373,6 @@ private NicIpConfigurationImpl prepareNewNicIpConfiguration(String name) { } private void clearCachedRelatedResources() { - this.primaryPublicIp = null; - this.primaryNetwork = null; this.networkSecurityGroup = null; this.nicPrimaryIpConfiguration = null; } diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java index dfee7acc9232..45adde7127f5 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java @@ -45,7 +45,7 @@ class NicIpConfigurationImpl private Network existingVirtualNetworkToAssociate; // Reference to an existing public IP to be associated with the ip configuration - private PublicIpAddress existingPublicIpAddressToAssociate; + private String existingPublicIpAddressIdToAssociate; // Name of an existing subnet to be associated with a new or existing ip configuration private String subnetToAssociate; @@ -106,15 +106,29 @@ public PublicIpAddress getPublicIpAddress() { } @Override - public String subnetId() { - return this.inner().subnet().id(); + public String subnetName() { + SubResource subnetRef = this.inner().subnet(); + if (subnetRef != null) { + return ResourceUtils.nameFromResourceId(subnetRef.id()); + } else { + return null; + } + } + + @Override + public String networkId() { + SubResource subnetRef = this.inner().subnet(); + if (subnetRef != null) { + return ResourceUtils.parentResourcePathFromResourceId(subnetRef.id()); + } else { + return null; + } } @Override public Network getNetwork() { - String id = subnetId(); - return this.networkManager.networks().getByGroup(ResourceUtils.groupFromResourceId(id), - ResourceUtils.extractFromResourceId(id, "virtualNetworks")); + String id = this.networkId(); + return this.networkManager.networks().getById(id); } @Override @@ -201,7 +215,12 @@ public NicIpConfigurationImpl withNewPublicIpAddress(String leafDnsLabel) { @Override public NicIpConfigurationImpl withExistingPublicIpAddress(PublicIpAddress publicIpAddress) { - this.existingPublicIpAddressToAssociate = publicIpAddress; + return this.withExistingPublicIpAddress(publicIpAddress.id()); + } + + @Override + public NicIpConfigurationImpl withExistingPublicIpAddress(String resourceId) { + this.existingPublicIpAddressIdToAssociate = resourceId; return this; } @@ -316,31 +335,23 @@ private SubnetInner subnetToAssociate() { * @return public ip SubResource */ private SubResource publicIpToAssociate() { + String pipId = null; if (this.removePrimaryPublicIPAssociation) { return null; + } else if (this.creatablePublicIpKey != null) { + pipId = ((PublicIpAddress) this.parent() + .createdDependencyResource(this.creatablePublicIpKey)).id(); + } else if (this.existingPublicIpAddressIdToAssociate != null) { + pipId = this.existingPublicIpAddressIdToAssociate; } - PublicIPAddressInner publicIPAddressInner = null; - if (this.creatablePublicIpKey != null) { - PublicIpAddress publicIpAddress = (PublicIpAddress) this.parent() - .createdDependencyResource(this.creatablePublicIpKey); - publicIPAddressInner = publicIpAddress.inner(); - } - - if (this.existingPublicIpAddressToAssociate != null) { - publicIPAddressInner = this.existingPublicIpAddressToAssociate.inner(); - } - - if (publicIPAddressInner != null) { - SubResource subResource = new SubResource(); - subResource.withId(publicIPAddressInner.id()); - return subResource; - } - - if (!this.isInCreateMode) { + if (pipId != null) { + return new SubResource().withId(pipId); + } else if (!this.isInCreateMode) { return this.inner().publicIPAddress(); + } else { + return null; } - return null; } @Override diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeImpl.java index c794ad3da2b1..c0f0673bc6a0 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeImpl.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeImpl.java @@ -10,6 +10,7 @@ import java.util.TreeMap; import com.microsoft.azure.SubResource; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.HttpProbe; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancingRule; @@ -21,6 +22,7 @@ /** * Implementation for {@link TcpProbe} and its create and update interfaces. */ +@LangDefinition class ProbeImpl extends ChildResourceImpl implements diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasBackendPort.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasBackendPort.java index b714245397a0..3e70ff673353 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasBackendPort.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasBackendPort.java @@ -5,9 +5,13 @@ */ package com.microsoft.azure.management.network.model; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; + /** * An interface representing a model's ability to reference a load balancer backend port. */ +@LangDefinition() public interface HasBackendPort { /** * @return the backend port number the network traffic is sent to @@ -17,6 +21,11 @@ public interface HasBackendPort { /** * Grouping of definition stages involving specifying a backend port. */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to specify the backend port. @@ -37,6 +46,11 @@ interface WithBackendPort { /** * Grouping of update stages involving modifying a backend port. */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an update allowing to modify the backend port. @@ -55,6 +69,11 @@ interface WithBackendPort { /** * Grouping of definition stages applicable as part of a load balancer update, involving modifying the backend port. */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to specify the backend port. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFloatingIp.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFloatingIp.java index 8b2615408ad5..7e3e40d57cfe 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFloatingIp.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFloatingIp.java @@ -5,9 +5,13 @@ */ package com.microsoft.azure.management.network.model; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; + /** * An interface representing a model's ability to have floating IP support. */ +@LangDefinition() public interface HasFloatingIp { /** * @return the state of the floating IP enablement @@ -17,6 +21,11 @@ public interface HasFloatingIp { /** * Grouping of definition stages involving enabling or disabling floating IP support. */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to control floating IP support. @@ -47,6 +56,11 @@ interface WithFloatingIp { /** * Grouping of update stages involving enabling or disabling floating IP support. */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a definition allowing to control floating IP support. @@ -78,6 +92,11 @@ interface WithFloatingIp { /** * Grouping of definition stages applicable as part of a load balancer update, involving enabling or disabling floating IP support. */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to control floating IP support. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFrontend.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFrontend.java index 685a661e4a9d..4cbe3a0b6a2a 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFrontend.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasFrontend.java @@ -5,11 +5,14 @@ */ package com.microsoft.azure.management.network.model; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; import com.microsoft.azure.management.network.Frontend; /** * An interface representing a model's ability to references a load balancer frontend. */ +@LangDefinition() public interface HasFrontend { /** * @return the associated frontend @@ -19,6 +22,11 @@ public interface HasFrontend { /** * Grouping of definition stages involving specifying the frontend. */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to specify a load balancer frontend. @@ -37,6 +45,11 @@ interface WithFrontend { /** * Grouping of update stages involving specifying the frontend. */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an update allowing to specify a frontend. @@ -55,6 +68,11 @@ interface WithFrontend { /** * Grouping of definition stages applicable as part of a load balancer update. */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to specify a frontend from this load balancer to associate. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasLoadBalancingRules.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasLoadBalancingRules.java index e2025d9a9afb..7f85020203df 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasLoadBalancingRules.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasLoadBalancingRules.java @@ -7,11 +7,13 @@ import java.util.Map; +import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.network.LoadBalancingRule; /** * An interface representing a model's ability to reference load balancing rules. */ +@LangDefinition() public interface HasLoadBalancingRules { /** * @return the associated load balancing rules from this load balancer, indexed by their names diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPrivateIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPrivateIpAddress.java index 13e638e7a262..e8dd1972e277 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPrivateIpAddress.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPrivateIpAddress.java @@ -5,14 +5,17 @@ */ package com.microsoft.azure.management.network.model; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; import com.microsoft.azure.management.network.IPAllocationMethod; /** * An interface representing a model's ability to reference a private IP address. */ +@LangDefinition() public interface HasPrivateIpAddress { /** - * @return the protocol + * @return the private IP address associated with this resource */ String privateIpAddress(); @@ -24,6 +27,11 @@ public interface HasPrivateIpAddress { /** * Grouping of definition stages involving specifying the private IP address. */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to specify the private IP address. @@ -48,6 +56,11 @@ interface WithPrivateIpAddress { /** * Grouping of update stages involving modifying the private IP address. */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an update allowing to modify the private IP address. @@ -72,6 +85,11 @@ interface WithPrivateIpAddress { /** * Grouping of definition stages applicable as part of a parent resource update, involving specifying the private IP address. */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to specify the private IP address. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasProtocol.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasProtocol.java index c09a13d941a6..6b8c19a8c277 100644 --- a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasProtocol.java +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasProtocol.java @@ -5,10 +5,14 @@ */ package com.microsoft.azure.management.network.model; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; + /** * An interface representing a model's ability to reference a transport protocol. * @param the protocol type of the value */ +@LangDefinition() public interface HasProtocol { /** * @return the protocol @@ -18,6 +22,11 @@ public interface HasProtocol { /** * Grouping of definition stages involving specifying the protocol. */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to specify the protocol. @@ -37,6 +46,11 @@ interface WithProtocol { /** * Grouping of update stages involving modifying the protocol. */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an update allowing to modify the transport protocol. @@ -53,10 +67,14 @@ interface WithProtocol { } } - /** * Grouping of definition stages applicable as part of a load balancer update, involving specifying the protocol. */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to specify the protocol. diff --git a/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java new file mode 100644 index 000000000000..6addec9d2473 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java @@ -0,0 +1,268 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ +package com.microsoft.azure.management.network.model; + +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; +import com.microsoft.azure.management.network.PublicIpAddress; +import com.microsoft.azure.management.resources.fluentcore.model.Creatable; + +/** + * An interface representing a model's ability to reference a public IP address. + */ +@LangDefinition() +public interface HasPublicIpAddress { + /** + * @return the resource ID of the associated public IP address + */ + String publicIpAddressId(); + + /** + * @return the associated public IP address + */ + PublicIpAddress getPublicIpAddress(); + + /** + * Grouping of definition stages involving specifying the public IP address. + */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + interface DefinitionStages { + /** + * The stage of the definition allowing to associate the resource with an existing public IP address. + * + * @param the next stage of the definition + */ + interface WithExistingPublicIpAddress { + /** + * Associates an existing public IP address with the resource. + * + * @param publicIpAddress an existing public IP address + * @return the next stage of the definition + */ + ReturnT withExistingPublicIpAddress(PublicIpAddress publicIpAddress); + + /** + * Associates an existing public IP address with the resource. + * + * @param resourceId the resource ID of an existing public IP address + * @return the next stage of the definition + */ + ReturnT withExistingPublicIpAddress(String resourceId); + } + + /** + * The stage of the definition allowing to associate the resource with a new public IP address. + * + * @param the next stage of the definition + */ + interface WithNewPublicIpAddress { + /** + * Creates a new public IP address to associate with the resource. + * + * @param creatable a creatable definition for a new public IP + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(Creatable creatable); + + /** + * Creates a new public IP address in the same region and group as the resource and associates it with the resource. + *

+ * The internal name and DNS label for the public IP address will be derived from the resource's name. + * + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(); + + /** + * Creates a new public IP address in the same region and group as the resource, with the specified DNS label + * and associates it with the resource. + *

+ * The internal name for the public IP address will be derived from the DNS label. + * + * @param leafDnsLabel the leaf domain label + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(String leafDnsLabel); + } + + /** + * The stage of the definition allowing to associate the resource with a public IP address. + * + * @param the next stage of the definition + */ + interface WithPublicIpAddress extends + WithExistingPublicIpAddress, + WithNewPublicIpAddress { + } + } + + /** + * Grouping of update stages involving modifying an existing reference to a public IP address. + */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + interface UpdateStages { + /** + * The stage definition allowing to associate the resource with an existing public IP address. + * + * @param the next stage of the update + */ + interface WithExistingPublicIpAddress { + /** + * Associates an existing public IP address with the resource. + * + * @param publicIpAddress an existing public IP address + * @return the next stage of the update + */ + ReturnT withExistingPublicIpAddress(PublicIpAddress publicIpAddress); + + /** + * Associates an existing public IP address with the resource. + * + * @param resourceId the resource ID of an existing public IP address + * @return the next stage of the definition + */ + ReturnT withExistingPublicIpAddress(String resourceId); + + /** + * Removes the existing reference to a public IP address. + * + * @return the next stage of the update. + */ + ReturnT withoutPublicIpAddress(); + } + + /** + * The stage definition allowing to associate the resource with a new public IP address. + * + * @param the next stage of the update + */ + interface WithNewPublicIpAddress { + /** + * Creates a new public IP address to associate with the resource, based on the provided definition. + * + * @param creatable a creatable definition for a new public IP address + * @return the next stage of the update + */ + ReturnT withNewPublicIpAddress(Creatable creatable); + + /** + * Creates a new public IP address in the same region and group as the resource and associates it with the resource. + *

+ * The internal name and DNS label for the public IP address will be derived from the resource's name. + * + * @return the next stage of the update + */ + ReturnT withNewPublicIpAddress(); + + /** + * Creates a new public IP address in the same region and group as the resource, with the specified DNS label + * and associates it with the resource. + *

+ * The internal name for the public IP address will be derived from the DNS label. + * + * @param leafDnsLabel the leaf domain label + * @return the next stage of the update + */ + ReturnT withNewPublicIpAddress(String leafDnsLabel); + } + + /** + * The stage definition allowing to associate the resource with a public IP address. + * + * @param the next stage of the update + */ + interface WithPublicIpAddress extends + WithExistingPublicIpAddress, + WithNewPublicIpAddress { + } + } + + /** + * Grouping of definition stages applicable as part of a parent resource update, involving specifying a public IP address. + */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + interface UpdateDefinitionStages { + /** + * The stage of the definition allowing to associate the resource with an existing public IP address. + * + * @param the next stage of the definition + */ + interface WithExistingPublicIpAddress { + /** + * Associates an existing public IP address with the resource. + * + * @param publicIpAddress an existing public IP address + * @return the next stage of the definition + */ + ReturnT withExistingPublicIpAddress(PublicIpAddress publicIpAddress); + + /** + * Associates an existing public IP address with the resource. + * + * @param resourceId the resource ID of an existing public IP address + * @return the next stage of the definition + */ + ReturnT withExistingPublicIpAddress(String resourceId); + } + + /** + * The stage of the definition allowing to associate the resource with a new public IP address. + * + * @param the next stage of the definition + */ + interface WithNewPublicIpAddress { + /** + * Creates a new public IP address to associate with the resource, based on the provided definition. + * + * @param creatable a creatable definition for a new public IP address + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(Creatable creatable); + + /** + * Creates a new public IP address in the same region and group as the resource and associates it with the resource. + *

+ * The internal name and DNS label for the public IP address will be derived from the resource's name. + * + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(); + + /** + * Creates a new public IP address in the same region and group as the resource, with the specified DNS label + * and associates it with the resource. + *

+ * The internal name for the public IP address will be derived from the DNS label. + * + * @param leafDnsLabel the leaf domain label + * @return the next stage of the definition + */ + ReturnT withNewPublicIpAddress(String leafDnsLabel); + } + + /** + * The stage of the definition allowing to associate the resource with a public IP address. + * + * @param the next stage of the definition + */ + interface WithPublicIpAddress extends + WithExistingPublicIpAddress, + WithNewPublicIpAddress { + } + } +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java index a2a223a9dcc4..d199599caea9 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployment.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangMethodDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.resources.fluentcore.arm.Region; @@ -25,7 +25,7 @@ /** * An immutable client-side representation of an Azure deployment. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Deployment extends Refreshable, Updatable, @@ -118,7 +118,6 @@ public interface Deployment extends /** * Container interface for all the deployment definitions. */ - @LangDefinition(ContainerName = "~/Deployment.Definition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -131,7 +130,6 @@ interface Definition extends /** * Grouping of all the deployment definition stages. */ - @LangDefinition(ContainerName = "~/Deployment.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of deployment definition. @@ -245,7 +243,6 @@ interface WithCreate extends Creatable { /** * Grouping of all the deployment updates stages. */ - @LangDefinition(ContainerName = "~/Deployment.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * A deployment update allowing to change the deployment mode. @@ -329,7 +326,6 @@ interface WithParameters { *

* Call {@link Update#apply()} to apply the changes to the deployment in Azure. */ - @LangDefinition(ContainerName = "~/Deployment.Update") interface Update extends Appliable, UpdateStages.WithTemplate, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExportResult.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExportResult.java index e663bbecbcca..b95484303e72 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExportResult.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentExportResult.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.DeploymentExportResultInner; /** * An immutable client-side representation of an Azure deployment template export result. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface DeploymentExportResult extends Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperation.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperation.java index 947df7a40693..4121eb46fc77 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperation.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperation.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; @@ -16,7 +16,7 @@ /** * An immutable client-side representation of a deployment operation. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface DeploymentOperation extends Indexable, Refreshable, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperations.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperations.java index 976e36202502..2b334b2b134f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperations.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/DeploymentOperations.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to deployment operation management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface DeploymentOperations extends SupportsListing, SupportsGettingById { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java index 0b4f2558f7f3..5b3c5b294160 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Deployments.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point to template deployment in Azure. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Deployments extends SupportsCreating, SupportsListing, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Feature.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Feature.java index 38fd29781e0d..f2622f3c0f93 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Feature.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Feature.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.FeatureResultInner; @@ -14,7 +14,7 @@ /** * An immutable client-side representation of an Azure feature. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Feature extends Indexable, Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java index 37e4b1dc0153..c473d87bcc85 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Features.java @@ -6,6 +6,7 @@ package com.microsoft.azure.management.resources; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; @@ -13,7 +14,7 @@ /** * Entry point to features management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Features extends SupportsListing { /** diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResource.java index c168b0066693..1084d61ada6a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResource.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResource.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; @@ -19,7 +19,7 @@ /** * An immutable client-side representation of an Azure generic resource. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface GenericResource extends GroupableResource, Refreshable, @@ -58,7 +58,6 @@ public interface GenericResource extends /** * The entirety of the generic resource definition. */ - @LangDefinition(ContainerName = "~/GenericResource.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -73,7 +72,6 @@ interface Definition extends /** * Grouping of generic resource definition stages. */ - @LangDefinition(ContainerName = "~/GenericResource.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * A generic resource definition allowing region to be specified. @@ -184,7 +182,6 @@ interface WithCreate extends /** * Grouping of generic resource update stages. */ - @LangDefinition(ContainerName = "~/GenericResource.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * A generic resource update allowing to change the resource properties. @@ -252,7 +249,6 @@ interface WithApiVersion { /** * The template for a generic resource update operation, containing all the settings that can be modified. */ - @LangDefinition(ContainerName = "~/GenericResource.Update") interface Update extends Appliable, UpdateStages.WithPlan, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java index 8a11e0ccad98..f1e09b7da15a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/GenericResources.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsListingByGroup; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; @@ -16,7 +16,7 @@ /** * Entry point to generic resources management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface GenericResources extends SupportsListingByGroup, SupportsGettingById, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Location.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Location.java index ac4febdc053b..ddfaeff936f8 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Location.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Location.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.LocationInner; @@ -14,7 +14,7 @@ /** * An immutable client-side representation of an Azure location. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Location extends Indexable, Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Provider.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Provider.java index 5948052af524..f285b5932294 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Provider.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Provider.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.ProviderInner; @@ -16,7 +16,7 @@ /** * An immutable client-side representation of an Azure resource provider. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Provider extends Indexable, Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java index 44d014f44ab0..8f4f105ec932 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Providers.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; import com.microsoft.rest.ServiceResponse; @@ -14,7 +14,7 @@ /** * Entry point to providers management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Providers extends SupportsListing, SupportsGettingByName { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java index 181a15bdc755..fceb8c7adcee 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceConnector.java @@ -7,14 +7,14 @@ package com.microsoft.azure.management.resources; import com.microsoft.azure.RestClient; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; /** * Defines a connector that connects other resources to a resource group. * Implementations of this class can let users browse resources inside a * specific resource group. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface ResourceConnector { /** * Implementations of this interface defines how to create a connector. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java index 43e324e3d5ed..538047fecd9a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroup.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; @@ -20,7 +20,7 @@ /** * An immutable client-side representation of an Azure resource group. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface ResourceGroup extends Indexable, Resource, @@ -52,7 +52,6 @@ public interface ResourceGroup extends /** * Container interface for all the definitions that need to be implemented. */ - @LangDefinition(ContainerName = "~/ResourceGroup.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithCreate { @@ -61,7 +60,6 @@ interface Definition extends /** * Grouping of all the resource group definition stages. */ - @LangDefinition(ContainerName = "~/ResourceGroup.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * A resource group definition allowing location to be set. @@ -83,7 +81,6 @@ interface WithCreate extends /** * Grouping of all the resource group update stages. */ - @LangDefinition(ContainerName = "~/ResourceGroup.Update", ContainerFileName = "IUpdate") interface UpdateStages { } @@ -92,7 +89,6 @@ interface UpdateStages { *

* Call {@link Update#apply()} to apply the changes to the resource group in Azure. */ - @LangDefinition(ContainerName = "~/ResourceGroup.Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupExportResult.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupExportResult.java index 477c9a971712..6bcef6eb736d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupExportResult.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroupExportResult.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.ResourceGroupExportResultInner; /** * An immutable client-side representation of an Azure deployment template export result. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface ResourceGroupExportResult extends Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java index 69cf46e46077..42b11dd40e92 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/ResourceGroups.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsBatchCreation; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsCreating; @@ -16,7 +16,7 @@ /** * Entry point to resource group management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface ResourceGroups extends SupportsListing, SupportsGettingByName, diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java index 3712045e3d5c..46256482f197 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscription.java @@ -7,7 +7,7 @@ package com.microsoft.azure.management.resources; import com.microsoft.azure.PagedList; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.SubscriptionInner; @@ -15,7 +15,7 @@ /** * An immutable client-side representation of an Azure subscription. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Subscription extends Indexable, Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscriptions.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscriptions.java index bc06a07ce2b3..0fdbd8b93e87 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscriptions.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Subscriptions.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByName; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to subscription management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Subscriptions extends SupportsListing, SupportsGettingByName { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenant.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenant.java index df518bd530f6..fe989e210536 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenant.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenant.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.resources.implementation.TenantIdDescriptionInner; @@ -14,7 +14,7 @@ /** * An immutable client-side representation of an Azure tenant. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Tenant extends Indexable, Wrapper { diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenants.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenants.java index 877736ffe113..ee8e123eaf4a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenants.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/Tenants.java @@ -6,13 +6,13 @@ package com.microsoft.azure.management.resources; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point to tenant management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Tenants extends SupportsListing { } diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ChildResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ChildResource.java index 36c0cba21778..09608642228f 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ChildResource.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ChildResource.java @@ -5,14 +5,14 @@ */ package com.microsoft.azure.management.resources.fluentcore.arm.models; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; /** * Base interface used by child resources. * @param parent interface */ -@LangDefinition() +@Fluent public interface ChildResource extends Indexable { /** * @return the name of this child object diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java index c2afa3836c26..2049a7538139 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/GroupableResource.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.resources.fluentcore.arm.models; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.ResourceGroup; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; /** * Base interface for resources in resource groups. */ -@LangDefinition() +@Fluent() public interface GroupableResource extends Resource { /** * @return the name of the resource group @@ -24,7 +24,6 @@ public interface GroupableResource extends Resource { * Grouping of all the definition stages. */ - @LangDefinition(ContainerName = "GroupableResource.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * A resource definition allowing a resource group to be selected. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasSubnet.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasSubnet.java new file mode 100644 index 000000000000..6a050349062c --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasSubnet.java @@ -0,0 +1,81 @@ +/** + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + */ +package com.microsoft.azure.management.resources.fluentcore.arm.models; + +import com.microsoft.azure.management.apigeneration.Fluent; + +/** + * An interface representing a model's ability to reference a subnet by its name and network's ID. + */ +@Fluent +public interface HasSubnet { + /** + * @return the resource ID of the virtual network whose subnet is associated with this resource + */ + String networkId(); + + /** + * @return the name of the subnet associated with this resource + */ + String subnetName(); + + /** + * Grouping of definition stages involving associating an existing subnet with a resource. + */ + interface DefinitionStages { + /** + * The stage of a definition allowing to associate a subnet with a resource. + * @param the next stage of the definition + */ + interface WithSubnet { + /** + * Assigns the specified subnet to this resource. + * @param parentNetworkResourceId the resource ID of the virtual network the subnet is part of + * @param subnetName the name of the subnet + * @return the next stage of the definition + */ + ReturnT withExistingSubnet(String parentNetworkResourceId, String subnetName); + } + } + + /** + * Grouping of update stages involving associating an existing subnet with a resource. + */ + interface UpdateStages { + /** + * The stage of an update allowing to associate a subnet with a resource. + * @param the next stage of the update + */ + interface WithSubnet { + /** + * Assigns the specified subnet to this resource. + * @param parentNetworkResourceId the resource ID of the virtual network the subnet is part of + * @param subnetName the name of the subnet + * @return the next stage of the definition + */ + ReturnT withExistingSubnet(String parentNetworkResourceId, String subnetName); + } + } + + /** + * Grouping of definition stages applicable as part of a parent resource update, involving associating a subnet with a resource. + */ + interface UpdateDefinitionStages { + /** + * The stage of a definition allowing to associate a subnet with a resource. + * @param the next stage of the definition + */ + interface WithSubnet { + /** + * Assigns the specified subnet to this resource. + * @param parentNetworkResourceId the resource ID of the virtual network the subnet is part of + * @param subnetName the name of the subnet + * @return the next stage of the definition + */ + ReturnT withExistingSubnet(String parentNetworkResourceId, String subnetName); + } + } +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/Resource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/Resource.java index 35a681c6ee83..8980e023f76d 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/Resource.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/Resource.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.resources.fluentcore.arm.models; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.model.Indexable; @@ -15,7 +15,7 @@ /** * Base interfaces for fluent resources. */ -@LangDefinition() +@Fluent public interface Resource extends Indexable { /** * @return the resource ID string @@ -52,7 +52,6 @@ public interface Resource extends Indexable { * * @param the type of the next stage resource definition */ - @LangDefinition(ContainerName = "Resource.Definition", ContainerFileName = "IDefinition") interface DefinitionWithRegion { /** * Specifies the region for the resource by name. @@ -74,7 +73,6 @@ interface DefinitionWithRegion { * * @param the type of the next stage resource definition */ - @LangDefinition(ContainerName = "Resource.Definition", ContainerFileName = "IDefinition") interface DefinitionWithTags { /** * Specifies tags for the resource as a {@link Map}. @@ -97,7 +95,6 @@ interface DefinitionWithTags { * * @param the type of the next stage resource update */ - @LangDefinition(ContainerName = "Resource.Update", ContainerFileName = "IUpdate") interface UpdateWithTags { /** * Specifies tags for the resource as a {@link Map}. diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java index 8975687a4046..6cb08e193560 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Refreshable.java @@ -7,6 +7,8 @@ package com.microsoft.azure.management.resources.fluentcore.model; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition; +import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; /** * Base class for resources that can be refreshed to get the latest state. @@ -20,5 +22,6 @@ public interface Refreshable { * * @return the refreshed resource */ + @LangMethodDefinition(AsType = LangMethodType.Method) T refresh(); } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java index 1d2e4ac31dfb..c4ba15c6b830 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccount.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.apigeneration.LangMethodDefinition; import com.microsoft.azure.management.apigeneration.LangMethodDefinition.LangMethodType; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; @@ -25,7 +25,7 @@ /** * An immutable client-side representation of an Azure storage account. */ -@LangDefinition +@Fluent public interface StorageAccount extends GroupableResource, Refreshable, @@ -98,19 +98,13 @@ public interface StorageAccount extends */ AccessTier accessTier(); - /** - * @return the access keys for this storage account - */ - @LangMethodDefinition(AsType = LangMethodType.Method) - List keys(); - /** * Fetch the up-to-date access keys from Azure for this storage account. * * @return the access keys for this storage account */ @LangMethodDefinition(AsType = LangMethodType.Method) - List refreshKeys(); + List getKeys(); /** * Regenerates the access keys for this storage account. @@ -121,14 +115,9 @@ public interface StorageAccount extends @LangMethodDefinition(AsType = LangMethodType.Method) List regenerateKey(String keyName); - /************************************************************** - * Fluent interfaces to provision a StorageAccount - **************************************************************/ - /** * Container interface for all the definitions that need to be implemented. */ - @LangDefinition(ContainerName = "~/StorageAccount.Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -139,7 +128,6 @@ interface Definition extends /** * Grouping of all the storage account definition stages. */ - @LangDefinition(ContainerName = "~/StorageAccount.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of the storage account definition. @@ -273,7 +261,6 @@ interface WithCreateAndAccessTier extends DefinitionStages.WithCreate { /** * Grouping of all the storage account update stages. */ - @LangDefinition(ContainerName = "~/StorageAccount.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * A storage account update stage allowing to change the parameters. @@ -361,7 +348,6 @@ interface WithAccessTier { /** * The template for a storage account update operation, containing all the settings that can be modified. */ - @LangDefinition(ContainerName = "~/StorageAccount.Update", ContainerFileName = "IUpdate") interface Update extends Appliable, UpdateStages.WithSku, diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java index fadd44e3a3e8..652048cfd6d3 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageAccounts.java @@ -6,7 +6,7 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingByGroup; import com.microsoft.azure.management.resources.fluentcore.arm.collection.SupportsGettingById; @@ -19,7 +19,7 @@ /** * Entry point for storage accounts management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface StorageAccounts extends SupportsListing, SupportsCreating, diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageUsage.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageUsage.java index ebd5c924d9bb..1fe5b555da00 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageUsage.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/StorageUsage.java @@ -6,14 +6,14 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; import com.microsoft.azure.management.storage.implementation.UsageInner; /** * An immutable client-side representation of an Azure storage resource usage info object. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface StorageUsage extends Wrapper { /** * @return the unit of measurement. Possible values include: 'Count', diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Usages.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Usages.java index f543747f20ab..754a43e51e53 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Usages.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/Usages.java @@ -6,12 +6,12 @@ package com.microsoft.azure.management.storage; -import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.collection.SupportsListing; /** * Entry point for storage resource usage management API. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface Usages extends SupportsListing { } diff --git a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java index b3aff5679232..84ec3ee7e82a 100644 --- a/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java +++ b/azure-mgmt-storage/src/main/java/com/microsoft/azure/management/storage/implementation/StorageAccountImpl.java @@ -40,7 +40,6 @@ class StorageAccountImpl private PublicEndpoints publicEndpoints; private AccountStatuses accountStatuses; - private List cachedAccountKeys; private StorageAccountCreateParametersInner createParameters; private StorageAccountUpdateParametersInner updateParameters; @@ -112,27 +111,17 @@ public AccessTier accessTier() { } @Override - public List keys() { - if (cachedAccountKeys == null) { - cachedAccountKeys = refreshKeys(); - } - return cachedAccountKeys; - } - - @Override - public List refreshKeys() { + public List getKeys() { StorageAccountListKeysResultInner response = this.client.listKeys(this.resourceGroupName(), this.name()); - cachedAccountKeys = response.keys(); - return cachedAccountKeys; + return response.keys(); } @Override public List regenerateKey(String keyName) { StorageAccountListKeysResultInner response = this.client.regenerateKey(this.resourceGroupName(), this.name(), keyName); - cachedAccountKeys = response.keys(); - return cachedAccountKeys; + return response.keys(); } @Override diff --git a/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageAccountOperationsTests.java b/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageAccountOperationsTests.java index 8e4504f65612..abf4fba44904 100644 --- a/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageAccountOperationsTests.java +++ b/azure-mgmt-storage/src/test/java/com/microsoft/azure/management/storage/StorageAccountOperationsTests.java @@ -61,7 +61,7 @@ public void canCRUDStorageAccount() throws Exception { Assert.assertNotNull(storageAccount); // Get Keys - List keys = storageAccount.keys(); + List keys = storageAccount.getKeys(); Assert.assertTrue(keys.size() > 0); // Regen key diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java index 3eaea6346278..9fa6bbd24314 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/compute/samples/ManageVirtualMachine.java @@ -200,7 +200,7 @@ public static void main(String[] args) { System.out.println("Powered OFF VM: " + windowsVM.id() + "; state = " + windowsVM.powerState()); // Get the network where Windows VM is hosted - Network network = windowsVM.primaryNetworkInterface().primaryNetwork(); + Network network = windowsVM.primaryNetworkInterface().primaryIpConfiguration().getNetwork(); //============================================================= diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java index eeb52671b9f7..dd33e3cab052 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/network/samples/ManageIPAddress.java @@ -110,7 +110,7 @@ public static void main(String[] args) { System.out.println("Public IP address associated with the VM's primary NIC [After create]"); // Print the public IP address details - Utils.print(vm.primaryPublicIpAddress()); + Utils.print(vm.getPrimaryPublicIpAddress()); //============================================================ @@ -142,7 +142,7 @@ public static void main(String[] args) { // Get the associated public IP address for a virtual machine System.out.println("Public IP address associated with the VM's primary NIC [After Update]"); vm.refresh(); - Utils.print(vm.primaryPublicIpAddress()); + Utils.print(vm.getPrimaryPublicIpAddress()); //============================================================ @@ -151,7 +151,7 @@ public static void main(String[] args) { System.out.println("Removing public IP address associated with the VM"); vm.refresh(); primaryNetworkInterface = vm.primaryNetworkInterface(); - publicIpAddress = primaryNetworkInterface.primaryPublicIpAddress(); + publicIpAddress = primaryNetworkInterface.primaryIpConfiguration().getPublicIpAddress(); primaryNetworkInterface.update() .withoutPrimaryPublicIpAddress() .apply(); diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/samples/Utils.java b/azure-samples/src/main/java/com/microsoft/azure/management/samples/Utils.java index 191bfd0611ff..69f8cb3529a2 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/samples/Utils.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/samples/Utils.java @@ -222,7 +222,8 @@ public static void print(NetworkInterface resource) { .append("\n\tMAC Address:").append(resource.macAddress()) .append("\n\tPrivate IP:").append(resource.primaryPrivateIp()) .append("\n\tPrivate allocation method:").append(resource.primaryPrivateIpAllocationMethod()) - .append("\n\tSubnet Id:").append(resource.primarySubnetId()); + .append("\n\tPrimary virtual network ID: ").append(resource.primaryIpConfiguration().networkId()) + .append("\n\tPrimary subnet name:").append(resource.primaryIpConfiguration().subnetName()); System.out.println(info.toString()); } diff --git a/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java b/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java index 13b7b17516bf..5e2fa6d51ce2 100644 --- a/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java +++ b/azure-samples/src/main/java/com/microsoft/azure/management/storage/samples/ManageStorageAccount.java @@ -73,7 +73,7 @@ public static void main(String[] args) { System.out.println("Getting storage account access keys"); - List storageAccountKeys = storageAccount.keys(); + List storageAccountKeys = storageAccount.getKeys(); Utils.print(storageAccountKeys); diff --git a/azure/src/test/java/com/microsoft/azure/TestNetworkInterface.java b/azure/src/test/java/com/microsoft/azure/TestNetworkInterface.java index 0ae873a56918..e0582df978a6 100644 --- a/azure/src/test/java/com/microsoft/azure/TestNetworkInterface.java +++ b/azure/src/test/java/com/microsoft/azure/TestNetworkInterface.java @@ -66,7 +66,8 @@ public void print(NetworkInterface resource) { .append("\n\tMAC Address:").append(resource.macAddress()) .append("\n\tPrivate IP:").append(resource.primaryPrivateIp()) .append("\n\tPrivate allocation method:").append(resource.primaryPrivateIpAllocationMethod()) - .append("\n\tSubnet Id:").append(resource.primarySubnetId()) + .append("\n\tPrimary virtual network ID: ").append(resource.primaryIpConfiguration().networkId()) + .append("\n\tPrimary subnet name: ").append(resource.primaryIpConfiguration().subnetName()) .append("\n\tIP configurations: "); // Output IP configs @@ -76,7 +77,8 @@ public void print(NetworkInterface resource) { .append("\n\t\tPrivate IP allocation method: ").append(ipConfig.privateIpAllocationMethod().toString()) .append("\n\t\tPrivate IP version: ").append(ipConfig.privateIpAddressVersion().toString()) .append("\n\t\tPIP id: ").append(ipConfig.publicIpAddressId()) - .append("\n\t\tSubnet ID: ").append(ipConfig.subnetId()); + .append("\n\t\tAssociated network ID: ").append(ipConfig.networkId()) + .append("\n\t\tAssociated subnet name: ").append(ipConfig.subnetName()); } System.out.println(info.toString()); diff --git a/azure/src/test/java/com/microsoft/azure/TestVirtualMachineNics.java b/azure/src/test/java/com/microsoft/azure/TestVirtualMachineNics.java index d693072f77d7..6b8f63c08be9 100644 --- a/azure/src/test/java/com/microsoft/azure/TestVirtualMachineNics.java +++ b/azure/src/test/java/com/microsoft/azure/TestVirtualMachineNics.java @@ -92,7 +92,7 @@ public VirtualMachine createResource(VirtualMachines virtualMachines) throws Exc NetworkInterface primaryNetworkInterface = virtualMachine.primaryNetworkInterface(); Assert.assertEquals(primaryNetworkInterface.primaryPrivateIp(), "10.0.0.4"); - PublicIpAddress primaryPublicIpAddress = primaryNetworkInterface.primaryPublicIpAddress(); + PublicIpAddress primaryPublicIpAddress = primaryNetworkInterface.primaryIpConfiguration().getPublicIpAddress(); Assert.assertTrue(primaryPublicIpAddress.fqdn().startsWith(primaryPipName)); return virtualMachine; }