Search in sources :

Example 1 with PublicIpAddress

use of com.microsoft.azure.toolkit.lib.compute.ip.PublicIpAddress 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);
    }
}
Also used : PublicIpAddress(com.microsoft.azure.toolkit.lib.compute.ip.PublicIpAddress) AzurePublicIpAddress(com.microsoft.azure.toolkit.lib.compute.ip.AzurePublicIpAddress) DraftPublicIpAddress(com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress) Subscription(com.microsoft.azure.toolkit.lib.common.model.Subscription) ResourceGroup(com.microsoft.azure.toolkit.lib.common.model.ResourceGroup)

Aggregations

ResourceGroup (com.microsoft.azure.toolkit.lib.common.model.ResourceGroup)1 Subscription (com.microsoft.azure.toolkit.lib.common.model.Subscription)1 AzurePublicIpAddress (com.microsoft.azure.toolkit.lib.compute.ip.AzurePublicIpAddress)1 DraftPublicIpAddress (com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress)1 PublicIpAddress (com.microsoft.azure.toolkit.lib.compute.ip.PublicIpAddress)1