if (wsnic == null) {
throw new IllegalArgumentException("wsnic may not be null");
}
final _NIC nic = this.repr._newNIC();
nic.setNetworkName(wsnic.getAssociation());
nic.setMAC(wsnic.getMAC());
nic.setName(wsnic.getName());
final IPConfig_Type ipconfig = wsnic.getIpConfig();
if (ipconfig == null) {
throw new CannotTranslateException(
"IPConfig_Type in nic request was missing?");
}
final String method =
(String) acqMethodMap.get(ipconfig.getAcquisitionMethod());
if (method == null) {
throw new CannotTranslateException("unrecognized acquisition " +
"type (IPConfig_TypeAcquisitionMethod enumeration)");
}
nic.setAcquisitionMethod(method);
nic.setBroadcast(ipconfig.getBroadcast());
nic.setGateway(ipconfig.getGateway());
nic.setHostname(ipconfig.getHostname());
nic.setIpAddress(ipconfig.getIpAddress());
nic.setNetmask(ipconfig.getNetmask());
nic.setNetwork(ipconfig.getNetwork());
return nic;
}