Skip to content

Commit

Permalink
Merge pull request #959 from jianghaolu/resourceinner
Browse files Browse the repository at this point in the history
Change criteria for adding 'Inner' in Network
Martin Sawicki authored Jul 20, 2016

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents ec71b00 + f7f06fe commit 08bd178
Showing 64 changed files with 714 additions and 777 deletions.
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
package com.microsoft.azure.management.compute;

import java.util.List;
import com.microsoft.azure.management.compute.implementation.NetworkInterfaceReferenceInner;

/**
* Describes a network profile.
@@ -17,14 +18,14 @@ public class NetworkProfile {
/**
* the network interfaces.
*/
private List<NetworkInterfaceReference> networkInterfaces;
private List<NetworkInterfaceReferenceInner> networkInterfaces;

/**
* Get the networkInterfaces value.
*
* @return the networkInterfaces value
*/
public List<NetworkInterfaceReference> networkInterfaces() {
public List<NetworkInterfaceReferenceInner> networkInterfaces() {
return this.networkInterfaces;
}

@@ -34,7 +35,7 @@ public List<NetworkInterfaceReference> networkInterfaces() {
* @param networkInterfaces the networkInterfaces value to set
* @return the NetworkProfile object itself.
*/
public NetworkProfile withNetworkInterfaces(List<NetworkInterfaceReference> networkInterfaces) {
public NetworkProfile withNetworkInterfaces(List<NetworkInterfaceReferenceInner> networkInterfaces) {
this.networkInterfaces = networkInterfaces;
return this;
}
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
package com.microsoft.azure.management.compute;

import java.util.List;
import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetExtensionInner;

/**
* Describes a virtual machine scale set extension profile.
@@ -17,14 +18,14 @@ public class VirtualMachineScaleSetExtensionProfile {
/**
* the virtual machine scale set child extension resources.
*/
private List<VirtualMachineScaleSetExtension> extensions;
private List<VirtualMachineScaleSetExtensionInner> extensions;

/**
* Get the extensions value.
*
* @return the extensions value
*/
public List<VirtualMachineScaleSetExtension> extensions() {
public List<VirtualMachineScaleSetExtensionInner> extensions() {
return this.extensions;
}

@@ -34,7 +35,7 @@ public List<VirtualMachineScaleSetExtension> extensions() {
* @param extensions the extensions value to set
* @return the VirtualMachineScaleSetExtensionProfile object itself.
*/
public VirtualMachineScaleSetExtensionProfile withExtensions(List<VirtualMachineScaleSetExtension> extensions) {
public VirtualMachineScaleSetExtensionProfile withExtensions(List<VirtualMachineScaleSetExtensionInner> extensions) {
this.extensions = extensions;
return this;
}
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
package com.microsoft.azure.management.compute;

import java.util.List;
import com.microsoft.azure.management.compute.implementation.VirtualMachineScaleSetNetworkConfigurationInner;

/**
* Describes a virtual machine scale set network profile.
@@ -17,14 +18,14 @@ public class VirtualMachineScaleSetNetworkProfile {
/**
* the list of network configurations.
*/
private List<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations;
private List<VirtualMachineScaleSetNetworkConfigurationInner> networkInterfaceConfigurations;

/**
* Get the networkInterfaceConfigurations value.
*
* @return the networkInterfaceConfigurations value
*/
public List<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations() {
public List<VirtualMachineScaleSetNetworkConfigurationInner> networkInterfaceConfigurations() {
return this.networkInterfaceConfigurations;
}

@@ -34,7 +35,7 @@ public List<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigur
* @param networkInterfaceConfigurations the networkInterfaceConfigurations value to set
* @return the VirtualMachineScaleSetNetworkProfile object itself.
*/
public VirtualMachineScaleSetNetworkProfile withNetworkInterfaceConfigurations(List<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations) {
public VirtualMachineScaleSetNetworkProfile withNetworkInterfaceConfigurations(List<VirtualMachineScaleSetNetworkConfigurationInner> networkInterfaceConfigurations) {
this.networkInterfaceConfigurations = networkInterfaceConfigurations;
return this;
}
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.compute;
package com.microsoft.azure.management.compute.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
@@ -16,7 +16,7 @@
* Describes a network interface reference.
*/
@JsonFlatten
public class NetworkInterfaceReference extends SubResource {
public class NetworkInterfaceReferenceInner extends SubResource {
/**
* whether this is a primary NIC on a virtual machine.
*/
@@ -36,9 +36,9 @@ public Boolean primary() {
* Set the primary value.
*
* @param primary the primary value to set
* @return the NetworkInterfaceReference object itself.
* @return the NetworkInterfaceReferenceInner object itself.
*/
public NetworkInterfaceReference withPrimary(Boolean primary) {
public NetworkInterfaceReferenceInner withPrimary(Boolean primary) {
this.primary = primary;
return this;
}
Original file line number Diff line number Diff line change
@@ -35,7 +35,6 @@
import com.microsoft.azure.management.compute.WinRMConfiguration;
import com.microsoft.azure.management.compute.SshConfiguration;
import com.microsoft.azure.management.compute.SshPublicKey;
import com.microsoft.azure.management.compute.NetworkInterfaceReference;
import com.microsoft.azure.management.network.Network;
import com.microsoft.azure.management.network.NetworkInterface;
import com.microsoft.azure.management.network.PublicIpAddress;
@@ -677,7 +676,7 @@ public VirtualMachineImpl withoutSecondaryNetworkInterface(String name) {
if (this.inner().networkProfile() != null
&& this.inner().networkProfile().networkInterfaces() != null) {
int idx = -1;
for (NetworkInterfaceReference nicReference : this.inner().networkProfile().networkInterfaces()) {
for (NetworkInterfaceReferenceInner nicReference : this.inner().networkProfile().networkInterfaces()) {
idx++;
if (!nicReference.primary()
&& name.equalsIgnoreCase(ResourceUtils.nameFromResourceId(nicReference.id()))) {
@@ -754,15 +753,15 @@ public PublicIpAddress primaryPublicIpAddress() throws CloudException, IOExcepti
@Override
public List<String> networkInterfaceIds() {
List<String> nicIds = new ArrayList<>();
for (NetworkInterfaceReference nicRef : inner().networkProfile().networkInterfaces()) {
for (NetworkInterfaceReferenceInner nicRef : inner().networkProfile().networkInterfaces()) {
nicIds.add(nicRef.id());
}
return nicIds;
}

@Override
public String primaryNetworkInterfaceId() {
final List<NetworkInterfaceReference> nicRefs = this.inner().networkProfile().networkInterfaces();
final List<NetworkInterfaceReferenceInner> nicRefs = this.inner().networkProfile().networkInterfaces();
String primaryNicRefId = null;

if (nicRefs.size() == 1) {
@@ -773,7 +772,7 @@ public String primaryNetworkInterfaceId() {
primaryNicRefId = null;
} else {
// Find primary interface as flagged by Azure
for (NetworkInterfaceReference nicRef : inner().networkProfile().networkInterfaces()) {
for (NetworkInterfaceReferenceInner nicRef : inner().networkProfile().networkInterfaces()) {
if (nicRef.primary() != null && nicRef.primary()) {
primaryNicRefId = nicRef.id();
break;
@@ -1077,7 +1076,7 @@ private void handleNetworkSettings() {
}

if (primaryNetworkInterface != null) {
NetworkInterfaceReference nicReference = new NetworkInterfaceReference();
NetworkInterfaceReferenceInner nicReference = new NetworkInterfaceReferenceInner();
nicReference.withPrimary(true);
nicReference.withId(primaryNetworkInterface.id());
this.inner().networkProfile().networkInterfaces().add(nicReference);
@@ -1088,14 +1087,14 @@ private void handleNetworkSettings() {
//
for (String creatableSecondaryNetworkInterfaceKey : this.creatableSecondaryNetworkInterfaceKeys) {
NetworkInterface secondaryNetworkInterface = (NetworkInterface) this.createdResource(creatableSecondaryNetworkInterfaceKey);
NetworkInterfaceReference nicReference = new NetworkInterfaceReference();
NetworkInterfaceReferenceInner nicReference = new NetworkInterfaceReferenceInner();
nicReference.withPrimary(false);
nicReference.withId(secondaryNetworkInterface.id());
this.inner().networkProfile().networkInterfaces().add(nicReference);
}

for (NetworkInterface secondaryNetworkInterface : this.existingSecondaryNetworkInterfacesToAssociate) {
NetworkInterfaceReference nicReference = new NetworkInterfaceReference();
NetworkInterfaceReferenceInner nicReference = new NetworkInterfaceReferenceInner();
nicReference.withPrimary(false);
nicReference.withId(secondaryNetworkInterface.id());
this.inner().networkProfile().networkInterfaces().add(nicReference);
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.compute;
package com.microsoft.azure.management.compute.implementation;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.microsoft.rest.serializer.JsonFlatten;
@@ -16,7 +16,7 @@
* Describes a Virtual Machine Scale Set Extension.
*/
@JsonFlatten
public class VirtualMachineScaleSetExtension extends SubResource {
public class VirtualMachineScaleSetExtensionInner extends SubResource {
/**
* the name of the extension.
*/
@@ -78,9 +78,9 @@ public String name() {
* Set the name value.
*
* @param name the name value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withName(String name) {
public VirtualMachineScaleSetExtensionInner withName(String name) {
this.name = name;
return this;
}
@@ -98,9 +98,9 @@ public String publisher() {
* Set the publisher value.
*
* @param publisher the publisher value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withPublisher(String publisher) {
public VirtualMachineScaleSetExtensionInner withPublisher(String publisher) {
this.publisher = publisher;
return this;
}
@@ -118,9 +118,9 @@ public String type() {
* Set the type value.
*
* @param type the type value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withType(String type) {
public VirtualMachineScaleSetExtensionInner withType(String type) {
this.type = type;
return this;
}
@@ -138,9 +138,9 @@ public String typeHandlerVersion() {
* Set the typeHandlerVersion value.
*
* @param typeHandlerVersion the typeHandlerVersion value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withTypeHandlerVersion(String typeHandlerVersion) {
public VirtualMachineScaleSetExtensionInner withTypeHandlerVersion(String typeHandlerVersion) {
this.typeHandlerVersion = typeHandlerVersion;
return this;
}
@@ -158,9 +158,9 @@ public Boolean autoUpgradeMinorVersion() {
* Set the autoUpgradeMinorVersion value.
*
* @param autoUpgradeMinorVersion the autoUpgradeMinorVersion value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
public VirtualMachineScaleSetExtensionInner withAutoUpgradeMinorVersion(Boolean autoUpgradeMinorVersion) {
this.autoUpgradeMinorVersion = autoUpgradeMinorVersion;
return this;
}
@@ -178,9 +178,9 @@ public Object settings() {
* Set the settings value.
*
* @param settings the settings value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withSettings(Object settings) {
public VirtualMachineScaleSetExtensionInner withSettings(Object settings) {
this.settings = settings;
return this;
}
@@ -198,9 +198,9 @@ public Object protectedSettings() {
* Set the protectedSettings value.
*
* @param protectedSettings the protectedSettings value to set
* @return the VirtualMachineScaleSetExtension object itself.
* @return the VirtualMachineScaleSetExtensionInner object itself.
*/
public VirtualMachineScaleSetExtension withProtectedSettings(Object protectedSettings) {
public VirtualMachineScaleSetExtensionInner withProtectedSettings(Object protectedSettings) {
this.protectedSettings = protectedSettings;
return this;
}
Original file line number Diff line number Diff line change
@@ -6,8 +6,9 @@
* Code generated by Microsoft (R) AutoRest Code Generator.
*/

package com.microsoft.azure.management.compute;
package com.microsoft.azure.management.compute.implementation;

import com.microsoft.azure.management.compute.ApiEntityReference;
import java.util.List;
import com.microsoft.azure.SubResource;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -17,7 +18,7 @@
* Describes a virtual machine scale set network profile's IP configuration.
*/
@JsonFlatten
public class VirtualMachineScaleSetIPConfiguration extends SubResource {
public class VirtualMachineScaleSetIPConfigurationInner extends SubResource {
/**
* the IP configuration name.
*/
@@ -61,9 +62,9 @@ public String name() {
* Set the name value.
*
* @param name the name value to set
* @return the VirtualMachineScaleSetIPConfiguration object itself.
* @return the VirtualMachineScaleSetIPConfigurationInner object itself.
*/
public VirtualMachineScaleSetIPConfiguration withName(String name) {
public VirtualMachineScaleSetIPConfigurationInner withName(String name) {
this.name = name;
return this;
}
@@ -81,9 +82,9 @@ public ApiEntityReference subnet() {
* Set the subnet value.
*
* @param subnet the subnet value to set
* @return the VirtualMachineScaleSetIPConfiguration object itself.
* @return the VirtualMachineScaleSetIPConfigurationInner object itself.
*/
public VirtualMachineScaleSetIPConfiguration withSubnet(ApiEntityReference subnet) {
public VirtualMachineScaleSetIPConfigurationInner withSubnet(ApiEntityReference subnet) {
this.subnet = subnet;
return this;
}
@@ -101,9 +102,9 @@ public List<SubResource> applicationGatewayBackendAddressPools() {
* Set the applicationGatewayBackendAddressPools value.
*
* @param applicationGatewayBackendAddressPools the applicationGatewayBackendAddressPools value to set
* @return the VirtualMachineScaleSetIPConfiguration object itself.
* @return the VirtualMachineScaleSetIPConfigurationInner object itself.
*/
public VirtualMachineScaleSetIPConfiguration withApplicationGatewayBackendAddressPools(List<SubResource> applicationGatewayBackendAddressPools) {
public VirtualMachineScaleSetIPConfigurationInner withApplicationGatewayBackendAddressPools(List<SubResource> applicationGatewayBackendAddressPools) {
this.applicationGatewayBackendAddressPools = applicationGatewayBackendAddressPools;
return this;
}
@@ -121,9 +122,9 @@ public List<SubResource> loadBalancerBackendAddressPools() {
* Set the loadBalancerBackendAddressPools value.
*
* @param loadBalancerBackendAddressPools the loadBalancerBackendAddressPools value to set
* @return the VirtualMachineScaleSetIPConfiguration object itself.
* @return the VirtualMachineScaleSetIPConfigurationInner object itself.
*/
public VirtualMachineScaleSetIPConfiguration withLoadBalancerBackendAddressPools(List<SubResource> loadBalancerBackendAddressPools) {
public VirtualMachineScaleSetIPConfigurationInner withLoadBalancerBackendAddressPools(List<SubResource> loadBalancerBackendAddressPools) {
this.loadBalancerBackendAddressPools = loadBalancerBackendAddressPools;
return this;
}
@@ -141,9 +142,9 @@ public List<SubResource> loadBalancerInboundNatPools() {
* Set the loadBalancerInboundNatPools value.
*
* @param loadBalancerInboundNatPools the loadBalancerInboundNatPools value to set
* @return the VirtualMachineScaleSetIPConfiguration object itself.
* @return the VirtualMachineScaleSetIPConfigurationInner object itself.
*/
public VirtualMachineScaleSetIPConfiguration withLoadBalancerInboundNatPools(List<SubResource> loadBalancerInboundNatPools) {
public VirtualMachineScaleSetIPConfigurationInner withLoadBalancerInboundNatPools(List<SubResource> loadBalancerInboundNatPools) {
this.loadBalancerInboundNatPools = loadBalancerInboundNatPools;
return this;
}
Loading

0 comments on commit 08bd178

Please sign in to comment.