Map<String, dynamic> toJson() { final type = this.type; final value = this.value; return { if (type != null) 'Type': type.toValue(), if (value != null) 'Value': value, }; }