diff --git a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/ApplicationPackage.java b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/ApplicationPackage.java index 3ed301f07714..6e3e1b9182bb 100644 --- a/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/ApplicationPackage.java +++ b/azure-mgmt-batch/src/main/java/com/microsoft/azure/management/batch/ApplicationPackage.java @@ -20,11 +20,6 @@ public interface ApplicationPackage extends ExternalChildResource, Wrapper { - /** - * @return the name of application package. - */ - String name(); - /** * @return the sate of the application package */ 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 bcf13416a17c..6dc5d7960246 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 @@ -2,6 +2,7 @@ import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; /** @@ -9,17 +10,13 @@ */ @Fluent public interface VirtualMachineExtensionImageType extends - Wrapper { + Wrapper, + HasName { /** * @return the resource ID of the virtual machine extension image type */ String id(); - /** - * @return the name of the virtual machine extension image type - */ - String name(); - /** * @return the region in which virtual machine extension image type is available */ 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 b99f98896b12..cffec853c99c 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 @@ -2,6 +2,7 @@ import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineExtensionImageInner; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; import com.microsoft.azure.management.resources.fluentcore.model.Wrapper; /** @@ -9,17 +10,13 @@ */ @Fluent public interface VirtualMachineExtensionImageVersion extends - Wrapper { + Wrapper, + HasName { /** * @return the resource ID of the extension image version */ String id(); - /** - * @return the name of the virtual machine extension image version - */ - String name(); - /** * @return the region in which virtual machine extension image version is available */ 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 6abaed345c74..b8a63782f56a 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 @@ -7,12 +7,13 @@ import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; /** * Represents a virtual machine image offer. */ @Fluent -public interface VirtualMachineOffer { +public interface VirtualMachineOffer extends HasName { /** * @return the region where this virtual machine image offer is available */ @@ -23,11 +24,6 @@ public interface VirtualMachineOffer { */ VirtualMachinePublisher publisher(); - /** - * @return the name of the virtual machine image offer - */ - String name(); - /** * @return virtual machine image SKUs available in this offer */ 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 81a151983be1..e54a760a6d5b 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 @@ -7,22 +7,18 @@ import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; /** * Represents a virtual machine image publisher. */ @Fluent -public interface VirtualMachinePublisher { +public interface VirtualMachinePublisher extends HasName { /** * @return the region where virtual machine images from this publisher are available */ Region region(); - /** - * @return the name of the publisher - */ - String name(); - /** * @return the offers from this publisher */ 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 50d2c2fa0550..e07d03015bbd 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 @@ -4,7 +4,7 @@ import com.microsoft.azure.PagedList; import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetInner; -import com.microsoft.azure.management.network.Backend; +import com.microsoft.azure.management.network.LoadBalancerBackend; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.Network; @@ -153,7 +153,7 @@ public interface VirtualMachineScaleSet extends * * @throws IOException the IO exception */ - Map listPrimaryInternetFacingLoadBalancerBackends() throws IOException; + Map listPrimaryInternetFacingLoadBalancerBackends() throws IOException; /** * @return the internet-facing load balancer's inbound NAT pool associated with the primary network interface @@ -177,7 +177,7 @@ public interface VirtualMachineScaleSet extends * * @throws IOException the IO exception */ - Map listPrimaryInternalLoadBalancerBackends() throws IOException; + Map listPrimaryInternalLoadBalancerBackends() throws IOException; /** * @return the inbound NAT pools of the internal load balancer associated with the primary network interface 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 0f709eba3f74..a9107d936906 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 @@ -6,17 +6,13 @@ package com.microsoft.azure.management.compute; import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; /** * A type representing virtual machine size available for a subscription in a region. */ @Fluent -public interface VirtualMachineSize { - /** - * @return the virtual machine size name - */ - String name(); - +public interface VirtualMachineSize extends HasName { /** * @return the number of cores supported by the VM size */ 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 d123e06c4467..f845d7e4ed85 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 @@ -7,12 +7,13 @@ import com.microsoft.azure.management.apigeneration.Fluent; import com.microsoft.azure.management.resources.fluentcore.arm.Region; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; /** * Represents a virtual machine image SKU. */ @Fluent -public interface VirtualMachineSku { +public interface VirtualMachineSku extends HasName { /** * @return the region where this virtual machine image offer SKU is available */ @@ -28,11 +29,6 @@ public interface VirtualMachineSku { */ VirtualMachineOffer offer(); - /** - * @return the commercial name of the virtual machine image (SKU) - */ - String name(); - /** * @return virtual machine images in the SKU */ diff --git a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetImpl.java b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetImpl.java index 2a0985be2c8b..97fc8692b88f 100644 --- a/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetImpl.java +++ b/azure-mgmt-compute/src/main/java/com/microsoft/azure/management/compute/implementation/VirtualMachineScaleSetImpl.java @@ -28,8 +28,8 @@ import com.microsoft.azure.management.compute.WinRMConfiguration; import com.microsoft.azure.management.compute.WinRMListener; import com.microsoft.azure.management.compute.WindowsConfiguration; -import com.microsoft.azure.management.network.Backend; -import com.microsoft.azure.management.network.Frontend; +import com.microsoft.azure.management.network.LoadBalancerBackend; +import com.microsoft.azure.management.network.LoadBalancerFrontend; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.Network; @@ -224,7 +224,7 @@ public LoadBalancer getPrimaryInternetFacingLoadBalancer() throws IOException { } @Override - public Map listPrimaryInternetFacingLoadBalancerBackends() throws IOException { + public Map listPrimaryInternetFacingLoadBalancerBackends() throws IOException { if (this.getPrimaryInternetFacingLoadBalancer() != null) { return getBackendsAssociatedWithIpConfiguration(this.primaryInternetFacingLoadBalancer, primaryNicDefaultIPConfiguration()); @@ -250,7 +250,7 @@ public LoadBalancer getPrimaryInternalLoadBalancer() throws IOException { } @Override - public Map listPrimaryInternalLoadBalancerBackends() throws IOException { + public Map listPrimaryInternalLoadBalancerBackends() throws IOException { if (this.getPrimaryInternalLoadBalancer() != null) { return getBackendsAssociatedWithIpConfiguration(this.primaryInternalLoadBalancer, primaryNicDefaultIPConfiguration()); @@ -372,7 +372,7 @@ public VirtualMachineScaleSetImpl withPrimaryInternalLoadBalancer(LoadBalancer l throw new IllegalArgumentException("Parameter loadBalancer must be an internal load balancer"); } String lbNetworkId = null; - for (Frontend frontEnd : loadBalancer.frontends().values()) { + for (LoadBalancerFrontend frontEnd : loadBalancer.frontends().values()) { if (frontEnd.inner().subnet().id() != null) { lbNetworkId = ResourceUtils.parentResourcePathFromResourceId(frontEnd.inner().subnet().id()); } @@ -1232,12 +1232,12 @@ private static void associateInboundNATPoolsToIpConfiguration(String loadBalance } } - private static Map getBackendsAssociatedWithIpConfiguration(LoadBalancer loadBalancer, + private static Map getBackendsAssociatedWithIpConfiguration(LoadBalancer loadBalancer, VirtualMachineScaleSetIPConfigurationInner ipConfig) { String loadBalancerId = loadBalancer.id(); - Map attachedBackends = new HashMap<>(); - Map lbBackends = loadBalancer.backends(); - for (Backend lbBackend : lbBackends.values()) { + Map attachedBackends = new HashMap<>(); + Map lbBackends = loadBalancer.backends(); + for (LoadBalancerBackend lbBackend : lbBackends.values()) { String backendId = mergePath(loadBalancerId, "backendAddressPools", lbBackend.name()); for (SubResource subResource : ipConfig.loadBalancerBackendAddressPools()) { if (subResource.id().equalsIgnoreCase(backendId)) { @@ -1266,10 +1266,10 @@ private static Map getInboundNatPoolsAssociatedWithIpCon private static void associateLoadBalancerToIpConfiguration(LoadBalancer loadBalancer, VirtualMachineScaleSetIPConfigurationInner ipConfig) { - Collection backends = loadBalancer.backends().values(); + Collection backends = loadBalancer.backends().values(); String[] backendNames = new String[backends.size()]; int i = 0; - for (Backend backend : backends) { + for (LoadBalancerBackend backend : backends) { backendNames[i] = backend.name(); i++; } 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 3d8b8766e860..9d94629632ab 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 @@ -40,17 +40,17 @@ public interface LoadBalancer extends /** * @return TCP probes of this load balancer, indexed by the name */ - Map tcpProbes(); + Map tcpProbes(); /** * @return HTTP probes of this load balancer, indexed by the name */ - Map httpProbes(); + Map httpProbes(); /** * @return backends for this load balancer to load balance the incoming traffic among, indexed by name */ - Map backends(); + Map backends(); /** * @return inbound NAT rules for this balancer @@ -60,7 +60,7 @@ public interface LoadBalancer extends /** * @return frontends for this load balancer, for the incoming traffic to come from. */ - Map frontends(); + Map frontends(); /** * @return inbound NAT pools, indexed by name @@ -159,7 +159,7 @@ interface WithBackend extends WithVirtualMachine { * @param name the name to assign to the backend * @return the next stage of the update */ - Backend.DefinitionStages.Blank defineBackend(String name); + LoadBalancerBackend.DefinitionStages.Blank defineBackend(String name); } /** @@ -193,20 +193,20 @@ interface WithProbe { /** * Begins the definition of a new TCP probe to add to the load balancer. *

- * The definition must be completed with a call to {@link TcpProbe.DefinitionStages.WithAttach#attach()} + * The definition must be completed with a call to {@link LoadBalancerTcpProbe.DefinitionStages.WithAttach#attach()} * @param name the name of the probe * @return the first stage of the new probe definition */ - TcpProbe.DefinitionStages.Blank defineTcpProbe(String name); + LoadBalancerTcpProbe.DefinitionStages.Blank defineTcpProbe(String name); /** * Begins the definition of a new HTTP probe to add to the load balancer. *

- * The definition must be completed with a call to {@link HttpProbe.DefinitionStages.WithAttach#attach()} + * The definition must be completed with a call to {@link LoadBalancerHttpProbe.DefinitionStages.WithAttach#attach()} * @param name the name of the probe * @return the first stage of the new probe definition */ - HttpProbe.DefinitionStages.Blank defineHttpProbe(String name); + LoadBalancerHttpProbe.DefinitionStages.Blank defineHttpProbe(String name); } /** @@ -429,14 +429,14 @@ interface WithBackend { * @param name the name for the new backend * @return the first stage of the backend definition */ - Backend.UpdateDefinitionStages.Blank defineBackend(String name); + LoadBalancerBackend.UpdateDefinitionStages.Blank defineBackend(String name); /** * Begins the description of an update to an existing backend of this load balancer. * @param name the name of the backend to update * @return the first stage of the update */ - Backend.Update updateBackend(String name); + LoadBalancerBackend.Update updateBackend(String name); } /** @@ -464,20 +464,20 @@ interface WithProbe { /** * Begins the definition of a new HTTP probe to add to the load balancer. *

- * The definition must be completed with a call to {@link HttpProbe.DefinitionStages.WithAttach#attach()} + * The definition must be completed with a call to {@link LoadBalancerHttpProbe.DefinitionStages.WithAttach#attach()} * @param name the name of the new probe * @return the next stage of the definition */ - HttpProbe.UpdateDefinitionStages.Blank defineHttpProbe(String name); + LoadBalancerHttpProbe.UpdateDefinitionStages.Blank defineHttpProbe(String name); /** * Begins the definition of a new TCP probe to add to the load balancer. *

- * The definition must be completed with a call to {@link HttpProbe.DefinitionStages.WithAttach#attach()} + * The definition must be completed with a call to {@link LoadBalancerHttpProbe.DefinitionStages.WithAttach#attach()} * @param name the name of the new probe * @return the next stage of the definition */ - TcpProbe.UpdateDefinitionStages.Blank defineTcpProbe(String name); + LoadBalancerTcpProbe.UpdateDefinitionStages.Blank defineTcpProbe(String name); /** * Removes the specified probe from the load balancer, if present. @@ -491,14 +491,14 @@ interface WithProbe { * @param name the name of the probe to update * @return the first stage of the probe update */ - TcpProbe.Update updateTcpProbe(String name); + LoadBalancerTcpProbe.Update updateTcpProbe(String name); /** * Begins the description of an update to an existing HTTP probe on this load balancer. * @param name the name of the probe to update * @return the first stage of the probe update */ - HttpProbe.Update updateHttpProbe(String name); + LoadBalancerHttpProbe.Update updateHttpProbe(String name); } /** @@ -529,7 +529,7 @@ interface WithLoadBalancingRule { /** * Begins the definition of a new load balancing rule to add to the load balancer. *

- * The definition must be completed with a call to {@link TcpProbe.DefinitionStages.WithAttach#attach()} + * The definition must be completed with a call to {@link LoadBalancerTcpProbe.DefinitionStages.WithAttach#attach()} * @param name the name of the load balancing rule * @return the first stage of the new load balancing rule definition */ 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/LoadBalancerBackend.java similarity index 98% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Backend.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerBackend.java index 4e8f2bfd9533..6586a6267220 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/LoadBalancerBackend.java @@ -20,7 +20,7 @@ * An immutable client-side representation of an load balancer's backend address pool. */ @Fluent() -public interface Backend extends +public interface LoadBalancerBackend extends Wrapper, ChildResource, HasLoadBalancingRules { 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/LoadBalancerFrontend.java similarity index 96% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Frontend.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerFrontend.java index 36b1202c5b00..6179b04cba32 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/LoadBalancerFrontend.java @@ -17,7 +17,7 @@ * An immutable client-side representation of a load balancer frontend. */ @Fluent() -public interface Frontend extends +public interface LoadBalancerFrontend extends Wrapper, ChildResource, HasLoadBalancingRules { 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/LoadBalancerHttpProbe.java similarity index 99% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/HttpProbe.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerHttpProbe.java index 5a1b3a6e7913..d13ce052704f 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/LoadBalancerHttpProbe.java @@ -13,7 +13,7 @@ * An immutable client-side representation of an HTTP load balancing probe. */ @Fluent() -public interface HttpProbe extends Probe { +public interface LoadBalancerHttpProbe extends LoadBalancerProbe { /** * @return the HTTP request path for the HTTP probe to call to check the health status 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/LoadBalancerProbe.java similarity index 96% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Probe.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerProbe.java index 1238eae6c02e..623604729d07 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/LoadBalancerProbe.java @@ -16,7 +16,7 @@ * An immutable client-side representation of a load balancing probe. */ @Fluent() -public interface Probe extends +public interface LoadBalancerProbe extends Wrapper, ChildResource, HasLoadBalancingRules, 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/LoadBalancerTcpProbe.java similarity index 99% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/TcpProbe.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerTcpProbe.java index 6da713235813..6317e3de284b 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/LoadBalancerTcpProbe.java @@ -13,7 +13,7 @@ * An immutable client-side representation of a TCP load balancing probe. */ @Fluent() -public interface TcpProbe extends Probe { +public interface LoadBalancerTcpProbe extends LoadBalancerProbe { /** * Grouping of probe definition stages. 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 219fa015a9f2..6878bd713826 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 @@ -46,12 +46,12 @@ public interface LoadBalancingRule extends /** * @return the backend associated with the load balancing rule */ - Backend backend(); + LoadBalancerBackend backend(); /** * @return the probe associated with the load balancing rule */ - Probe probe(); + LoadBalancerProbe probe(); /** * Grouping of load balancing rule definition stages. 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 40a773e9b397..6ea90ee8640f 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 @@ -38,7 +38,7 @@ public interface NicIpConfiguration extends /** * @return the load balancer backends associated with this network interface IP configuration */ - List listAssociatedLoadBalancerBackends(); + List listAssociatedLoadBalancerBackends(); /** * @return the load balancer inbound NAT rules associated with this network interface IP configuration 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 f0ef7c2831a7..e6a7725f03f8 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 @@ -16,7 +16,7 @@ */ @Fluent() public interface PrivateFrontend extends - Frontend, + LoadBalancerFrontend, HasPrivateIpAddress, HasSubnet { 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 f7afc1561f19..dee159d4cb55 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 @@ -15,7 +15,7 @@ */ @Fluent() public interface PublicFrontend extends - Frontend, + LoadBalancerFrontend, HasPublicIpAddress { /** 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 c5a2a50e3f2e..35c78745711d 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 @@ -7,7 +7,7 @@ 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.LoadBalancerFrontend; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.TransportProtocol; @@ -48,7 +48,7 @@ public int backendPort() { } @Override - public Frontend frontend() { + public LoadBalancerFrontend frontend() { return this.parent().frontends().get( ResourceUtils.nameFromResourceId( this.inner().frontendIPConfiguration().id())); 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 114dc3f773a6..0c0c54cfb0a6 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 @@ -7,7 +7,7 @@ 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.LoadBalancerFrontend; import com.microsoft.azure.management.network.InboundNatRule; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.TransportProtocol; @@ -84,7 +84,7 @@ public boolean floatingIpEnabled() { } @Override - public Frontend frontend() { + public LoadBalancerFrontend frontend() { return this.parent().frontends().get( ResourceUtils.nameFromResourceId( this.inner().frontendIPConfiguration().id())); 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/LoadBalancerBackendImpl.java similarity index 88% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/BackendImpl.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerBackendImpl.java index 9a8257f47d72..370542032d9f 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/LoadBalancerBackendImpl.java @@ -14,7 +14,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.LoadBalancerBackend; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancingRule; import com.microsoft.azure.management.network.NetworkInterface; @@ -22,18 +22,18 @@ import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.ChildResourceImpl; /** - * Implementation for {@link Backend}. + * Implementation for {@link LoadBalancerBackend}. */ @LangDefinition -class BackendImpl +class LoadBalancerBackendImpl extends ChildResourceImpl implements - Backend, - Backend.Definition, - Backend.UpdateDefinition, - Backend.Update { + LoadBalancerBackend, + LoadBalancerBackend.Definition, + LoadBalancerBackend.UpdateDefinition, + LoadBalancerBackend.Update { - BackendImpl(BackendAddressPoolInner inner, LoadBalancerImpl parent) { + LoadBalancerBackendImpl(BackendAddressPoolInner inner, LoadBalancerImpl parent) { super(inner, parent); } 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/LoadBalancerFrontendImpl.java similarity index 89% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerFrontendImpl.java index 415c79ccb7bd..dd409e586468 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/LoadBalancerFrontendImpl.java @@ -11,7 +11,7 @@ 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.LoadBalancerFrontend; import com.microsoft.azure.management.network.IPAllocationMethod; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.InboundNatRule; @@ -28,10 +28,10 @@ * Implementation for {@link PublicFrontend}. */ @LangDefinition -class FrontendImpl +class LoadBalancerFrontendImpl extends ChildResourceImpl implements - Frontend, + LoadBalancerFrontend, PrivateFrontend, PrivateFrontend.Definition, PrivateFrontend.UpdateDefinition, @@ -41,7 +41,7 @@ class FrontendImpl PublicFrontend.UpdateDefinition, PublicFrontend.Update { - FrontendImpl(FrontendIPConfigurationInner inner, LoadBalancerImpl parent) { + LoadBalancerFrontendImpl(FrontendIPConfigurationInner inner, LoadBalancerImpl parent) { super(inner, parent); } @@ -143,12 +143,12 @@ public Map inboundNatRules() { // Fluent setters @Override - public FrontendImpl withExistingSubnet(Network network, String subnetName) { + public LoadBalancerFrontendImpl withExistingSubnet(Network network, String subnetName) { return this.withExistingSubnet(network.id(), subnetName); } @Override - public FrontendImpl withExistingSubnet(String parentNetworkResourceId, String subnetName) { + public LoadBalancerFrontendImpl withExistingSubnet(String parentNetworkResourceId, String subnetName) { SubResource subnetRef = new SubResource() .withId(parentNetworkResourceId + "/subnets/" + subnetName); this.inner() @@ -158,12 +158,12 @@ public FrontendImpl withExistingSubnet(String parentNetworkResourceId, String su } @Override - public FrontendImpl withExistingPublicIpAddress(PublicIpAddress pip) { + public LoadBalancerFrontendImpl withExistingPublicIpAddress(PublicIpAddress pip) { return this.withExistingPublicIpAddress(pip.id()); } @Override - public FrontendImpl withExistingPublicIpAddress(String resourceId) { + public LoadBalancerFrontendImpl withExistingPublicIpAddress(String resourceId) { SubResource pipRef = new SubResource().withId(resourceId); this.inner() .withPublicIPAddress(pipRef) @@ -176,13 +176,13 @@ public FrontendImpl withExistingPublicIpAddress(String resourceId) { } @Override - public FrontendImpl withoutPublicIpAddress() { + public LoadBalancerFrontendImpl withoutPublicIpAddress() { this.inner().withPublicIPAddress(null); return this; } @Override - public FrontendImpl withPrivateIpAddressDynamic() { + public LoadBalancerFrontendImpl withPrivateIpAddressDynamic() { this.inner() .withPrivateIPAddress(null) .withPrivateIPAllocationMethod(IPAllocationMethod.DYNAMIC) @@ -193,7 +193,7 @@ public FrontendImpl withPrivateIpAddressDynamic() { } @Override - public FrontendImpl withPrivateIpAddressStatic(String ipAddress) { + public LoadBalancerFrontendImpl withPrivateIpAddressStatic(String ipAddress) { this.inner() .withPrivateIPAddress(ipAddress) .withPrivateIPAllocationMethod(IPAllocationMethod.STATIC) 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 685f73345522..e595b713aeed 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 @@ -6,9 +6,9 @@ package com.microsoft.azure.management.network.implementation; import com.microsoft.azure.SubResource; -import com.microsoft.azure.management.network.Backend; -import com.microsoft.azure.management.network.Frontend; -import com.microsoft.azure.management.network.HttpProbe; +import com.microsoft.azure.management.network.LoadBalancerBackend; +import com.microsoft.azure.management.network.LoadBalancerFrontend; +import com.microsoft.azure.management.network.LoadBalancerHttpProbe; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.InboundNatRule; import com.microsoft.azure.management.apigeneration.LangDefinition; @@ -17,12 +17,12 @@ import com.microsoft.azure.management.network.Network; import com.microsoft.azure.management.network.NetworkInterface; import com.microsoft.azure.management.network.NicIpConfiguration; -import com.microsoft.azure.management.network.Probe; +import com.microsoft.azure.management.network.LoadBalancerProbe; 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; +import com.microsoft.azure.management.network.LoadBalancerTcpProbe; import com.microsoft.azure.management.network.TransportProtocol; import com.microsoft.azure.management.network.model.HasNetworkInterfaces; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; @@ -58,11 +58,11 @@ class LoadBalancerImpl private final HashMap nicsInBackends = new HashMap<>(); private final HashMap creatablePIPKeys = new HashMap<>(); - private Map backends; - private Map tcpProbes; - private Map httpProbes; + private Map backends; + private Map tcpProbes; + private Map httpProbes; private Map loadBalancingRules; - private Map frontends; + private Map frontends; private Map inboundNatRules; private Map inboundNatPools; @@ -198,7 +198,7 @@ private void initializeFrontendsFromInner() { List frontendsInner = this.inner().frontendIPConfigurations(); if (frontendsInner != null) { for (FrontendIPConfigurationInner frontendInner : frontendsInner) { - FrontendImpl frontend = new FrontendImpl(frontendInner, this); + LoadBalancerFrontendImpl frontend = new LoadBalancerFrontendImpl(frontendInner, this); this.frontends.put(frontendInner.name(), frontend); } } @@ -209,7 +209,7 @@ private void initializeBackendsFromInner() { List backendsInner = this.inner().backendAddressPools(); if (backendsInner != null) { for (BackendAddressPoolInner backendInner : backendsInner) { - BackendImpl backend = new BackendImpl(backendInner, this); + LoadBalancerBackendImpl backend = new LoadBalancerBackendImpl(backendInner, this); this.backends.put(backendInner.name(), backend); } } @@ -220,7 +220,7 @@ private void initializeProbesFromInner() { this.tcpProbes = new TreeMap<>(); if (this.inner().probes() != null) { for (ProbeInner probeInner : this.inner().probes()) { - ProbeImpl probe = new ProbeImpl(probeInner, this); + LoadBalancerProbeImpl probe = new LoadBalancerProbeImpl(probeInner, this); if (probeInner.protocol().equals(ProbeProtocol.TCP)) { this.tcpProbes.put(probeInner.name(), probe); } else if (probeInner.protocol().equals(ProbeProtocol.HTTP)) { @@ -274,7 +274,7 @@ String futureResourceId() { .append(this.name()).toString(); } - LoadBalancerImpl withFrontend(FrontendImpl frontend) { + LoadBalancerImpl withFrontend(LoadBalancerFrontendImpl frontend) { if (frontend == null) { return null; } else { @@ -283,7 +283,7 @@ LoadBalancerImpl withFrontend(FrontendImpl frontend) { } } - LoadBalancerImpl withProbe(ProbeImpl probe) { + LoadBalancerImpl withProbe(LoadBalancerProbeImpl probe) { if (probe == null) { return null; } else if (probe.protocol() == ProbeProtocol.HTTP) { @@ -321,7 +321,7 @@ LoadBalancerImpl withInboundNatPool(InboundNatPoolImpl inboundNatPool) { } } - LoadBalancerImpl withBackend(BackendImpl backend) { + LoadBalancerImpl withBackend(LoadBalancerBackendImpl backend) { if (backend == null) { return null; } else { @@ -439,29 +439,29 @@ public LoadBalancerImpl withHttpProbe(String path) { } @Override - public ProbeImpl defineTcpProbe(String name) { - Probe probe = this.tcpProbes.get(name); + public LoadBalancerProbeImpl defineTcpProbe(String name) { + LoadBalancerProbe probe = this.tcpProbes.get(name); if (probe == null) { ProbeInner inner = new ProbeInner() .withName(name) .withProtocol(ProbeProtocol.TCP); - return new ProbeImpl(inner, this); + return new LoadBalancerProbeImpl(inner, this); } else { - return (ProbeImpl) probe; + return (LoadBalancerProbeImpl) probe; } } @Override - public ProbeImpl defineHttpProbe(String name) { - Probe probe = this.httpProbes.get(name); + public LoadBalancerProbeImpl defineHttpProbe(String name) { + LoadBalancerProbe probe = this.httpProbes.get(name); if (probe == null) { ProbeInner inner = new ProbeInner() .withName(name) .withProtocol(ProbeProtocol.HTTP) .withPort(80); - return new ProbeImpl(inner, this); + return new LoadBalancerProbeImpl(inner, this); } else { - return (ProbeImpl) probe; + return (LoadBalancerProbeImpl) probe; } } @@ -502,35 +502,35 @@ public InboundNatPoolImpl defineInboundNatPool(String name) { } @Override - public FrontendImpl definePrivateFrontend(String name) { + public LoadBalancerFrontendImpl definePrivateFrontend(String name) { return defineFrontend(name); } @Override - public FrontendImpl definePublicFrontend(String name) { + public LoadBalancerFrontendImpl definePublicFrontend(String name) { return defineFrontend(name); } - private FrontendImpl defineFrontend(String name) { - Frontend frontend = this.frontends.get(name); + private LoadBalancerFrontendImpl defineFrontend(String name) { + LoadBalancerFrontend frontend = this.frontends.get(name); if (frontend == null) { FrontendIPConfigurationInner inner = new FrontendIPConfigurationInner() .withName(name); - return new FrontendImpl(inner, this); + return new LoadBalancerFrontendImpl(inner, this); } else { - return (FrontendImpl) frontend; + return (LoadBalancerFrontendImpl) frontend; } } @Override - public BackendImpl defineBackend(String name) { - Backend backend = this.backends.get(name); + public LoadBalancerBackendImpl defineBackend(String name) { + LoadBalancerBackend backend = this.backends.get(name); if (backend == null) { BackendAddressPoolInner inner = new BackendAddressPoolInner() .withName(name); - return new BackendImpl(inner, this); + return new LoadBalancerBackendImpl(inner, this); } else { - return (BackendImpl) backend; + return (LoadBalancerBackendImpl) backend; } } @@ -545,23 +545,23 @@ public LoadBalancerImpl withoutProbe(String name) { } @Override - public ProbeImpl updateTcpProbe(String name) { - return (ProbeImpl) this.tcpProbes.get(name); + public LoadBalancerProbeImpl updateTcpProbe(String name) { + return (LoadBalancerProbeImpl) this.tcpProbes.get(name); } @Override - public BackendImpl updateBackend(String name) { - return (BackendImpl) this.backends.get(name); + public LoadBalancerBackendImpl updateBackend(String name) { + return (LoadBalancerBackendImpl) this.backends.get(name); } @Override - public FrontendImpl updateInternetFrontend(String name) { - return (FrontendImpl) this.frontends.get(name); + public LoadBalancerFrontendImpl updateInternetFrontend(String name) { + return (LoadBalancerFrontendImpl) this.frontends.get(name); } @Override - public FrontendImpl updateInternalFrontend(String name) { - return (FrontendImpl) this.frontends.get(name); + public LoadBalancerFrontendImpl updateInternalFrontend(String name) { + return (LoadBalancerFrontendImpl) this.frontends.get(name); } @Override @@ -575,8 +575,8 @@ public InboundNatPoolImpl updateInboundNatPool(String name) { } @Override - public ProbeImpl updateHttpProbe(String name) { - return (ProbeImpl) this.httpProbes.get(name); + public LoadBalancerProbeImpl updateHttpProbe(String name) { + return (LoadBalancerProbeImpl) this.httpProbes.get(name); } @Override @@ -617,7 +617,7 @@ public LoadBalancerImpl withoutFrontend(String name) { // Getters @Override - public Map backends() { + public Map backends() { return Collections.unmodifiableMap(this.backends); } @@ -627,12 +627,12 @@ public Map inboundNatPools() { } @Override - public Map tcpProbes() { + public Map tcpProbes() { return Collections.unmodifiableMap(this.tcpProbes); } @Override - public Map frontends() { + public Map frontends() { return Collections.unmodifiableMap(this.frontends); } @@ -642,7 +642,7 @@ public Map inboundNatRules() { } @Override - public Map httpProbes() { + public Map httpProbes() { return Collections.unmodifiableMap(this.httpProbes); } @@ -654,7 +654,7 @@ public Map loadBalancingRules() { @Override public List publicIpAddressIds() { List publicIpAddressIds = new ArrayList<>(); - for (Frontend frontend : this.frontends().values()) { + for (LoadBalancerFrontend frontend : this.frontends().values()) { if (frontend.isPublic()) { String pipId = ((PublicFrontend) frontend).publicIpAddressId(); publicIpAddressIds.add(pipId); 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/LoadBalancerProbeImpl.java similarity index 71% rename from azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/ProbeImpl.java rename to azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/LoadBalancerProbeImpl.java index 06e528d6a5f7..fb0b949a1714 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/LoadBalancerProbeImpl.java @@ -11,31 +11,31 @@ 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.LoadBalancerHttpProbe; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancingRule; import com.microsoft.azure.management.network.ProbeProtocol; -import com.microsoft.azure.management.network.TcpProbe; +import com.microsoft.azure.management.network.LoadBalancerTcpProbe; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.ChildResourceImpl; /** - * Implementation for {@link TcpProbe} and its create and update interfaces. + * Implementation for {@link LoadBalancerTcpProbe} and its create and update interfaces. */ @LangDefinition -class ProbeImpl +class LoadBalancerProbeImpl extends ChildResourceImpl implements - TcpProbe, - TcpProbe.Definition, - TcpProbe.UpdateDefinition, - TcpProbe.Update, - HttpProbe, - HttpProbe.Definition, - HttpProbe.UpdateDefinition, - HttpProbe.Update { - - ProbeImpl(ProbeInner inner, LoadBalancerImpl parent) { + LoadBalancerTcpProbe, + LoadBalancerTcpProbe.Definition, + LoadBalancerTcpProbe.UpdateDefinition, + LoadBalancerTcpProbe.Update, + LoadBalancerHttpProbe, + LoadBalancerHttpProbe.Definition, + LoadBalancerHttpProbe.UpdateDefinition, + LoadBalancerHttpProbe.Update { + + LoadBalancerProbeImpl(ProbeInner inner, LoadBalancerImpl parent) { super(inner, parent); } @@ -90,25 +90,25 @@ public Map loadBalancingRules() { // Fluent setters @Override - public ProbeImpl withPort(int port) { + public LoadBalancerProbeImpl withPort(int port) { this.inner().withPort(port); return this; } @Override - public ProbeImpl withRequestPath(String requestPath) { + public LoadBalancerProbeImpl withRequestPath(String requestPath) { this.inner().withRequestPath(requestPath); return this; } @Override - public ProbeImpl withIntervalInSeconds(int seconds) { + public LoadBalancerProbeImpl withIntervalInSeconds(int seconds) { this.inner().withIntervalInSeconds(seconds); return this; } @Override - public ProbeImpl withNumberOfProbes(int probes) { + public LoadBalancerProbeImpl withNumberOfProbes(int probes) { this.inner().withNumberOfProbes(probes); return this; } 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 15f6562deb9d..c229a35ce915 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 @@ -7,12 +7,12 @@ 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.LoadBalancerBackend; +import com.microsoft.azure.management.network.LoadBalancerFrontend; import com.microsoft.azure.management.network.LoadBalancer; import com.microsoft.azure.management.network.LoadBalancingRule; import com.microsoft.azure.management.network.LoadDistribution; -import com.microsoft.azure.management.network.Probe; +import com.microsoft.azure.management.network.LoadBalancerProbe; import com.microsoft.azure.management.network.TransportProtocol; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; import com.microsoft.azure.management.resources.fluentcore.arm.models.implementation.ChildResourceImpl; @@ -75,7 +75,7 @@ public LoadDistribution loadDistribution() { } @Override - public Frontend frontend() { + public LoadBalancerFrontend frontend() { SubResource frontendRef = this.inner().frontendIPConfiguration(); if (frontendRef == null) { return null; @@ -86,7 +86,7 @@ public Frontend frontend() { } @Override - public Backend backend() { + public LoadBalancerBackend backend() { SubResource backendRef = this.inner().backendAddressPool(); if (backendRef == null) { return null; @@ -97,7 +97,7 @@ public Backend backend() { } @Override - public Probe probe() { + public LoadBalancerProbe probe() { SubResource probeRef = this.inner().probe(); if (probeRef == null) { return 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 0eeeea2b4bce..435afd0341f2 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 @@ -2,7 +2,7 @@ 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.LoadBalancerBackend; import com.microsoft.azure.management.network.IPAllocationMethod; import com.microsoft.azure.management.network.IPVersion; import com.microsoft.azure.management.network.InboundNatRule; @@ -409,10 +409,10 @@ public List listAssociatedLoadBalancerInboundNatRules() { } @Override - public List listAssociatedLoadBalancerBackends() { + public List listAssociatedLoadBalancerBackends() { final List backendRefs = this.inner().loadBalancerBackendAddressPools(); final Map loadBalancers = new HashMap<>(); - final List backends = new ArrayList<>(); + final List backends = new ArrayList<>(); if (backendRefs != null) { for (BackendAddressPoolInner backendRef : backendRefs) { 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 4c613da87557..f4f5485e885e 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 @@ -6,7 +6,7 @@ package com.microsoft.azure.management.network.model; import com.microsoft.azure.management.apigeneration.Fluent; -import com.microsoft.azure.management.network.Frontend; +import com.microsoft.azure.management.network.LoadBalancerFrontend; /** * An interface representing a model's ability to references a load balancer frontend. @@ -16,7 +16,7 @@ public interface HasFrontend { /** * @return the associated frontend */ - Frontend frontend(); + LoadBalancerFrontend frontend(); /** * Grouping of definition stages involving specifying the frontend. 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 08a03b95adac..c758d0925777 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 @@ -12,6 +12,7 @@ import com.microsoft.azure.management.apigeneration.Method; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; import com.microsoft.azure.management.resources.fluentcore.model.Refreshable; @@ -30,18 +31,14 @@ public interface Deployment extends Refreshable, Updatable, - Wrapper { + Wrapper, + HasName { /** * @return the name of this deployment's resource group */ String resourceGroupName(); - /** - * @return the name of the deployment - */ - String name(); - /** * @return the state of the provisioning process of the resources being deployed */ 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 f2622f3c0f93..b9d7d1b2ec7c 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 @@ -7,6 +7,7 @@ package com.microsoft.azure.management.resources; import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; 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; @@ -17,11 +18,8 @@ @Fluent public interface Feature extends Indexable, - Wrapper { - /** - * @return the name of the feature - */ - String name(); + Wrapper, + HasName { /** * @return the type of the feature 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 ddfaeff936f8..b189bce2b5be 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 @@ -7,6 +7,7 @@ package com.microsoft.azure.management.resources; import com.microsoft.azure.management.apigeneration.Fluent; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; 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; @@ -17,17 +18,13 @@ @Fluent public interface Location extends Indexable, - Wrapper { + Wrapper, + HasName { /** * @return the subscription UUID */ String subscriptionId(); - /** - * @return the name of the location - */ - String name(); - /** * @return the display name of the location readable by humans */ 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 538047fecd9a..38a51a5a1fa6 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 @@ -8,6 +8,7 @@ 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.HasName; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; import com.microsoft.azure.management.resources.fluentcore.model.Appliable; import com.microsoft.azure.management.resources.fluentcore.model.Creatable; @@ -26,11 +27,8 @@ public interface ResourceGroup extends Resource, Refreshable, Wrapper, - Updatable { - /** - * @return the name of the resource group - */ - String name(); + Updatable, + HasName { /** * @return the provisioning state of the resource group 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 09608642228f..4ffb30a26d9b 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 @@ -13,11 +13,9 @@ * @param parent interface */ @Fluent -public interface ChildResource extends Indexable { - /** - * @return the name of this child object - */ - String name(); +public interface ChildResource extends + Indexable, + HasName { /** * @return the parent of this child object diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasName.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasName.java new file mode 100644 index 000000000000..e1be6a3abda6 --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasName.java @@ -0,0 +1,19 @@ +/** + * 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 that has a name. + */ +@Fluent +public interface HasName { + /** + * @return the name of the resource + */ + String name(); +} diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ParentlessChildResource.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ParentlessChildResource.java new file mode 100644 index 000000000000..7cfe0bf2f3aa --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/ParentlessChildResource.java @@ -0,0 +1,24 @@ +/** + * 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; +import com.microsoft.azure.management.resources.fluentcore.model.Indexable; + +/** + * Base interface used by child resources that do not immediately have their parent attached to them but are instead available directly off other entry points. + * @param parent interface + */ +@Fluent +public interface ParentlessChildResource extends + Indexable, + HasName { + + /** + * @return the parent of this child object + */ + ParentT getParent(); +} 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 413b49c9ecf4..68d6f50693ec 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 @@ -16,7 +16,10 @@ * Base interfaces for fluent resources. */ @LangDefinition() -public interface Resource extends Indexable { +public interface Resource extends + Indexable, + HasName { + /** * @return the resource ID string */ @@ -27,11 +30,6 @@ public interface Resource extends Indexable { */ String type(); - /** - * @return the name of the resource - */ - String name(); - /** * @return the name of the region the resource is in */ diff --git a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java index 3539330c4a20..069e3ee4383a 100644 --- a/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/model/Creatable.java @@ -8,6 +8,7 @@ import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.Method; +import com.microsoft.azure.management.resources.fluentcore.arm.models.HasName; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import rx.Observable; @@ -18,11 +19,9 @@ * @param the fluent type of the resource to be created */ @LangDefinition(ContainerName = "ResourceActions", CreateAsyncMultiThreadMethodParam = true) -public interface Creatable extends Indexable { - /** - * @return the name of the creatable resource. - */ - String name(); +public interface Creatable extends + Indexable, + HasName { /** * Execute the create request. 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 224fb3fdcd1d..7ade897dd48c 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 @@ -26,14 +26,14 @@ import com.microsoft.azure.management.network.PublicIpAddress; import com.microsoft.azure.management.network.Subnet; import com.microsoft.azure.management.network.LoadBalancer; -import com.microsoft.azure.management.network.TcpProbe; +import com.microsoft.azure.management.network.LoadBalancerTcpProbe; import com.microsoft.azure.management.network.LoadBalancingRule; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.InboundNatRule; -import com.microsoft.azure.management.network.Frontend; -import com.microsoft.azure.management.network.Backend; -import com.microsoft.azure.management.network.Probe; -import com.microsoft.azure.management.network.HttpProbe; +import com.microsoft.azure.management.network.LoadBalancerFrontend; +import com.microsoft.azure.management.network.LoadBalancerBackend; +import com.microsoft.azure.management.network.LoadBalancerProbe; +import com.microsoft.azure.management.network.LoadBalancerHttpProbe; import com.microsoft.azure.management.network.PublicFrontend; import com.microsoft.azure.management.network.PrivateFrontend; import com.microsoft.azure.management.storage.StorageAccount; @@ -358,7 +358,7 @@ public static void print(LoadBalancer resource) { // Show TCP probes info.append("\n\tTCP probes: ") .append(resource.tcpProbes().size()); - for (TcpProbe probe : resource.tcpProbes().values()) { + for (LoadBalancerTcpProbe probe : resource.tcpProbes().values()) { info.append("\n\t\tProbe name: ").append(probe.name()) .append("\n\t\t\tPort: ").append(probe.port()) .append("\n\t\t\tInterval in seconds: ").append(probe.intervalInSeconds()) @@ -375,7 +375,7 @@ public static void print(LoadBalancer resource) { // Show HTTP probes info.append("\n\tHTTP probes: ") .append(resource.httpProbes().size()); - for (HttpProbe probe : resource.httpProbes().values()) { + for (LoadBalancerHttpProbe probe : resource.httpProbes().values()) { info.append("\n\t\tProbe name: ").append(probe.name()) .append("\n\t\t\tPort: ").append(probe.port()) .append("\n\t\t\tInterval in seconds: ").append(probe.intervalInSeconds()) @@ -400,7 +400,7 @@ public static void print(LoadBalancer resource) { .append("\n\t\t\tIdle timeout in minutes: ").append(rule.idleTimeoutInMinutes()) .append("\n\t\t\tLoad distribution method: ").append(rule.loadDistribution().toString()); - Frontend frontend = rule.frontend(); + LoadBalancerFrontend frontend = rule.frontend(); info.append("\n\t\t\tFrontend: "); if (frontend != null) { info.append(frontend.name()); @@ -410,7 +410,7 @@ public static void print(LoadBalancer resource) { info.append("\n\t\t\tFrontend port: ").append(rule.frontendPort()); - Backend backend = rule.backend(); + LoadBalancerBackend backend = rule.backend(); info.append("\n\t\t\tBackend: "); if (backend != null) { info.append(backend.name()); @@ -420,7 +420,7 @@ public static void print(LoadBalancer resource) { info.append("\n\t\t\tBackend port: ").append(rule.backendPort()); - Probe probe = rule.probe(); + LoadBalancerProbe probe = rule.probe(); info.append("\n\t\t\tProbe: "); if (probe == null) { info.append("(None)"); @@ -432,7 +432,7 @@ public static void print(LoadBalancer resource) { // Show frontends info.append("\n\tFrontends: ") .append(resource.frontends().size()); - for (Frontend frontend : resource.frontends().values()) { + for (LoadBalancerFrontend frontend : resource.frontends().values()) { info.append("\n\t\tFrontend name: ").append(frontend.name()) .append("\n\t\t\tInternet facing: ").append(frontend.isPublic()); if (frontend.isPublic()) { @@ -498,7 +498,7 @@ public static void print(LoadBalancer resource) { // Show backends info.append("\n\tBackends: ") .append(resource.backends().size()); - for (Backend backend : resource.backends().values()) { + for (LoadBalancerBackend backend : resource.backends().values()) { info.append("\n\t\tBackend name: ").append(backend.name()); // Show assigned backend NICs diff --git a/azure/src/test/java/com/microsoft/azure/management/AzureTests.java b/azure/src/test/java/com/microsoft/azure/management/AzureTests.java index 69e7cf875aab..66719e4d6a06 100644 --- a/azure/src/test/java/com/microsoft/azure/management/AzureTests.java +++ b/azure/src/test/java/com/microsoft/azure/management/AzureTests.java @@ -110,6 +110,8 @@ public void setup() throws Exception { .withMode(DeploymentMode.COMPLETE) .create(); System.out.println("Created deployment: " + deployment.correlationId()); + + azure.resourceGroups().delete("rg" + testId); } @@ -223,7 +225,8 @@ public void testLoadBalancersInternalMinimum() throws Exception { * @throws Exception */ @Test public void testNetworks() throws Exception { - new TestNetwork(azure.networkSecurityGroups()).runTest(azure.networks(), azure.resourceGroups()); + new TestNetwork(azure.networkSecurityGroups()) + .runTest(azure.networks(), azure.resourceGroups()); } /** diff --git a/azure/src/test/java/com/microsoft/azure/management/TestLoadBalancer.java b/azure/src/test/java/com/microsoft/azure/management/TestLoadBalancer.java index 0bbfc1b7e227..c15a6c75c629 100644 --- a/azure/src/test/java/com/microsoft/azure/management/TestLoadBalancer.java +++ b/azure/src/test/java/com/microsoft/azure/management/TestLoadBalancer.java @@ -16,9 +16,9 @@ import com.microsoft.azure.management.compute.VirtualMachine; import com.microsoft.azure.management.compute.VirtualMachineSizeTypes; import com.microsoft.azure.management.compute.VirtualMachines; -import com.microsoft.azure.management.network.Backend; -import com.microsoft.azure.management.network.Frontend; -import com.microsoft.azure.management.network.HttpProbe; +import com.microsoft.azure.management.network.LoadBalancerBackend; +import com.microsoft.azure.management.network.LoadBalancerFrontend; +import com.microsoft.azure.management.network.LoadBalancerHttpProbe; import com.microsoft.azure.management.network.InboundNatPool; import com.microsoft.azure.management.network.InboundNatRule; import com.microsoft.azure.management.network.PublicFrontend; @@ -30,10 +30,10 @@ import com.microsoft.azure.management.network.NetworkInterface; import com.microsoft.azure.management.network.Networks; import com.microsoft.azure.management.network.PrivateFrontend; -import com.microsoft.azure.management.network.Probe; +import com.microsoft.azure.management.network.LoadBalancerProbe; import com.microsoft.azure.management.network.PublicIpAddress; import com.microsoft.azure.management.network.PublicIpAddresses; -import com.microsoft.azure.management.network.TcpProbe; +import com.microsoft.azure.management.network.LoadBalancerTcpProbe; import com.microsoft.azure.management.network.TransportProtocol; import com.microsoft.azure.management.resources.fluentcore.arm.Region; import com.microsoft.azure.management.resources.fluentcore.arm.ResourceUtils; @@ -449,7 +449,7 @@ public LoadBalancer updateResource(LoadBalancer resource) throws Exception { Assert.assertTrue(lbRule.backendPort() == 8080); Assert.assertTrue(lbRule.frontend().name().equalsIgnoreCase("default")); - Frontend frontend = resource.frontends().get("default"); + LoadBalancerFrontend frontend = resource.frontends().get("default"); Assert.assertTrue(frontend.isPublic()); Assert.assertTrue(((PublicFrontend) frontend).publicIpAddressId().equalsIgnoreCase(pip.id())); Assert.assertTrue(lbRule.probe().name().equalsIgnoreCase("default")); @@ -509,14 +509,12 @@ public LoadBalancer createResource(LoadBalancers resources) throws Exception { .withLoadBalancingRule(80, TransportProtocol.TCP) .create(); - //TODO Assert.assertTrue(lb.backends().containsKey("default")); Assert.assertTrue(lb.frontends().containsKey("default")); Assert.assertTrue(lb.tcpProbes().containsKey("default")); Assert.assertTrue(lb.loadBalancingRules().containsKey("default")); LoadBalancingRule lbrule = lb.loadBalancingRules().get("default"); Assert.assertTrue(lbrule.frontend().name().equalsIgnoreCase("default")); - //TODO Assert.assertTrue(lbrule.backend().name().equalsIgnoreCase("default")); Assert.assertTrue(lbrule.probe().name().equalsIgnoreCase("default")); return lb; @@ -566,7 +564,7 @@ public LoadBalancer updateResource(LoadBalancer resource) throws Exception { Assert.assertTrue(lbRule.backendPort() == 8080); Assert.assertTrue(lbRule.frontend().name().equalsIgnoreCase("default")); - Frontend frontend = resource.frontends().get("default"); + LoadBalancerFrontend frontend = resource.frontends().get("default"); Assert.assertTrue(!frontend.isPublic()); Assert.assertTrue(lbRule.probe().name().equalsIgnoreCase("default")); @@ -669,7 +667,7 @@ static void printLB(LoadBalancer resource) { // Show TCP probes info.append("\n\tTCP probes: ") .append(resource.tcpProbes().size()); - for (TcpProbe probe : resource.tcpProbes().values()) { + for (LoadBalancerTcpProbe probe : resource.tcpProbes().values()) { info.append("\n\t\tProbe name: ").append(probe.name()) .append("\n\t\t\tPort: ").append(probe.port()) .append("\n\t\t\tInterval in seconds: ").append(probe.intervalInSeconds()) @@ -686,7 +684,7 @@ static void printLB(LoadBalancer resource) { // Show HTTP probes info.append("\n\tHTTP probes: ") .append(resource.httpProbes().size()); - for (HttpProbe probe : resource.httpProbes().values()) { + for (LoadBalancerHttpProbe probe : resource.httpProbes().values()) { info.append("\n\t\tProbe name: ").append(probe.name()) .append("\n\t\t\tPort: ").append(probe.port()) .append("\n\t\t\tInterval in seconds: ").append(probe.intervalInSeconds()) @@ -711,7 +709,7 @@ static void printLB(LoadBalancer resource) { .append("\n\t\t\tIdle timeout in minutes: ").append(rule.idleTimeoutInMinutes()) .append("\n\t\t\tLoad distribution method: ").append(rule.loadDistribution().toString()); - Frontend frontend = rule.frontend(); + LoadBalancerFrontend frontend = rule.frontend(); info.append("\n\t\t\tFrontend: "); if (frontend != null) { info.append(frontend.name()); @@ -721,7 +719,7 @@ static void printLB(LoadBalancer resource) { info.append("\n\t\t\tFrontend port: ").append(rule.frontendPort()); - Backend backend = rule.backend(); + LoadBalancerBackend backend = rule.backend(); info.append("\n\t\t\tBackend: "); if (backend != null) { info.append(backend.name()); @@ -731,7 +729,7 @@ static void printLB(LoadBalancer resource) { info.append("\n\t\t\tBackend port: ").append(rule.backendPort()); - Probe probe = rule.probe(); + LoadBalancerProbe probe = rule.probe(); info.append("\n\t\t\tProbe: "); if (probe == null) { info.append("(None)"); @@ -743,7 +741,7 @@ static void printLB(LoadBalancer resource) { // Show frontends info.append("\n\tFrontends: ") .append(resource.frontends().size()); - for (Frontend frontend : resource.frontends().values()) { + for (LoadBalancerFrontend frontend : resource.frontends().values()) { info.append("\n\t\tFrontend name: ").append(frontend.name()) .append("\n\t\t\tInternet facing: ").append(frontend.isPublic()); if (frontend.isPublic()) { @@ -809,7 +807,7 @@ static void printLB(LoadBalancer resource) { // Show backends info.append("\n\tBackends: ") .append(resource.backends().size()); - for (Backend backend : resource.backends().values()) { + for (LoadBalancerBackend backend : resource.backends().values()) { info.append("\n\t\tBackend name: ").append(backend.name()); // Show assigned backend NICs diff --git a/azure/src/test/java/com/microsoft/azure/management/TestNetworkInterface.java b/azure/src/test/java/com/microsoft/azure/management/TestNetworkInterface.java index 7a21ec702019..c96b0f3d5d09 100644 --- a/azure/src/test/java/com/microsoft/azure/management/TestNetworkInterface.java +++ b/azure/src/test/java/com/microsoft/azure/management/TestNetworkInterface.java @@ -9,7 +9,7 @@ import org.junit.Assert; -import com.microsoft.azure.management.network.Backend; +import com.microsoft.azure.management.network.LoadBalancerBackend; import com.microsoft.azure.management.network.InboundNatRule; import com.microsoft.azure.management.network.NetworkInterface; import com.microsoft.azure.management.network.NetworkInterfaces; @@ -84,9 +84,9 @@ public static void printNic(NetworkInterface resource) { .append("\n\t\tAssociated subnet name: ").append(ipConfig.subnetName()); // Show associated load balancer backends - final List backends = ipConfig.listAssociatedLoadBalancerBackends(); + final List backends = ipConfig.listAssociatedLoadBalancerBackends(); info.append("\n\t\tAssociated load balancer backends: ").append(backends.size()); - for (Backend backend : backends) { + for (LoadBalancerBackend backend : backends) { info.append("\n\t\t\tLoad balancer ID: ").append(backend.parent().id()) .append("\n\t\t\t\tBackend name: ").append(backend.name()); }