Search in sources :

Example 1 with DraftPublicIpAddress

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;
}
Also used : DraftPublicIpAddress(com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress)

Example 2 with 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);
    }
}
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

DraftPublicIpAddress (com.microsoft.azure.toolkit.lib.compute.ip.DraftPublicIpAddress)2 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 PublicIpAddress (com.microsoft.azure.toolkit.lib.compute.ip.PublicIpAddress)1