From 03bc0b3ea6d4b2b47bdaf8ce5ee16e234168b6ad Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 07:01:51 -0700 Subject: [PATCH 01/29] language annotations on Backend interfaces --- .../com/microsoft/azure/management/network/Backend.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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..d9939695c9a5 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,8 @@ import java.util.Map; import java.util.Set; +import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; 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 +20,7 @@ /** * An immutable client-side representation of an load balancer's backend address pool. */ +@LangDefinition() public interface Backend extends Wrapper, ChildResource, @@ -37,6 +40,7 @@ public interface Backend extends /** * Grouping of backend definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the backend definition. @@ -59,6 +63,7 @@ interface WithAttach extends /** The entirety of a backend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach { @@ -67,12 +72,14 @@ interface Definition extends /** * Grouping of backend update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { } /** * The entirety of a backend update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable { } @@ -80,6 +87,7 @@ interface Update extends /** * Grouping of backend definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the backend definition. @@ -102,6 +110,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach { From aac0b9ebf721c490d2472c48ca225116566cb49a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:29:15 -0700 Subject: [PATCH 02/29] language annotations on LB frontend interfaces --- .../com/microsoft/azure/management/network/Frontend.java | 2 ++ .../azure/management/network/PrivateFrontend.java | 9 +++++++++ .../azure/management/network/PublicFrontend.java | 9 +++++++++ 3 files changed, 20 insertions(+) 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..1ee06db9a17e 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.LangDefinition; 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. */ +@LangDefinition() public interface Frontend extends Wrapper, ChildResource, 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..09b2e190261c 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,6 +5,8 @@ */ 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.network.model.HasPrivateIpAddress; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; @@ -12,6 +14,7 @@ /** * An immutable client-side representation of a private frontend of an internal load balancer. */ +@LangDefinition() public interface PrivateFrontend extends Frontend, HasPrivateIpAddress { @@ -34,6 +37,7 @@ public interface PrivateFrontend extends /** * Grouping of private frontend definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a private frontend definition. @@ -72,6 +76,7 @@ interface WithAttach extends /** The entirety of a private frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -81,6 +86,7 @@ interface Definition extends /** * Grouping of private frontend update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of a private frontend update allowing to specify a subnet from the selected network. @@ -99,6 +105,7 @@ interface WithSubnet { /** * The entirety of a private frontend update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithSubnet, @@ -108,6 +115,7 @@ interface Update extends /** * Grouping of private frontend definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a private frontend definition. @@ -145,6 +153,7 @@ interface WithAttach extends /** The entirety of a private frontend definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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..bbf60881eb81 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,12 +5,15 @@ */ 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.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. */ +@LangDefinition() public interface PublicFrontend extends Frontend { /** @@ -21,6 +24,7 @@ public interface PublicFrontend extends Frontend { /** * Grouping of public frontend definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a public frontend definition. @@ -64,6 +68,7 @@ interface WithAttach extends /** The entirety of a public frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -73,6 +78,7 @@ interface Definition extends /** * Grouping of public frontend update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of a public frontend update allowing to specify an existing public IP address. @@ -97,6 +103,7 @@ interface WithPublicIpAddress { /** * The entirety of a public frontend update as part of an Internet-facing load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPublicIpAddress { @@ -105,6 +112,7 @@ interface Update extends /** * Grouping of public frontend definition stages applicable as part of an Internet-facing load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a public frontend definition. @@ -147,6 +155,7 @@ interface WithAttach extends /** The entirety of a public frontend definition as part of an Internet-facing load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From f82a315c14a9ab3a27e4a0ac8813c2515195cc70 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:33:53 -0700 Subject: [PATCH 03/29] language annotations for load balancer probes --- .../microsoft/azure/management/network/HttpProbe.java | 9 +++++++++ .../com/microsoft/azure/management/network/Probe.java | 2 ++ .../com/microsoft/azure/management/network/TcpProbe.java | 9 +++++++++ 3 files changed, 20 insertions(+) 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..b91def58e130 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,15 @@ */ 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.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of an HTTP load balancing probe. */ +@LangDefinition() public interface HttpProbe extends Probe { /** @@ -21,6 +24,7 @@ public interface HttpProbe extends Probe { /** * Grouping of probe definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -93,6 +97,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -102,6 +107,7 @@ interface Definition extends /** * Grouping of probe update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the HTTP probe update allowing to modify the port number to monitor. @@ -150,6 +156,7 @@ interface WithRequestPath { /** * The entirety of a probe update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithIntervalInSeconds, @@ -161,6 +168,7 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -234,6 +242,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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..e185f0b171ba 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.LangDefinition; 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. */ +@LangDefinition() public interface Probe extends Wrapper, ChildResource, 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..479111ab98bc 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,17 +5,21 @@ */ 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.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of a TCP load balancing probe. */ +@LangDefinition() public interface TcpProbe extends Probe { /** * Grouping of probe definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -79,6 +83,7 @@ interface WithAttach extends /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -88,6 +93,7 @@ interface Definition extends /** * Grouping of probe update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the TCP probe update allowing to modify the port number to monitor. @@ -129,6 +135,7 @@ interface WithNumberOfProbes { /** * The entirety of a probe update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPort, @@ -139,6 +146,7 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -202,6 +210,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From 7417721a2da866a4755f5f7874c320f39ade0999 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:36:31 -0700 Subject: [PATCH 04/29] language annotations for load balancer inbound NAT pool --- .../azure/management/network/InboundNatPool.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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..19beacb647b0 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,8 @@ */ 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.network.implementation.InboundNatPoolInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFrontend; @@ -17,6 +19,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ +@LangDefinition() public interface InboundNatPool extends HasFrontend, HasBackendPort, @@ -37,6 +40,7 @@ public interface InboundNatPool extends /** * Grouping of inbound NAT pool definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -98,6 +102,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -110,6 +115,7 @@ interface Definition extends /** * Grouping of inbound NAT pool update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of an inbound NAT pool update allowing to specify the transport protocol for the pool to apply to. @@ -149,6 +155,7 @@ interface WithBackendPort extends /** * The entirety of an inbound NAT pool update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithProtocol, @@ -160,6 +167,7 @@ interface Update extends /** * Grouping of inbound NAT pool definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -221,6 +229,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From dda6b1a86cb7e5e23b4978be86e9b37a26a5e838 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:38:48 -0700 Subject: [PATCH 05/29] language annotations for load balancer's inbound nat rule --- .../azure/management/network/InboundNatRule.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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..ad90239cd9e2 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,8 @@ */ 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.network.implementation.InboundNatRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -18,6 +20,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ +@LangDefinition() public interface InboundNatRule extends HasFrontend, HasBackendPort, @@ -49,6 +52,7 @@ public interface InboundNatRule extends /** * Grouping of inbound NAT rule definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -133,6 +137,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProtocol, @@ -144,6 +149,7 @@ interface Definition extends /** * Grouping of inbound NAT rule update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of an inbound NAT rule update allowing to specify the backend port. @@ -200,6 +206,7 @@ interface WithIdleTimeout { /** * The entirety of an inbound NAT rule update as part of a load balancer update. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithBackendPort, @@ -213,6 +220,7 @@ interface Update extends /** * Grouping of inbound NAT rule definition stages as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -297,6 +305,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithProtocol, From 03102b898c510c0a852d3a28591e12bf34b13303 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:41:38 -0700 Subject: [PATCH 06/29] updated language annotations for LoadBalancer --- .../microsoft/azure/management/network/LoadBalancer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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..850bf90bafd4 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 @@ -70,7 +70,7 @@ public interface LoadBalancer extends /** * The entirety of the load balancer definition. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Definition", ContainerFileName = "IDefinition") + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -93,7 +93,7 @@ interface Definition extends /** * Grouping of load balancer definition stages. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) interface DefinitionStages { /** * The first stage of a load balancer definition. @@ -414,7 +414,7 @@ interface WithInboundNatPool { /** * Grouping of load balancer update stages. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of the load balancer update allowing to add or remove backends. @@ -714,7 +714,7 @@ interface WithInboundNatPool { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "~/LoadBalancer.Update", ContainerFileName = "IUpdate") + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") interface Update extends Appliable, Resource.UpdateWithTags, From b159d173b2fc728a551696202ec6531e2d491c75 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 09:57:02 -0700 Subject: [PATCH 07/29] simplilfying Backend lang annotations --- .../com/microsoft/azure/management/network/Backend.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 d9939695c9a5..61918ca0bb8b 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 @@ -63,7 +63,7 @@ interface WithAttach extends /** The entirety of a backend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach { @@ -79,7 +79,7 @@ interface UpdateStages { /** * The entirety of a backend update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable { } @@ -110,7 +110,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach { From 379f95b04c51bd87205564ee43a5f4e27ecd03c8 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:00:27 -0700 Subject: [PATCH 08/29] simplifying frontend lang annotations --- .../microsoft/azure/management/network/PrivateFrontend.java | 6 +++--- .../microsoft/azure/management/network/PublicFrontend.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 09b2e190261c..644e0b221dfe 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 @@ -76,7 +76,7 @@ interface WithAttach extends /** The entirety of a private frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -105,7 +105,7 @@ interface WithSubnet { /** * The entirety of a private frontend update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithSubnet, @@ -153,7 +153,7 @@ interface WithAttach extends /** The entirety of a private frontend definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 bbf60881eb81..488fe2fe3bf9 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 @@ -68,7 +68,7 @@ interface WithAttach extends /** The entirety of a public frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -103,7 +103,7 @@ interface WithPublicIpAddress { /** * The entirety of a public frontend update as part of an Internet-facing load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPublicIpAddress { @@ -155,7 +155,7 @@ interface WithAttach extends /** The entirety of a public frontend definition as part of an Internet-facing load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From 580c79398423c598e4ee30ec7facae29c8f19351 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:02:21 -0700 Subject: [PATCH 09/29] language annotations on LB rules --- .../azure/management/network/LoadBalancingRule.java | 9 +++++++++ 1 file changed, 9 insertions(+) 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..8b0f664290d8 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,8 @@ */ 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.network.implementation.LoadBalancingRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -18,6 +20,7 @@ /** * An immutable client-side representation of an HTTP load balancing rule. */ +@LangDefinition() public interface LoadBalancingRule extends Wrapper, ChildResource, @@ -56,6 +59,7 @@ public interface LoadBalancingRule extends /** * Grouping of load balancing rule definition stages. */ + @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the load balancing rule definition. @@ -180,6 +184,7 @@ interface WithLoadDistribution { /** The entirety of a load balancing rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -194,6 +199,7 @@ interface Definition extends /** * Grouping of load balancing rule update stages. */ + @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) interface UpdateStages { /** * The stage of a load balancing rule update allowing to modify the transport protocol the rule applies to. @@ -262,6 +268,7 @@ interface WithLoadDistribution { /** * The entirety of a load balancing rule update as part of a load balancer update. */ + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithFrontendPort, @@ -276,6 +283,7 @@ interface Update extends /** * Grouping of load balancing rule definition stages applicable as part of a load balancer update. */ + @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the load balancing rule definition. @@ -400,6 +408,7 @@ interface WithAttach extends /** The entirety of a load balancing rule definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From c092a4f93aa65e9621d84b0b8ecc1c675634d9d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:08:14 -0700 Subject: [PATCH 10/29] simplifying probe language annotations --- .../com/microsoft/azure/management/network/HttpProbe.java | 6 +++--- .../com/microsoft/azure/management/network/TcpProbe.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 b91def58e130..e610035b1720 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 @@ -97,7 +97,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -156,7 +156,7 @@ interface WithRequestPath { /** * The entirety of a probe update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithIntervalInSeconds, @@ -242,7 +242,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 479111ab98bc..6a233f6f8bac 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 @@ -83,7 +83,7 @@ interface WithAttach extends /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -135,7 +135,7 @@ interface WithNumberOfProbes { /** * The entirety of a probe update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPort, @@ -210,7 +210,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From 8b39ed886d186fe2a16a769d83514f82a470a484 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:09:19 -0700 Subject: [PATCH 11/29] simplifying inbound NAT pool lang annotations --- .../microsoft/azure/management/network/InboundNatPool.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 19beacb647b0..e66d724d9940 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 @@ -102,7 +102,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -155,7 +155,7 @@ interface WithBackendPort extends /** * The entirety of an inbound NAT pool update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithProtocol, @@ -229,7 +229,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From 1ba8cdc23608801191ee37fb97f688f84adc154b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:10:42 -0700 Subject: [PATCH 12/29] simplifying inbound nat rule lang annotations --- .../microsoft/azure/management/network/InboundNatRule.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ad90239cd9e2..4e90e4b23fe9 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 @@ -137,7 +137,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProtocol, @@ -206,7 +206,7 @@ interface WithIdleTimeout { /** * The entirety of an inbound NAT rule update as part of a load balancer update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithBackendPort, @@ -305,7 +305,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition") + @LangDefinition() interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithProtocol, From 3df9f032319307d6da0e13354263c2a9e69470a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 10:11:47 -0700 Subject: [PATCH 13/29] simplifying load balancer lang annotations --- .../com/microsoft/azure/management/network/LoadBalancer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 850bf90bafd4..6e524650bc46 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 @@ -70,7 +70,7 @@ public interface LoadBalancer extends /** * The entirety of the load balancer definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition() interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -714,7 +714,7 @@ interface WithInboundNatPool { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition() interface Update extends Appliable, Resource.UpdateWithTags, From 18e70ced9ceeb76a267104533627602ecce35523 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Sep 2016 17:10:46 -0700 Subject: [PATCH 14/29] all networking lang annotations on intrerfaces revisited --- .../azure/management/network/Backend.java | 22 ++++++++++++---- .../azure/management/network/HttpProbe.java | 22 ++++++++++++---- .../management/network/InboundNatPool.java | 22 ++++++++++++---- .../management/network/InboundNatRule.java | 22 ++++++++++++---- .../management/network/LoadBalancer.java | 17 ++++++++++--- .../management/network/LoadBalancingRule.java | 22 ++++++++++++---- .../azure/management/network/Network.java | 17 ++++++++++--- .../management/network/NetworkInterface.java | 17 ++++++++++--- .../network/NetworkSecurityGroup.java | 17 ++++++++++--- .../network/NetworkSecurityRule.java | 24 +++++++++++++----- .../network/NicIpConfiguration.java | 25 ++++++++++++++----- .../management/network/PrivateFrontend.java | 22 ++++++++++++---- .../management/network/PublicFrontend.java | 22 ++++++++++++---- .../management/network/PublicIpAddress.java | 17 ++++++++++--- .../azure/management/network/Subnet.java | 25 ++++++++++++++----- .../azure/management/network/TcpProbe.java | 22 ++++++++++++---- .../network/model/HasBackendPort.java | 19 ++++++++++++++ .../network/model/HasFloatingIp.java | 19 ++++++++++++++ .../management/network/model/HasFrontend.java | 18 +++++++++++++ .../network/model/HasLoadBalancingRules.java | 2 ++ .../network/model/HasPrivateIpAddress.java | 18 +++++++++++++ .../management/network/model/HasProtocol.java | 20 ++++++++++++++- 22 files changed, 352 insertions(+), 79 deletions(-) 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 61918ca0bb8b..0f2bd7ff0cf3 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 @@ -40,7 +40,11 @@ public interface Backend extends /** * Grouping of backend definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the backend definition. @@ -63,7 +67,7 @@ interface WithAttach extends /** The entirety of a backend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach { @@ -72,7 +76,11 @@ interface Definition extends /** * Grouping of backend update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { } @@ -87,7 +95,11 @@ interface Update extends /** * Grouping of backend definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the backend definition. @@ -110,7 +122,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach { 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 e610035b1720..1149b9619652 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 @@ -24,7 +24,11 @@ public interface HttpProbe extends Probe { /** * Grouping of probe definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -97,7 +101,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -107,7 +111,11 @@ interface Definition extends /** * Grouping of probe update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the HTTP probe update allowing to modify the port number to monitor. @@ -168,7 +176,11 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -242,7 +254,7 @@ interface WithNumberOfProbes { /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 e66d724d9940..12672cd4ecf8 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 @@ -40,7 +40,11 @@ public interface InboundNatPool extends /** * Grouping of inbound NAT pool definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -102,7 +106,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -115,7 +119,11 @@ interface Definition extends /** * Grouping of inbound NAT pool update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an inbound NAT pool update allowing to specify the transport protocol for the pool to apply to. @@ -167,7 +175,11 @@ interface Update extends /** * Grouping of inbound NAT pool definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -229,7 +241,7 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 4e90e4b23fe9..70982495c335 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 @@ -52,7 +52,11 @@ public interface InboundNatRule extends /** * Grouping of inbound NAT rule definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -137,7 +141,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProtocol, @@ -149,7 +153,11 @@ interface Definition extends /** * Grouping of inbound NAT rule update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an inbound NAT rule update allowing to specify the backend port. @@ -220,7 +228,11 @@ interface Update extends /** * Grouping of inbound NAT rule definition stages as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -305,7 +317,7 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithProtocol, 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 6e524650bc46..4c66765fea7c 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 @@ -9,6 +9,7 @@ import java.util.Map; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; import com.microsoft.azure.management.network.implementation.LoadBalancerInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.network.model.HasNetworkInterfaces; @@ -70,7 +71,7 @@ public interface LoadBalancer extends /** * The entirety of the load balancer definition. */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -93,7 +94,11 @@ interface Definition extends /** * Grouping of load balancer definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a load balancer definition. @@ -414,7 +419,11 @@ interface WithInboundNatPool { /** * Grouping of load balancer update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the load balancer update allowing to add or remove backends. @@ -714,7 +723,7 @@ interface WithInboundNatPool { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Appliable, Resource.UpdateWithTags, 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 8b0f664290d8..6a4b5acbaf7c 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 @@ -59,7 +59,11 @@ public interface LoadBalancingRule extends /** * Grouping of load balancing rule definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the load balancing rule definition. @@ -184,7 +188,7 @@ interface WithLoadDistribution { /** The entirety of a load balancing rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -199,7 +203,11 @@ interface Definition extends /** * Grouping of load balancing rule update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a load balancing rule update allowing to modify the transport protocol the rule applies to. @@ -283,7 +291,11 @@ interface Update extends /** * Grouping of load balancing rule definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the load balancing rule definition. @@ -408,7 +420,7 @@ interface WithAttach extends /** The entirety of a load balancing rule definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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..44df5242699c 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 @@ -9,6 +9,7 @@ import java.util.Map; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; 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; @@ -52,7 +53,7 @@ public interface Network extends /** * The entirety of the virtual network definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -64,7 +65,11 @@ interface Definition extends /** * Grouping of virtual network definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a virtual network definition. @@ -165,7 +170,11 @@ interface WithCreateAndSubnet extends /** * Grouping of virtual network update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the virtual network update allowing to add or remove subnets. @@ -251,7 +260,7 @@ interface WithAddressSpace { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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..78183f95403d 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 @@ -7,6 +7,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.network.implementation.NetworkInterfaceInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -142,7 +143,7 @@ public interface NetworkInterface extends /** * The entirety of the network interface definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -155,7 +156,11 @@ interface Definition extends /** * Grouping of network interface definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the network interface. @@ -376,7 +381,11 @@ interface WithCreate extends /** * Grouping of network interface update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the network interface update allowing to specify subnet. @@ -580,7 +589,7 @@ interface WithIpConfiguration { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Appliable, Resource.UpdateWithTags, 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..d8098f99f3a3 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 @@ -9,6 +9,7 @@ import java.util.Map; import com.microsoft.azure.management.apigeneration.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; 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; @@ -58,7 +59,7 @@ public interface NetworkSecurityGroup extends /** * The entirety of the network security group definition. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -68,7 +69,11 @@ interface Definition extends /** * Grouping of network security group definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the definition. @@ -114,7 +119,11 @@ interface WithCreate extends /** * Grouping of network security group update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the resource definition allowing to add or remove security rules. @@ -149,7 +158,7 @@ interface WithRule { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Appliable, Resource.UpdateWithTags, 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..44f95ef75d60 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 @@ -73,7 +73,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -88,7 +88,11 @@ 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) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a security rule definition. @@ -282,7 +286,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithDirectionAccess, @@ -297,7 +301,11 @@ 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) + @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 +484,7 @@ 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) + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends UpdateStages.WithDirectionAccess, UpdateStages.WithSourceAddress, @@ -505,7 +513,11 @@ interface Update extends /** * Grouping of security rule update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) 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/NicIpConfiguration.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NicIpConfiguration.java index 2bc722b22f85..09b994f20dba 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,6 +1,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.network.implementation.NetworkInterfaceIPConfigurationInner; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -52,7 +53,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -65,7 +66,11 @@ 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) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -218,7 +223,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, @@ -231,7 +236,11 @@ interface UpdateDefinition extends /** * Grouping of network interface IP configuration definition stages. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -384,7 +393,7 @@ interface WithAttach /** * The entirety of a network interface IP configuration update as part of a network interface update. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithSubnet, @@ -397,7 +406,11 @@ interface Update extends /** * Grouping of network interface IP configuration update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the network interface IP configuration update allowing to specify subnet. 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 644e0b221dfe..b52e30c9ea39 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 @@ -37,7 +37,11 @@ public interface PrivateFrontend extends /** * Grouping of private frontend definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a private frontend definition. @@ -76,7 +80,7 @@ interface WithAttach extends /** The entirety of a private frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -86,7 +90,11 @@ interface Definition extends /** * Grouping of private frontend update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a private frontend update allowing to specify a subnet from the selected network. @@ -115,7 +123,11 @@ interface Update extends /** * Grouping of private frontend definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a private frontend definition. @@ -153,7 +165,7 @@ interface WithAttach extends /** The entirety of a private frontend definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 488fe2fe3bf9..21d083bcd73f 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 @@ -24,7 +24,11 @@ public interface PublicFrontend extends Frontend { /** * Grouping of public frontend definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a public frontend definition. @@ -68,7 +72,7 @@ interface WithAttach extends /** The entirety of a public frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -78,7 +82,11 @@ interface Definition extends /** * Grouping of public frontend update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a public frontend update allowing to specify an existing public IP address. @@ -112,7 +120,11 @@ interface Update extends /** * Grouping of public frontend definition stages applicable as part of an Internet-facing load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a public frontend definition. @@ -155,7 +167,7 @@ interface WithAttach extends /** The entirety of a public frontend definition as part of an Internet-facing load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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..37a20b30a9d2 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 @@ -6,6 +6,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.network.implementation.PublicIPAddressInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -85,7 +86,7 @@ public interface PublicIpAddress extends /** * Container interface for all the definitions. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -95,7 +96,11 @@ interface Definition extends /** * Grouping of public IP address definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a public IP address definition. @@ -209,7 +214,7 @@ interface WithCreate extends *

* Use {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Appliable, UpdateStages.WithIpAddress, @@ -222,7 +227,11 @@ interface Update extends /** * Grouping of public IP address update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) 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/Subnet.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/Subnet.java index 3d3fe90ff363..84f63d1dcf4c 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 @@ -6,6 +6,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.network.implementation.SubnetInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -35,7 +36,11 @@ public interface Subnet extends /** * Grouping of subnet definition stages. */ - @LangDefinition(ContainerName = "~/Subnet.Definition", ContainerFileName = "IDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the subnet definition. @@ -92,7 +97,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAddressPrefix, @@ -102,7 +107,11 @@ interface Definition extends /** * Grouping of subnet update stages. */ - @LangDefinition(ContainerName = "~/Subnet.Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the subnet update allowing to change the address space for the subnet. @@ -139,7 +148,7 @@ interface WithNetworkSecurityGroup { /** * The entirety of a subnet update as part of a network update. */ - @LangDefinition(ContainerName = "~/Subnet.Update", ContainerFileName = "IUpdate") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends UpdateStages.WithAddressPrefix, UpdateStages.WithNetworkSecurityGroup, @@ -149,7 +158,11 @@ interface Update extends /** * Grouping of subnet definition stages applicable as part of a virtual network update. */ - @LangDefinition(ContainerName = "~/Subnet.UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the subnet definition. @@ -206,7 +219,7 @@ 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") + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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 6a233f6f8bac..a36646fb7f99 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 @@ -19,7 +19,11 @@ public interface TcpProbe extends Probe { /** * Grouping of probe definition stages. */ - @LangDefinition(ContainerName = "Definition", ContainerFileName = "IDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -83,7 +87,7 @@ interface WithAttach extends /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -93,7 +97,11 @@ interface Definition extends /** * Grouping of probe update stages. */ - @LangDefinition(ContainerName = "Update", ContainerFileName = "IUpdate", IsContainerOnly = true) + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the TCP probe update allowing to modify the port number to monitor. @@ -146,7 +154,11 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ - @LangDefinition(ContainerName = "UpdateDefinition", ContainerFileName = "IUpdateDefinition", IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -210,7 +222,7 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition() + @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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..8523c86df30f 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,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.IPAllocationMethod; /** * An interface representing a model's ability to reference a private IP address. */ +@LangDefinition() public interface HasPrivateIpAddress { /** * @return the protocol @@ -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. From c557748a08a786980a6df0fc959fee007403f28b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 16:29:57 -0700 Subject: [PATCH 15/29] factoring out a shared HasSubnet interface to help enforce consistency in how resources across different services reference subnets --- .../fluentcore/arm/models/HasSubnet.java | 97 +++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasSubnet.java 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..c7cd9ea1f70b --- /dev/null +++ b/azure-mgmt-resources/src/main/java/com/microsoft/azure/management/resources/fluentcore/arm/models/HasSubnet.java @@ -0,0 +1,97 @@ +/** + * 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.LangDefinition; +import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; + +/** + * An interface representing a model's ability to reference a subnet by its name and network's ID. + */ +@LangDefinition() +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. + */ + @LangDefinition( + ContainerName = "Definition", + ContainerFileName = "IDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + 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. + */ + @LangDefinition( + ContainerName = "Update", + ContainerFileName = "IUpdate", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + 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. + */ + @LangDefinition( + ContainerName = "UpdateDefinition", + ContainerFileName = "IUpdateDefinition", + IsContainerOnly = true, + MethodConversionType = MethodConversion.OnlyMethod) + 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); + } + } +} From 80eee0592b654bc01e00c03dd1de29ee15d8a778 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 16:30:56 -0700 Subject: [PATCH 16/29] refactoring LB private frontend to reference the shared HasSubnet interface --- .../management/network/PrivateFrontend.java | 16 ++++------------ .../network/implementation/FrontendImpl.java | 12 +++++++++--- 2 files changed, 13 insertions(+), 15 deletions(-) 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 b52e30c9ea39..8cb18f8b2d14 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 @@ -8,6 +8,7 @@ import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; 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; @@ -17,17 +18,8 @@ @LangDefinition() 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 @@ -54,7 +46,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/implementation/FrontendImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java index c034669e2a2f..8cc347d6aa19 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 @@ -142,10 +142,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; } From 6c19eb0942befb75bc07b763e9742a1d41547581 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 16:52:12 -0700 Subject: [PATCH 17/29] NIC simplification - no need for primarySubnetId() since it can be retrieved from primaryIpConfiguration() - renaming primaryNetwork() as getPrimaryNetwork() to be consistent with the naming of methods that make a separate call to Azure, rather than directly retrieve a prooperty of the object. - removing the caching logic for the primary network as it seems unnecessary. - refactoring NicIpConfiguration to use the shared HasSubnet interface for better API consistency enforcement --- .../management/network/NetworkInterface.java | 7 +----- .../network/NicIpConfiguration.java | 9 +++---- .../implementation/NetworkInterfaceImpl.java | 14 ++--------- .../NicIpConfigurationImpl.java | 24 +++++++++++++++---- .../compute/samples/ManageVirtualMachine.java | 2 +- .../azure/management/samples/Utils.java | 3 ++- .../microsoft/azure/TestNetworkInterface.java | 6 +++-- 7 files changed, 32 insertions(+), 33 deletions(-) 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 78183f95403d..4fda73c68497 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 @@ -79,11 +79,6 @@ public interface NetworkInterface extends */ 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. *

@@ -91,7 +86,7 @@ public interface NetworkInterface extends * * @return the virtual network associated with this network interface. */ - Network primaryNetwork(); + Network getPrimaryNetwork(); /** * Gets the private IP address allocated to this network interface's primary IP configuration. 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 09b994f20dba..aa6712700c60 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 @@ -5,6 +5,7 @@ import com.microsoft.azure.management.network.implementation.NetworkInterfaceIPConfigurationInner; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; 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; @@ -17,7 +18,8 @@ public interface NicIpConfiguration extends Wrapper, ChildResource, - HasPrivateIpAddress { + HasPrivateIpAddress, + HasSubnet { // Getters /** @@ -32,11 +34,6 @@ public interface NicIpConfiguration extends */ 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. */ 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 f96daad74c7c..fe99194f640b 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 @@ -61,7 +61,6 @@ class NetworkInterfaceImpl private NetworkSecurityGroup existingNetworkSecurityGroupToAssociate; // Cached related resources. private PublicIpAddress primaryPublicIp; - private Network primaryNetwork; private NetworkSecurityGroup networkSecurityGroup; NetworkInterfaceImpl(String name, @@ -293,16 +292,8 @@ public PublicIpAddress primaryPublicIpAddress() { } @Override - public String primarySubnetId() { - return this.primaryIpConfiguration().subnetId(); - } - - @Override - public Network primaryNetwork() { - if (this.primaryNetwork == null) { - this.primaryNetwork = this.primaryIpConfiguration().getNetwork(); - } - return this.primaryNetwork; + public Network getPrimaryNetwork() { + return this.primaryIpConfiguration().getNetwork(); } @Override @@ -402,7 +393,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..99e81fb08a9e 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 @@ -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 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..ae2f06af3885 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().getPrimaryNetwork(); //============================================================= 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/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()); From 0143034a94905c4ab7a418842f65e52c4883fcc7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 17:17:14 -0700 Subject: [PATCH 18/29] NIC simplification: - removing primary-related accessors for PIP and Network from NIC because they are avaialable easily enough via primaryIpConfiguration() - renaming VirtualMachine#primaryPublicIpAddress() as getPrimaryPublicIpAddress() to be consistent with other methods that actually call Azure, rather than simply return a direct property (also removing the caching logic as it seems a bit unnecessary) - adding VirtualMachine#primaryPublicIpAddressId() as a shortcut --- .../management/compute/VirtualMachine.java | 7 ++++++- .../implementation/VirtualMachineImpl.java | 14 +++++++------- .../management/network/NetworkInterface.java | 18 ------------------ .../implementation/NetworkInterfaceImpl.java | 15 --------------- .../compute/samples/ManageVirtualMachine.java | 2 +- .../network/samples/ManageIPAddress.java | 6 +++--- .../azure/TestVirtualMachineNics.java | 2 +- 7 files changed, 18 insertions(+), 46 deletions(-) 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..d3a7c250d3db 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 @@ -137,7 +137,12 @@ public interface VirtualMachine extends * * @return the public IP of the primary network interface */ - PublicIpAddress primaryPublicIpAddress(); + 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. 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 852d301c0abc..20a90e7d055b 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 @@ -766,11 +765,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 @@ -1195,7 +1196,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/NetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java index 4fda73c68497..58b4e7a0bd53 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 @@ -70,24 +70,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(); - - /** - * 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 getPrimaryNetwork(); - /** * Gets the private IP address allocated to this network interface's primary IP configuration. *

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 fe99194f640b..2cc532830803 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,7 +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 NetworkSecurityGroup networkSecurityGroup; NetworkInterfaceImpl(String name, @@ -283,19 +282,6 @@ public List dnsServers() { return this.dnsServerIps(); } - @Override - public PublicIpAddress primaryPublicIpAddress() { - if (this.primaryPublicIp == null) { - this.primaryPublicIp = this.primaryIpConfiguration().getPublicIpAddress(); - } - return primaryPublicIp; - } - - @Override - public Network getPrimaryNetwork() { - return this.primaryIpConfiguration().getNetwork(); - } - @Override public String primaryPrivateIp() { return this.primaryIpConfiguration().privateIpAddress(); @@ -392,7 +378,6 @@ private NicIpConfigurationImpl prepareNewNicIpConfiguration(String name) { } private void clearCachedRelatedResources() { - this.primaryPublicIp = null; this.networkSecurityGroup = null; this.nicPrimaryIpConfiguration = null; } 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 ae2f06af3885..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().getPrimaryNetwork(); + 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/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; } From 3ec1b0c3a547ef42247f7fc24c0d957270a9caf7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 17:35:39 -0700 Subject: [PATCH 19/29] javadoc fix --- .../azure/management/network/model/HasPrivateIpAddress.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 8523c86df30f..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 @@ -15,7 +15,7 @@ @LangDefinition() public interface HasPrivateIpAddress { /** - * @return the protocol + * @return the private IP address associated with this resource */ String privateIpAddress(); From bb59287f7b02c3f4aa15a5654d83fb49ab300a63 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 17:36:25 -0700 Subject: [PATCH 20/29] factoring out public IP related methods into a standalone interface for better consistency and reuse --- .../network/model/HasPublicIpAddress.java | 148 ++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java 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..f90c3c1e4fb8 --- /dev/null +++ b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java @@ -0,0 +1,148 @@ +/** + * 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 network interface IP configuration definition allowing to associate it with + * a public IP address. + * + * @param the next stage of the definition + */ + 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 + */ + 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); + + /** + * 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); + } + } + + /** + * 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 { + } + + /** + * 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 network interface IP configuration definition allowing to associate it with + * a public IP address. + * + * @param the next stage of the definition + */ + 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 + */ + 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); + + /** + * 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); + } + } +} From ec45559a5a6bb656b3813c498b2260afba6892d1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 17:45:28 -0700 Subject: [PATCH 21/29] refactoring NIC IP configuration to use the shared HasPublicIpAddress interface for better consistency --- .../network/NicIpConfiguration.java | 137 +----------------- .../network/model/HasPublicIpAddress.java | 67 +++++++-- 2 files changed, 62 insertions(+), 142 deletions(-) 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 aa6712700c60..c1bb18673516 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 @@ -4,6 +4,7 @@ import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; 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; @@ -19,23 +20,12 @@ public interface NicIpConfiguration extends Wrapper, ChildResource, 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 virtual network associated with this this IP configuration. + * @return the virtual network associated with this IP configuration */ Network getNetwork(); @@ -162,44 +152,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> { } /** @@ -332,44 +285,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> { } /** @@ -437,48 +353,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/model/HasPublicIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java index f90c3c1e4fb8..0987fcebdbb5 100644 --- 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 @@ -35,18 +35,16 @@ public interface HasPublicIpAddress { MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** - * The stage of the network interface IP configuration definition allowing to associate it with - * a public IP address. + * The stage of the definition allowing to associate the resource with a public IP address. * * @param the next stage of the definition */ interface WithPublicIpAddress { /** - * Create a new public IP address to associate with the network interface IP configuration, - * based on the provided definition. + * 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 network interface IP configuration definition + * @return the next stage of the definition */ ReturnT withNewPublicIpAddress(Creatable creatable); @@ -89,6 +87,55 @@ interface WithPublicIpAddress { IsContainerOnly = true, MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { + /** + * The stage definition allowing to associate the resource with a public IP address. + * + * @param the next stage of the update + */ + interface WithPublicIpAddress { + /** + * 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); + + /** + * 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); + + /** + * Removes the existing reference to a public IP address. + * + * @return the next stage of the update. + */ + ReturnT withoutPublicIpAddress(); + } } /** @@ -101,18 +148,16 @@ interface UpdateStages { MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** - * The stage of the network interface IP configuration definition allowing to associate it with - * a public IP address. + * The stage of the definition allowing to associate the resource with a public IP address. * * @param the next stage of the definition */ interface WithPublicIpAddress { /** - * Create a new public IP address to associate with the network interface IP configuration, - * based on the provided definition. + * 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 - * @return the next stage of the network interface IP configuration definition + * @param creatable a creatable definition for a new public IP address + * @return the next stage of the definition */ ReturnT withNewPublicIpAddress(Creatable creatable); From 5669475e34099ca8fa633f57a173535553a95ad1 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 17:56:53 -0700 Subject: [PATCH 22/29] enhancing the frontend PIP listing logic --- .../azure/management/network/LoadBalancer.java | 2 +- .../network/implementation/LoadBalancerImpl.java | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) 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 4c66765fea7c..302123caed50 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 @@ -34,7 +34,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(); 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 b01dcb6330f2..853f62f56c7f 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; @@ -668,12 +669,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); From 7f1e2b7f31094305a6e1d3611672ebf0050cf3d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Sep 2016 23:20:26 -0700 Subject: [PATCH 23/29] unifying the ways PIP references are handled between LB frontend and NIC IP config --- .../management/network/PublicFrontend.java | 55 +------ .../network/implementation/FrontendImpl.java | 16 ++ .../NicIpConfigurationImpl.java | 39 +++-- .../network/model/HasPublicIpAddress.java | 143 +++++++++++++----- 4 files changed, 150 insertions(+), 103 deletions(-) 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 21d083bcd73f..48c1122d2832 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 @@ -7,6 +7,7 @@ import com.microsoft.azure.management.apigeneration.LangDefinition; import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; +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; @@ -14,12 +15,9 @@ * An immutable client-side representation of a public frontend of an Internet-facing load balancer. */ @LangDefinition() -public interface PublicFrontend extends Frontend { - - /** - * @return the resource ID of the public IP address associated with this frontend - */ - String publicIpAddressId(); +public interface PublicFrontend extends + Frontend, + HasPublicIpAddress { /** * Grouping of public frontend definition stages. @@ -41,20 +39,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> { } /** @@ -91,20 +76,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 { } } @@ -137,20 +109,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/implementation/FrontendImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/FrontendImpl.java index 8cc347d6aa19..16285336ad01 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 @@ -173,6 +173,12 @@ public FrontendImpl withExistingPublicIpAddress(String resourceId) { return this; } + @Override + public FrontendImpl withoutPublicIpAddress() { + this.inner().withPublicIPAddress(null); + return this; + } + @Override public FrontendImpl withPrivateIpAddressDynamic() { this.inner() @@ -201,4 +207,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/NicIpConfigurationImpl.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NicIpConfigurationImpl.java index 99e81fb08a9e..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; @@ -215,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; } @@ -330,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/model/HasPublicIpAddress.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/model/HasPublicIpAddress.java index 0987fcebdbb5..6addec9d2473 100644 --- 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 @@ -35,11 +35,34 @@ public interface HasPublicIpAddress { MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** - * The stage of the definition allowing to associate the resource with a public IP address. + * 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 WithPublicIpAddress { + interface WithNewPublicIpAddress { /** * Creates a new public IP address to associate with the resource. * @@ -67,14 +90,16 @@ interface WithPublicIpAddress { * @return the next stage of the definition */ ReturnT withNewPublicIpAddress(String leafDnsLabel); + } - /** - * 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); + /** + * 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 { } } @@ -88,11 +113,41 @@ interface WithPublicIpAddress { MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** - * The stage definition allowing to associate the resource with a public IP address. + * 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 WithPublicIpAddress { + interface WithNewPublicIpAddress { /** * Creates a new public IP address to associate with the resource, based on the provided definition. * @@ -120,21 +175,16 @@ interface WithPublicIpAddress { * @return the next stage of the update */ ReturnT withNewPublicIpAddress(String leafDnsLabel); + } - /** - * 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); - - /** - * 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 public IP address. + * + * @param the next stage of the update + */ + interface WithPublicIpAddress extends + WithExistingPublicIpAddress, + WithNewPublicIpAddress { } } @@ -148,11 +198,34 @@ interface WithPublicIpAddress { MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** - * The stage of the definition allowing to associate the resource with a public IP address. + * 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 WithPublicIpAddress { + interface WithNewPublicIpAddress { /** * Creates a new public IP address to associate with the resource, based on the provided definition. * @@ -180,14 +253,16 @@ interface WithPublicIpAddress { * @return the next stage of the definition */ ReturnT withNewPublicIpAddress(String leafDnsLabel); + } - /** - * 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); + /** + * 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 { } } } From add5848f7ec371da95ee44cfbf81642a968f1e3f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Sep 2016 14:37:25 -0700 Subject: [PATCH 24/29] simplifying networking lang conversion annotations to the simple new @Fluent() approach --- .../azure/management/network/Backend.java | 23 ++--------------- .../azure/management/network/Frontend.java | 4 +-- .../azure/management/network/HttpProbe.java | 23 ++--------------- .../management/network/InboundNatPool.java | 23 ++--------------- .../management/network/InboundNatRule.java | 23 ++--------------- .../management/network/LoadBalancer.java | 17 ++----------- .../management/network/LoadBalancers.java | 4 +-- .../management/network/LoadBalancingRule.java | 25 ++----------------- .../azure/management/network/Network.java | 17 ++----------- .../management/network/NetworkInterface.java | 17 ++----------- .../management/network/NetworkInterfaces.java | 4 +-- .../network/NetworkSecurityGroup.java | 17 ++----------- .../network/NetworkSecurityGroups.java | 4 +-- .../network/NetworkSecurityRule.java | 23 ++--------------- .../azure/management/network/Networks.java | 4 +-- .../network/NicIpConfiguration.java | 23 ++--------------- .../management/network/PrivateFrontend.java | 23 ++--------------- .../azure/management/network/Probe.java | 4 +-- .../management/network/PublicFrontend.java | 23 ++--------------- .../management/network/PublicIpAddress.java | 17 ++----------- .../management/network/PublicIpAddresses.java | 4 +-- .../azure/management/network/Subnet.java | 23 ++--------------- .../azure/management/network/TcpProbe.java | 23 ++--------------- 23 files changed, 46 insertions(+), 322 deletions(-) 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 0f2bd7ff0cf3..4e8f2bfd9533 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,8 +8,7 @@ import java.util.Map; import java.util.Set; -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.BackendAddressPoolInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -20,7 +19,7 @@ /** * An immutable client-side representation of an load balancer's backend address pool. */ -@LangDefinition() +@Fluent() public interface Backend extends Wrapper, ChildResource, @@ -40,11 +39,6 @@ public interface Backend extends /** * Grouping of backend definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the backend definition. @@ -67,7 +61,6 @@ interface WithAttach extends /** The entirety of a backend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach { @@ -76,18 +69,12 @@ interface Definition extends /** * Grouping of backend update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { } /** * The entirety of a backend update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable { } @@ -95,11 +82,6 @@ interface Update extends /** * Grouping of backend definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the backend definition. @@ -122,7 +104,6 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach { 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 1ee06db9a17e..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,7 +7,7 @@ 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.FrontendIPConfigurationInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; @@ -16,7 +16,7 @@ /** * An immutable client-side representation of a load balancer frontend. */ -@LangDefinition() +@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 1149b9619652..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,15 +5,14 @@ */ 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.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of an HTTP load balancing probe. */ -@LangDefinition() +@Fluent() public interface HttpProbe extends Probe { /** @@ -24,11 +23,6 @@ public interface HttpProbe extends Probe { /** * Grouping of probe definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -101,7 +95,6 @@ interface WithNumberOfProbes { /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -111,11 +104,6 @@ interface Definition extends /** * Grouping of probe update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the HTTP probe update allowing to modify the port number to monitor. @@ -164,7 +152,6 @@ interface WithRequestPath { /** * The entirety of a probe update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithIntervalInSeconds, @@ -176,11 +163,6 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -254,7 +236,6 @@ interface WithNumberOfProbes { /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 12672cd4ecf8..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,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.InboundNatPoolInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFrontend; @@ -19,7 +18,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ -@LangDefinition() +@Fluent() public interface InboundNatPool extends HasFrontend, HasBackendPort, @@ -40,11 +39,6 @@ public interface InboundNatPool extends /** * Grouping of inbound NAT pool definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -106,7 +100,6 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -119,11 +112,6 @@ interface Definition extends /** * Grouping of inbound NAT pool update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an inbound NAT pool update allowing to specify the transport protocol for the pool to apply to. @@ -163,7 +151,6 @@ interface WithBackendPort extends /** * The entirety of an inbound NAT pool update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithProtocol, @@ -175,11 +162,6 @@ interface Update extends /** * Grouping of inbound NAT pool definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT pool definition. @@ -241,7 +223,6 @@ interface WithBackendPort extends /** The entirety of an inbound NAT pool definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 70982495c335..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,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.InboundNatRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -20,7 +19,7 @@ /** * An immutable client-side representation of an inbound NAT rule. */ -@LangDefinition() +@Fluent() public interface InboundNatRule extends HasFrontend, HasBackendPort, @@ -52,11 +51,6 @@ public interface InboundNatRule extends /** * Grouping of inbound NAT rule definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -141,7 +135,6 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithProtocol, @@ -153,11 +146,6 @@ interface Definition extends /** * Grouping of inbound NAT rule update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an inbound NAT rule update allowing to specify the backend port. @@ -214,7 +202,6 @@ interface WithIdleTimeout { /** * The entirety of an inbound NAT rule update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithBackendPort, @@ -228,11 +215,6 @@ interface Update extends /** * Grouping of inbound NAT rule definition stages as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the inbound NAT rule definition. @@ -317,7 +299,6 @@ interface WithIdleTimeout { * The entirety of an inbound NAT rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithProtocol, 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 302123caed50..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,8 +8,7 @@ import java.util.List; import java.util.Map; -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.LoadBalancerInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.network.model.HasNetworkInterfaces; @@ -24,7 +23,7 @@ /** * Entry point for load balancer management API in Azure. */ -@LangDefinition() +@Fluent() public interface LoadBalancer extends GroupableResource, Refreshable, @@ -71,7 +70,6 @@ public interface LoadBalancer extends /** * The entirety of the load balancer definition. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -94,11 +92,6 @@ interface Definition extends /** * Grouping of load balancer definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a load balancer definition. @@ -419,11 +412,6 @@ interface WithInboundNatPool { /** * Grouping of load balancer update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the load balancer update allowing to add or remove backends. @@ -723,7 +711,6 @@ interface WithInboundNatPool { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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 6a4b5acbaf7c..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,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.LoadBalancingRuleInner; import com.microsoft.azure.management.network.model.HasBackendPort; import com.microsoft.azure.management.network.model.HasFloatingIp; @@ -20,7 +19,7 @@ /** * An immutable client-side representation of an HTTP load balancing rule. */ -@LangDefinition() +@Fluent() public interface LoadBalancingRule extends Wrapper, ChildResource, @@ -29,8 +28,6 @@ public interface LoadBalancingRule extends HasFloatingIp, HasProtocol { - //TODO: - /* withProbe and return them */ /** * @return the method of load distribution */ @@ -59,11 +56,6 @@ public interface LoadBalancingRule extends /** * Grouping of load balancing rule definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the load balancing rule definition. @@ -188,7 +180,6 @@ interface WithLoadDistribution { /** The entirety of a load balancing rule definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -203,11 +194,6 @@ interface Definition extends /** * Grouping of load balancing rule update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a load balancing rule update allowing to modify the transport protocol the rule applies to. @@ -276,7 +262,6 @@ interface WithLoadDistribution { /** * The entirety of a load balancing rule update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithFrontendPort, @@ -291,11 +276,6 @@ interface Update extends /** * Grouping of load balancing rule definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the load balancing rule definition. @@ -420,7 +400,6 @@ interface WithAttach extends /** The entirety of a load balancing rule definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 44df5242699c..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,8 +8,7 @@ import java.util.List; import java.util.Map; -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.VirtualNetworkInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -22,7 +21,7 @@ /** * Entry point for Virtual Network management API in Azure. */ -@LangDefinition() +@Fluent() public interface Network extends GroupableResource, Refreshable, @@ -53,7 +52,6 @@ public interface Network extends /** * The entirety of the virtual network definition. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -65,11 +63,6 @@ interface Definition extends /** * Grouping of virtual network definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a virtual network definition. @@ -170,11 +163,6 @@ interface WithCreateAndSubnet extends /** * Grouping of virtual network update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the virtual network update allowing to add or remove subnets. @@ -260,7 +248,6 @@ interface WithAddressSpace { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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 58b4e7a0bd53..655038069574 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,8 +6,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.NetworkInterfaceInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -23,7 +22,7 @@ /** * Network interface. */ -@LangDefinition() +@Fluent() public interface NetworkInterface extends GroupableResource, Refreshable, @@ -120,7 +119,6 @@ public interface NetworkInterface extends /** * The entirety of the network interface definition. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -133,11 +131,6 @@ interface Definition extends /** * Grouping of network interface definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the network interface. @@ -358,11 +351,6 @@ interface WithCreate extends /** * Grouping of network interface update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the network interface update allowing to specify subnet. @@ -566,7 +554,6 @@ interface WithIpConfiguration { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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 d8098f99f3a3..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,8 +8,7 @@ import java.util.List; import java.util.Map; -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.NetworkSecurityGroupInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -23,7 +22,7 @@ /** * Network security group. */ -@LangDefinition() +@Fluent() public interface NetworkSecurityGroup extends GroupableResource, Refreshable, @@ -59,7 +58,6 @@ public interface NetworkSecurityGroup extends /** * The entirety of the network security group definition. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -69,11 +67,6 @@ interface Definition extends /** * Grouping of network security group definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the definition. @@ -119,11 +112,6 @@ interface WithCreate extends /** * Grouping of network security group update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the resource definition allowing to add or remove security rules. @@ -158,7 +146,6 @@ interface WithRule { *

* Call {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) 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 44f95ef75d60..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(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -88,11 +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. @@ -286,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(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithDirectionAccess, @@ -301,11 +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. @@ -484,7 +471,6 @@ interface WithAttach extends Attachable.InUpdate { /** * The entirety of a security rule update as part of a network security group update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends UpdateStages.WithDirectionAccess, UpdateStages.WithSourceAddress, @@ -513,11 +499,6 @@ interface Update extends /** * Grouping of security rule update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) 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 c1bb18673516..e408d4831539 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,7 +1,6 @@ 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.NetworkInterfaceIPConfigurationInner; import com.microsoft.azure.management.network.model.HasPrivateIpAddress; import com.microsoft.azure.management.network.model.HasPublicIpAddress; @@ -15,7 +14,7 @@ /** * An IP configuration in a network interface. */ -@LangDefinition() +@Fluent() public interface NicIpConfiguration extends Wrapper, ChildResource, @@ -40,7 +39,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(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -53,11 +51,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, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -173,7 +166,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(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, @@ -186,11 +178,6 @@ interface UpdateDefinition extends /** * Grouping of network interface IP configuration definition stages. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of network interface IP configuration definition. @@ -306,7 +293,6 @@ interface WithAttach /** * The entirety of a network interface IP configuration update as part of a network interface update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithSubnet, @@ -319,11 +305,6 @@ interface Update extends /** * Grouping of network interface IP configuration update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the network interface IP configuration update allowing to specify subnet. 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 8cb18f8b2d14..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,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.model.HasPrivateIpAddress; import com.microsoft.azure.management.resources.fluentcore.arm.models.HasSubnet; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -15,7 +14,7 @@ /** * An immutable client-side representation of a private frontend of an internal load balancer. */ -@LangDefinition() +@Fluent() public interface PrivateFrontend extends Frontend, HasPrivateIpAddress, @@ -29,11 +28,6 @@ public interface PrivateFrontend extends /** * Grouping of private frontend definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a private frontend definition. @@ -72,7 +66,6 @@ interface WithAttach extends /** The entirety of a private frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -82,11 +75,6 @@ interface Definition extends /** * Grouping of private frontend update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a private frontend update allowing to specify a subnet from the selected network. @@ -105,7 +93,6 @@ interface WithSubnet { /** * The entirety of a private frontend update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithSubnet, @@ -115,11 +102,6 @@ interface Update extends /** * Grouping of private frontend definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a private frontend definition. @@ -157,7 +139,6 @@ interface WithAttach extends /** The entirety of a private frontend definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 e185f0b171ba..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,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.ProbeInner; import com.microsoft.azure.management.network.model.HasLoadBalancingRules; import com.microsoft.azure.management.network.model.HasProtocol; @@ -15,7 +15,7 @@ /** * An immutable client-side representation of a load balancing probe. */ -@LangDefinition() +@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 48c1122d2832..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,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.model.HasPublicIpAddress; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; @@ -14,7 +13,7 @@ /** * An immutable client-side representation of a public frontend of an Internet-facing load balancer. */ -@LangDefinition() +@Fluent() public interface PublicFrontend extends Frontend, HasPublicIpAddress { @@ -22,11 +21,6 @@ public interface PublicFrontend extends /** * Grouping of public frontend definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a public frontend definition. @@ -57,7 +51,6 @@ interface WithAttach extends /** The entirety of a public frontend definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -67,11 +60,6 @@ interface Definition extends /** * Grouping of public frontend update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of a public frontend update allowing to specify an existing public IP address. @@ -83,7 +71,6 @@ interface WithPublicIpAddress extends HasPublicIpAddress.UpdateStages.WithExisti /** * The entirety of a public frontend update as part of an Internet-facing load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPublicIpAddress { @@ -92,11 +79,6 @@ interface Update extends /** * Grouping of public frontend definition stages applicable as part of an Internet-facing load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of a public frontend definition. @@ -126,7 +108,6 @@ interface WithAttach extends /** The entirety of a public frontend definition as part of an Internet-facing load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, 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 37a20b30a9d2..3c14a8b1ab29 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,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.PublicIPAddressInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.GroupableResource; import com.microsoft.azure.management.resources.fluentcore.arm.models.Resource; @@ -19,7 +18,7 @@ /** * Public IP address. */ -@LangDefinition() +@Fluent() public interface PublicIpAddress extends GroupableResource, Refreshable, @@ -86,7 +85,6 @@ public interface PublicIpAddress extends /** * Container interface for all the definitions. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -96,11 +94,6 @@ interface Definition extends /** * Grouping of public IP address definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of a public IP address definition. @@ -214,7 +207,6 @@ interface WithCreate extends *

* Use {@link Update#apply()} to apply the changes to the resource in Azure. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Appliable, UpdateStages.WithIpAddress, @@ -227,11 +219,6 @@ interface Update extends /** * Grouping of public IP address update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) 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 84f63d1dcf4c..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,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.SubnetInner; import com.microsoft.azure.management.resources.fluentcore.arm.models.ChildResource; import com.microsoft.azure.management.resources.fluentcore.model.Attachable; @@ -16,7 +15,7 @@ /** * An immutable client-side representation of a subnet of a virtual network. */ -@LangDefinition() +@Fluent() public interface Subnet extends Wrapper, ChildResource { @@ -36,11 +35,6 @@ public interface Subnet extends /** * Grouping of subnet definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the subnet definition. @@ -97,7 +91,6 @@ interface WithAttach extends /** The entirety of a Subnet definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAddressPrefix, @@ -107,11 +100,6 @@ interface Definition extends /** * Grouping of subnet update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the subnet update allowing to change the address space for the subnet. @@ -148,7 +136,6 @@ interface WithNetworkSecurityGroup { /** * The entirety of a subnet update as part of a network update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends UpdateStages.WithAddressPrefix, UpdateStages.WithNetworkSecurityGroup, @@ -158,11 +145,6 @@ interface Update extends /** * Grouping of subnet definition stages applicable as part of a virtual network update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the subnet definition. @@ -219,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(MethodConversionType = MethodConversion.OnlyMethod) 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 a36646fb7f99..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,25 +5,19 @@ */ 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.resources.fluentcore.model.Attachable; import com.microsoft.azure.management.resources.fluentcore.model.Settable; /** * An immutable client-side representation of a TCP load balancing probe. */ -@LangDefinition() +@Fluent() public interface TcpProbe extends Probe { /** * Grouping of probe definition stages. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The first stage of the probe definition. @@ -87,7 +81,6 @@ interface WithAttach extends /** The entirety of a probe definition. * @param the return type of the final {@link DefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAttach, @@ -97,11 +90,6 @@ interface Definition extends /** * Grouping of probe update stages. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of the TCP probe update allowing to modify the port number to monitor. @@ -143,7 +131,6 @@ interface WithNumberOfProbes { /** * The entirety of a probe update as part of a load balancer update. */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface Update extends Settable, UpdateStages.WithPort, @@ -154,11 +141,6 @@ interface Update extends /** * Grouping of probe definition stages applicable as part of a load balancer update. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The first stage of the probe definition. @@ -222,7 +204,6 @@ interface WithAttach extends /** The entirety of a probe definition as part of a load balancer update. * @param the return type of the final {@link UpdateDefinitionStages.WithAttach#attach()} */ - @LangDefinition(MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinition extends UpdateDefinitionStages.Blank, UpdateDefinitionStages.WithAttach, From 585139da74f5c0bd190d4e8a86169a56c0e75d53 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2016 10:19:34 -0700 Subject: [PATCH 25/29] ensuring the latest @Fluent annotations in compute --- .../azure/management/compute/AvailabilitySet.java | 7 ++----- .../azure/management/compute/AvailabilitySets.java | 4 ++-- .../azure/management/compute/VirtualMachine.java | 8 ++------ .../management/compute/VirtualMachineDataDisk.java | 10 ++-------- .../management/compute/VirtualMachineExtension.java | 2 ++ .../compute/VirtualMachineExtensionImage.java | 2 ++ .../compute/VirtualMachineExtensionImageType.java | 2 ++ .../compute/VirtualMachineExtensionImageTypes.java | 2 ++ .../compute/VirtualMachineExtensionImageVersion.java | 2 ++ .../compute/VirtualMachineExtensionImageVersions.java | 2 ++ .../compute/VirtualMachineExtensionImages.java | 2 ++ .../azure/management/compute/VirtualMachineImage.java | 4 ++-- .../azure/management/compute/VirtualMachineImages.java | 4 ++-- .../management/compute/VirtualMachineImagesInSku.java | 4 ++-- .../azure/management/compute/VirtualMachineOffer.java | 4 ++-- .../azure/management/compute/VirtualMachineOffers.java | 4 ++-- .../management/compute/VirtualMachinePublisher.java | 4 ++-- .../management/compute/VirtualMachinePublishers.java | 4 ++-- .../management/compute/VirtualMachineScaleSet.java | 3 ++- .../compute/VirtualMachineScaleSetExtension.java | 3 ++- .../management/compute/VirtualMachineScaleSetSku.java | 4 ++-- .../management/compute/VirtualMachineScaleSets.java | 4 ++-- .../azure/management/compute/VirtualMachineSize.java | 4 ++-- .../azure/management/compute/VirtualMachineSizes.java | 4 ++-- .../azure/management/compute/VirtualMachineSku.java | 4 ++-- .../azure/management/compute/VirtualMachineSkus.java | 4 ++-- .../azure/management/compute/VirtualMachines.java | 4 ++-- 27 files changed, 54 insertions(+), 51 deletions(-) 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 d3a7c250d3db..e45c6144a251 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,7 @@ 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.compute.implementation.VirtualMachineInner; import com.microsoft.azure.management.network.Network; import com.microsoft.azure.management.network.NetworkInterface; @@ -22,7 +22,7 @@ /** * An immutable client-side representation of an Azure virtual machine. */ -@LangDefinition(ContainerName = "~/") +@Fluent public interface VirtualMachine extends GroupableResource, Refreshable, @@ -227,7 +227,6 @@ public interface VirtualMachine extends /** * The entirety of the virtual machine definition. */ - @LangDefinition(ContainerName = "~/VirtualMachine.Definition") interface Definition extends DefinitionStages.Blank, DefinitionStages.WithGroup, @@ -247,7 +246,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. @@ -820,7 +818,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. @@ -963,7 +960,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 d2b320fcd3e2..f39391601383 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,5 +1,6 @@ package com.microsoft.azure.management.compute; +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; @@ -13,6 +14,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 }. */ +@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 28558f7375ff..2390fa35b4c8 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, 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, From c4ae77e3e6fe59e33b96e7c560bda0d64eb91af9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2016 10:40:40 -0700 Subject: [PATCH 26/29] converting language annotations to the latest @Fluent and removing redundant ones from nested interfaces --- .../management/resources/Deployment.java | 8 ++------ .../resources/DeploymentExportResult.java | 4 ++-- .../resources/DeploymentOperation.java | 4 ++-- .../resources/DeploymentOperations.java | 4 ++-- .../management/resources/Deployments.java | 4 ++-- .../azure/management/resources/Feature.java | 4 ++-- .../azure/management/resources/Features.java | 3 ++- .../management/resources/GenericResource.java | 8 ++------ .../resources/GenericResources.java | 4 ++-- .../azure/management/resources/Location.java | 4 ++-- .../azure/management/resources/Provider.java | 4 ++-- .../azure/management/resources/Providers.java | 4 ++-- .../resources/ResourceConnector.java | 4 ++-- .../management/resources/ResourceGroup.java | 8 ++------ .../resources/ResourceGroupExportResult.java | 4 ++-- .../management/resources/ResourceGroups.java | 4 ++-- .../management/resources/Subscription.java | 4 ++-- .../management/resources/Subscriptions.java | 4 ++-- .../azure/management/resources/Tenant.java | 4 ++-- .../azure/management/resources/Tenants.java | 4 ++-- .../fluentcore/arm/models/ChildResource.java | 4 ++-- .../arm/models/GroupableResource.java | 5 ++--- .../fluentcore/arm/models/HasSubnet.java | 20 ++----------------- .../fluentcore/arm/models/Resource.java | 7 ++----- 24 files changed, 48 insertions(+), 79 deletions(-) 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 index c7cd9ea1f70b..6a050349062c 100644 --- 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 @@ -5,13 +5,12 @@ */ package com.microsoft.azure.management.resources.fluentcore.arm.models; -import com.microsoft.azure.management.apigeneration.LangDefinition; -import com.microsoft.azure.management.apigeneration.LangDefinition.MethodConversion; +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. */ -@LangDefinition() +@Fluent public interface HasSubnet { /** * @return the resource ID of the virtual network whose subnet is associated with this resource @@ -26,11 +25,6 @@ public interface HasSubnet { /** * Grouping of definition stages involving associating an existing subnet with a resource. */ - @LangDefinition( - ContainerName = "Definition", - ContainerFileName = "IDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface DefinitionStages { /** * The stage of a definition allowing to associate a subnet with a resource. @@ -50,11 +44,6 @@ interface WithSubnet { /** * Grouping of update stages involving associating an existing subnet with a resource. */ - @LangDefinition( - ContainerName = "Update", - ContainerFileName = "IUpdate", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateStages { /** * The stage of an update allowing to associate a subnet with a resource. @@ -74,11 +63,6 @@ interface WithSubnet { /** * Grouping of definition stages applicable as part of a parent resource update, involving associating a subnet with a resource. */ - @LangDefinition( - ContainerName = "UpdateDefinition", - ContainerFileName = "IUpdateDefinition", - IsContainerOnly = true, - MethodConversionType = MethodConversion.OnlyMethod) interface UpdateDefinitionStages { /** * The stage of a definition allowing to associate a subnet with a resource. 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}. From 42395de0513ec277ddbdd7305b86c2799d937798 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2016 10:53:47 -0700 Subject: [PATCH 27/29] renaming StorageAccount#refreshKeys() as getKeys() and removing keys() and the caching logic altogether as it seems redundant from the user scenario perspective --- .../management/storage/StorageAccount.java | 20 +++---------------- .../management/storage/StorageAccounts.java | 4 ++-- .../management/storage/StorageUsage.java | 4 ++-- .../azure/management/storage/Usages.java | 4 ++-- .../implementation/StorageAccountImpl.java | 17 +++------------- .../StorageAccountOperationsTests.java | 2 +- .../storage/samples/ManageStorageAccount.java | 2 +- 7 files changed, 14 insertions(+), 39 deletions(-) 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 50210e5b4dc2..71121c2c1fa7 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/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); From 3b19c5b54d9e25beb0d24122229016ae35651e63 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Sep 2016 11:19:03 -0700 Subject: [PATCH 28/29] other language annotations for methods that would by default be converted to properties, but should remain methods --- .../microsoft/azure/management/compute/VirtualMachine.java | 3 +++ .../azure/management/compute/VirtualMachineScaleSet.java | 2 +- .../java/com/microsoft/azure/management/network/Backend.java | 3 +++ .../microsoft/azure/management/network/NetworkInterface.java | 3 +++ .../azure/management/network/NicIpConfiguration.java | 3 +++ .../microsoft/azure/management/network/PublicIpAddress.java | 4 ++++ .../management/resources/fluentcore/model/Refreshable.java | 3 +++ 7 files changed, 20 insertions(+), 1 deletion(-) 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 e45c6144a251..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 @@ -2,6 +2,8 @@ import com.microsoft.azure.PagedList; 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; @@ -137,6 +139,7 @@ public interface VirtualMachine extends * * @return the public IP of the primary network interface */ + @LangMethodDefinition(AsType = LangMethodType.Method) PublicIpAddress getPrimaryPublicIpAddress(); /** 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 2390fa35b4c8..a2400f6a4db8 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 @@ -109,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-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 4e8f2bfd9533..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 @@ -9,6 +9,8 @@ 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; @@ -34,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/NetworkInterface.java b/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/NetworkInterface.java index 655038069574..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 @@ -7,6 +7,8 @@ package com.microsoft.azure.management.network; 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; @@ -107,6 +109,7 @@ public interface NetworkInterface extends * * @return the network security group associated with this network interface. */ + @LangMethodDefinition(AsType = LangMethodType.Method) NetworkSecurityGroup getNetworkSecurityGroup(); /** 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 e408d4831539..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,6 +1,8 @@ package com.microsoft.azure.management.network; 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; @@ -26,6 +28,7 @@ public interface NicIpConfiguration extends /** * @return the virtual network associated with this IP configuration */ + @LangMethodDefinition(AsType = LangMethodType.Method) Network getNetwork(); /** 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 3c14a8b1ab29..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 @@ -6,6 +6,8 @@ package com.microsoft.azure.management.network; 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; @@ -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(); /** 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(); } From 7f94621d5e71c5b2b06e62199feb5e1a052167cd Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Sep 2016 14:20:19 -0700 Subject: [PATCH 29/29] network impl annotations --- .../azure/management/network/implementation/BackendImpl.java | 2 ++ .../azure/management/network/implementation/FrontendImpl.java | 2 ++ .../management/network/implementation/InboundNatPoolImpl.java | 2 ++ .../management/network/implementation/InboundNatRuleImpl.java | 2 ++ .../network/implementation/LoadBalancingRuleImpl.java | 2 ++ .../azure/management/network/implementation/ProbeImpl.java | 2 ++ 6 files changed, 12 insertions(+) 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 16285336ad01..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 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/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/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