def to_dict(self):
        """
        Convert this VirtualIP to a dict representation for passing
        to the API.
        """
        if self.id:
            return {"id": self.id}
        return {"type": self.type, "ipVersion": self.ip_version}