Map<String, dynamic> toJson() { final memberId = this.memberId; final role = this.role; return { if (memberId != null) 'MemberId': memberId, if (role != null) 'Role': role.toValue(), }; }