@Override public boolean apply(VirtualGuest guest) { checkNotNull(guest, "virtual guest was null"); VirtualGuest virtualGuest = client.getVirtualGuestApi().getVirtualGuest(guest.getId()); boolean hasBackendIp = virtualGuest.getPrimaryBackendIpAddress() != null; boolean hasPrimaryIp = virtualGuest.getPrimaryIpAddress() != null; boolean hasPasswords = virtualGuest.getOperatingSystem() != null && !virtualGuest.getOperatingSystem().getPasswords().isEmpty(); return virtualGuest.isPrivateNetworkOnly() ? hasBackendIp && hasPasswords : hasBackendIp && hasPrimaryIp && hasPasswords; } }
@Override public boolean apply(VirtualGuest guest) { checkNotNull(guest, "virtual guest was null"); VirtualGuest virtualGuest = client.getVirtualGuestApi().getVirtualGuest(guest.getId()); boolean hasBackendIp = virtualGuest.getPrimaryBackendIpAddress() != null; boolean hasPrimaryIp = virtualGuest.getPrimaryIpAddress() != null; boolean hasPasswords = virtualGuest.getOperatingSystem() != null && !virtualGuest.getOperatingSystem().getPasswords().isEmpty(); return virtualGuest.isPrivateNetworkOnly() ? hasBackendIp && hasPasswords : hasBackendIp && hasPrimaryIp && hasPasswords; } }
@Override public boolean apply(VirtualGuest guest) { checkNotNull(guest, "virtual guest was null"); VirtualGuest virtualGuest = client.getVirtualGuestApi().getVirtualGuest(guest.getId()); boolean hasBackendIp = virtualGuest.getPrimaryBackendIpAddress() != null; boolean hasPrimaryIp = virtualGuest.getPrimaryIpAddress() != null; boolean hasPasswords = virtualGuest.getOperatingSystem() != null && !virtualGuest.getOperatingSystem().getPasswords().isEmpty(); return virtualGuest.isPrivateNetworkOnly() ? hasBackendIp && hasPasswords : hasBackendIp && hasPrimaryIp && hasPasswords; } }
.localDiskFlag(localDisk) .dedicatedAccountHostOnlyFlag(virtualGuest.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(virtualGuest.isPrivateNetworkOnly()) .datacenter(new Datacenter(datacenterName));
.localDiskFlag(localDisk) .dedicatedAccountHostOnlyFlag(virtualGuest.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(virtualGuest.isPrivateNetworkOnly()) .datacenter(new Datacenter(datacenterName));
.localDiskFlag(localDisk) .dedicatedAccountHostOnlyFlag(virtualGuest.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(virtualGuest.isPrivateNetworkOnly()) .datacenter(new Datacenter(datacenterName));
public T fromVirtualGuest(VirtualGuest in) { return this .accountId(in.getAccountId()) .createDate(in.getCreateDate()) .dedicatedAccountHostOnly(in.isDedicatedAccountHostOnly()) .domain(in.getDomain()) .fullyQualifiedDomainName(in.getFullyQualifiedDomainName()) .hostname(in.getHostname()) .id(in.getId()) .lastVerifiedDate(in.getLastVerifiedDate()) .maxCpu(in.getMaxCpu()) .maxCpuUnits(in.getMaxCpuUnits()) .maxMemory(in.getMaxMemory()) .metricPollDate(in.getMetricPollDate()) .modifyDate(in.getModifyDate()) .notes(in.getNotes()) .privateNetworkOnly(in.isPrivateNetworkOnly()) .startCpus(in.getStartCpus()) .statusId(in.getStatusId()) .uuid(in.getUuid()) .primaryBackendIpAddress(in.getPrimaryBackendIpAddress()) .primaryIpAddress(in.getPrimaryIpAddress()) .billingItemId(in.getBillingItemId()) .operatingSystem(in.getOperatingSystem()) .datacenter(in.getDatacenter()) .powerState(in.getPowerState()); } }
public T fromVirtualGuest(VirtualGuest in) { return this .accountId(in.getAccountId()) .createDate(in.getCreateDate()) .dedicatedAccountHostOnly(in.isDedicatedAccountHostOnly()) .domain(in.getDomain()) .fullyQualifiedDomainName(in.getFullyQualifiedDomainName()) .hostname(in.getHostname()) .id(in.getId()) .lastVerifiedDate(in.getLastVerifiedDate()) .maxCpu(in.getMaxCpu()) .maxCpuUnits(in.getMaxCpuUnits()) .maxMemory(in.getMaxMemory()) .metricPollDate(in.getMetricPollDate()) .modifyDate(in.getModifyDate()) .notes(in.getNotes()) .privateNetworkOnly(in.isPrivateNetworkOnly()) .startCpus(in.getStartCpus()) .statusId(in.getStatusId()) .uuid(in.getUuid()) .primaryBackendIpAddress(in.getPrimaryBackendIpAddress()) .primaryIpAddress(in.getPrimaryIpAddress()) .billingItemId(in.getBillingItemId()) .operatingSystem(in.getOperatingSystem()) .datacenter(in.getDatacenter()) .powerState(in.getPowerState()); } }
.modifyDate(in.getModifyDate()) .notes(in.getNotes()) .privateNetworkOnly(in.isPrivateNetworkOnly()) .startCpus(in.getStartCpus()) .statusId(in.getStatusId())
.localDiskFlag(in.isLocalDiskFlag()) .dedicatedAccountHostOnlyFlag(in.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(in.isPrivateNetworkOnly()) .blockDeviceTemplateGroup(in.getVirtualGuestBlockDeviceTemplateGroup()) .networkComponents(in.getVirtualGuestNetworkComponents())
.localDiskFlag(in.isLocalDiskFlag()) .dedicatedAccountHostOnlyFlag(in.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(in.isPrivateNetworkOnly()) .blockDeviceTemplateGroup(in.getVirtualGuestBlockDeviceTemplateGroup()) .networkComponents(in.getVirtualGuestNetworkComponents())
.localDiskFlag(in.isLocalDiskFlag()) .dedicatedAccountHostOnlyFlag(in.isDedicatedAccountHostOnly()) .privateNetworkOnlyFlag(in.isPrivateNetworkOnly()) .blockDeviceTemplateGroup(in.getVirtualGuestBlockDeviceTemplateGroup()) .networkComponents(in.getVirtualGuestNetworkComponents())