class NvaConfiguration implements ConfigurationValidation {

    public void validate(AzureClient azureClient) throws ConfigurationException {
        Preconditions.checkNotNull(azureClient, "azureClient cannot be null");

        List<String> invalidNetworkInterfaces = this.networkInterfaces.stream()
            .map(r -> r.getId())
            .filter(id -> !azureClient.checkExistenceById(id))
            .collect(Collectors.toList());
        if (invalidNetworkInterfaces.size() > 0) {
            throw new ConfigurationException("Invalid network interface(s): " +
                invalidNetworkInterfaces.stream().collect(Collectors.joining(", ")));
        }

        // Get the probe network interface and save the private ip
        NetworkInterface probeNetworkInterface =
            azureClient.getNetworkInterfaceById(this.probeNetworkInterface);
        if (probeNetworkInterface == null) {
            throw new ConfigurationException("probeNetworkInterface '" +
                this.probeNetworkInterface + "' does not exist");
        }

        this.probeSocketAddress = new InetSocketAddress(probeNetworkInterface.primaryPrivateIp(),
            this.probePort);
    }

    @JsonCreator public  NvaConfiguration(@JsonProperty("probeNetworkInterface")String probeNetworkInterface,
                            @JsonProperty("probePort")Integer probePort,
                            @JsonProperty("networkInterfaces")List<NamedResourceId> networkInterfaces);

}