use of com.microsoft.azure.SubResource in project azure-sdk-for-java by Azure.
the class LoadBalancingRuleImpl method withFrontend.
@Override
public LoadBalancingRuleImpl withFrontend(String frontendName) {
SubResource frontendRef = new SubResource().withId(this.parent().futureResourceId() + "/frontendIPConfigurations/" + frontendName);
this.inner().withFrontendIPConfiguration(frontendRef);
return this;
}
use of com.microsoft.azure.SubResource in project azure-sdk-for-java by Azure.
the class NetworkInterfaceImpl method beforeCreating.
@Override
protected void beforeCreating() {
NetworkSecurityGroup networkSecurityGroup = null;
if (creatableNetworkSecurityGroupKey != null) {
networkSecurityGroup = (NetworkSecurityGroup) this.createdResource(creatableNetworkSecurityGroupKey);
} else if (existingNetworkSecurityGroupToAssociate != null) {
networkSecurityGroup = existingNetworkSecurityGroupToAssociate;
}
// Associate an NSG if needed
if (networkSecurityGroup != null) {
this.inner().withNetworkSecurityGroup(new SubResource().withId(networkSecurityGroup.id()));
}
NicIPConfigurationImpl.ensureConfigurations(this.nicIPConfigurations.values());
// Reset and update IP configs
this.inner().withIpConfigurations(innersFromWrappers(this.nicIPConfigurations.values()));
}
use of com.microsoft.azure.SubResource in project azure-sdk-for-java by Azure.
the class LoadBalancerFrontendImpl method inboundNatRules.
@Override
public Map<String, LoadBalancerInboundNatRule> inboundNatRules() {
final Map<String, LoadBalancerInboundNatRule> rules = new TreeMap<>();
if (this.inner().inboundNatRules() != null) {
for (SubResource innerRef : this.inner().inboundNatRules()) {
String name = ResourceUtils.nameFromResourceId(innerRef.id());
LoadBalancerInboundNatRule rule = this.parent().inboundNatRules().get(name);
if (rule != null) {
rules.put(name, rule);
}
}
}
return Collections.unmodifiableMap(rules);
}
use of com.microsoft.azure.SubResource in project azure-sdk-for-java by Azure.
the class LoadBalancerInboundNatRuleImpl method withFrontend.
@Override
public LoadBalancerInboundNatRuleImpl withFrontend(String frontendName) {
SubResource frontendRef = new SubResource().withId(this.parent().futureResourceId() + "/frontendIPConfigurations/" + frontendName);
this.inner().withFrontendIPConfiguration(frontendRef);
return this;
}
use of com.microsoft.azure.SubResource in project azure-sdk-for-java by Azure.
the class SubnetImpl method withExistingRouteTable.
@Override
public SubnetImpl withExistingRouteTable(String resourceId) {
SubResource reference = new SubResource().withId(resourceId);
this.inner().withRouteTable(reference);
return this;
}
Aggregations