class MemberInformation { MemberInformation({ this.clinics, this.doctorId, this.email, this.employeeId, this.memberId, this.memberName, this.memberNameArabic, this.preferredLanguage, this.roles, }); final List? clinics; final int? doctorId; final String? email; final int? employeeId; final int? memberId; final dynamic memberName; final dynamic memberNameArabic; final String? preferredLanguage; final List? roles; factory MemberInformation.fromJson(Map json) => MemberInformation( clinics: json["clinics"] == null ? null : List.from(json["clinics"].map((x) => Clinic.fromJson(x))), doctorId: json["doctorId"] == null ? null : json["doctorId"], email: json["email"] == null ? null : json["email"], employeeId: json["employeeId"] == null ? null : json["employeeId"], memberId: json["memberId"] == null ? null : json["memberId"], memberName: json["memberName"], memberNameArabic: json["memberNameArabic"], preferredLanguage: json["preferredLanguage"] == null ? null : json["preferredLanguage"], roles: json["roles"] == null ? null : List.from(json["roles"].map((x) => Role.fromJson(x))), ); Map toJson() => { "clinics": clinics == null ? null : List.from(clinics!.map((x) => x.toJson())), "doctorId": doctorId == null ? null : doctorId, "email": email == null ? null : email, "employeeId": employeeId == null ? null : employeeId, "memberId": memberId == null ? null : memberId, "memberName": memberName, "memberNameArabic": memberNameArabic, "preferredLanguage": preferredLanguage == null ? null : preferredLanguage, "roles": roles == null ? null : List.from(roles!.map((x) => x.toJson())), }; } class Clinic { Clinic({ this.defaultClinic, this.id, this.name, }); final bool? defaultClinic; final int? id; final String? name; factory Clinic.fromJson(Map json) => Clinic( defaultClinic: json["defaultClinic"] == null ? null : json["defaultClinic"], id: json["id"] == null ? null : json["id"], name: json["name"] == null ? null : json["name"], ); Map toJson() => { "defaultClinic": defaultClinic == null ? null : defaultClinic, "id": id == null ? null : id, "name": name == null ? null : name, }; } class Role { Role({ this.name, this.roleId, }); final String? name; final int? roleId; factory Role.fromJson(Map json) => Role( name: json["name"] == null ? null : json["name"], roleId: json["roleId"] == null ? null : json["roleId"], ); Map toJson() => { "name": name == null ? null : name, "roleId": roleId == null ? null : roleId, }; }