I'd have a constructor taking publicIpId and publicPort, and make the fields private final.