Map<String, Object?> toJson() { var type = this.type; var value = this.value; final json = <String, Object?>{}; json[r'type'] = type.value; json[r'value'] = value; return json; }