use of com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress in project azure-tools-for-java by Microsoft.
the class PublicIpAddressCreationDialog method getData.
@Override
public DraftPublicIpAddress getData() {
final DraftPublicIpAddress draftPublicIpAddress = new DraftPublicIpAddress(this.subscription.getId(), this.resourceGroup.getName(), this.txtName.getValue());
draftPublicIpAddress.setRegion(region);
return draftPublicIpAddress;
}
use of com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress in project azure-tools-for-java by Microsoft.
the class PublicIPAddressComboBox method resetResourceDraft.
private void resetResourceDraft() {
final PublicIpAddress value = getValue();
if (value != null && !StringUtils.equals(value.status(), IAzureBaseResource.Status.DRAFT)) {
draftPublicIpAddress = DraftPublicIpAddress.getDefaultPublicIpAddressDraft();
draftPublicIpAddress.setRegion(region);
draftPublicIpAddress.setResourceGroup(Optional.ofNullable(resourceGroup).map(ResourceGroup::getName).orElse(null));
draftPublicIpAddress.setSubscriptionId(Optional.ofNullable(subscription).map(Subscription::getId).orElse(null));
setValue(draftPublicIpAddress);
}
}
Aggregations