Map<String, dynamic> toJson() { final subnetId = this.subnetId; final ip = this.ip; return { 'SubnetId': subnetId, if (ip != null) 'Ip': ip, }; }