part of 'generated.dart';

class ListTeamMembersVariablesBuilder {
  
  final FirebaseDataConnect _dataConnect;
  ListTeamMembersVariablesBuilder(this._dataConnect, );
  Deserializer<ListTeamMembersData> dataDeserializer = (dynamic json)  => ListTeamMembersData.fromJson(jsonDecode(json));
  
  Future<QueryResult<ListTeamMembersData, void>> execute() {
    return ref().execute();
  }

  QueryRef<ListTeamMembersData, void> ref() {
    
    return _dataConnect.query("listTeamMembers", dataDeserializer, emptySerializer, null);
  }
}

@immutable
class ListTeamMembersTeamMembers {
  final String id;
  final String teamId;
  final EnumValue<TeamMemberRole> role;
  final String? title;
  final String? department;
  final String? teamHubId;
  final bool? isActive;
  final Timestamp? createdAt;
  final ListTeamMembersTeamMembersUser user;
  final ListTeamMembersTeamMembersTeamHub? teamHub;
  ListTeamMembersTeamMembers.fromJson(dynamic json):
  
  id = nativeFromJson<String>(json['id']),
  teamId = nativeFromJson<String>(json['teamId']),
  role = teamMemberRoleDeserializer(json['role']),
  title = json['title'] == null ? null : nativeFromJson<String>(json['title']),
  department = json['department'] == null ? null : nativeFromJson<String>(json['department']),
  teamHubId = json['teamHubId'] == null ? null : nativeFromJson<String>(json['teamHubId']),
  isActive = json['isActive'] == null ? null : nativeFromJson<bool>(json['isActive']),
  createdAt = json['createdAt'] == null ? null : Timestamp.fromJson(json['createdAt']),
  user = ListTeamMembersTeamMembersUser.fromJson(json['user']),
  teamHub = json['teamHub'] == null ? null : ListTeamMembersTeamMembersTeamHub.fromJson(json['teamHub']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamMembersTeamMembers otherTyped = other as ListTeamMembersTeamMembers;
    return id == otherTyped.id && 
    teamId == otherTyped.teamId && 
    role == otherTyped.role && 
    title == otherTyped.title && 
    department == otherTyped.department && 
    teamHubId == otherTyped.teamHubId && 
    isActive == otherTyped.isActive && 
    createdAt == otherTyped.createdAt && 
    user == otherTyped.user && 
    teamHub == otherTyped.teamHub;
    
  }
  @override
  int get hashCode => Object.hashAll([id.hashCode, teamId.hashCode, role.hashCode, title.hashCode, department.hashCode, teamHubId.hashCode, isActive.hashCode, createdAt.hashCode, user.hashCode, teamHub.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['id'] = nativeToJson<String>(id);
    json['teamId'] = nativeToJson<String>(teamId);
    json['role'] = 
    teamMemberRoleSerializer(role)
    ;
    if (title != null) {
      json['title'] = nativeToJson<String?>(title);
    }
    if (department != null) {
      json['department'] = nativeToJson<String?>(department);
    }
    if (teamHubId != null) {
      json['teamHubId'] = nativeToJson<String?>(teamHubId);
    }
    if (isActive != null) {
      json['isActive'] = nativeToJson<bool?>(isActive);
    }
    if (createdAt != null) {
      json['createdAt'] = createdAt!.toJson();
    }
    json['user'] = user.toJson();
    if (teamHub != null) {
      json['teamHub'] = teamHub!.toJson();
    }
    return json;
  }

  ListTeamMembersTeamMembers({
    required this.id,
    required this.teamId,
    required this.role,
    this.title,
    this.department,
    this.teamHubId,
    this.isActive,
    this.createdAt,
    required this.user,
    this.teamHub,
  });
}

@immutable
class ListTeamMembersTeamMembersUser {
  final String? fullName;
  final String? email;
  ListTeamMembersTeamMembersUser.fromJson(dynamic json):
  
  fullName = json['fullName'] == null ? null : nativeFromJson<String>(json['fullName']),
  email = json['email'] == null ? null : nativeFromJson<String>(json['email']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamMembersTeamMembersUser otherTyped = other as ListTeamMembersTeamMembersUser;
    return fullName == otherTyped.fullName && 
    email == otherTyped.email;
    
  }
  @override
  int get hashCode => Object.hashAll([fullName.hashCode, email.hashCode]);
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    if (fullName != null) {
      json['fullName'] = nativeToJson<String?>(fullName);
    }
    if (email != null) {
      json['email'] = nativeToJson<String?>(email);
    }
    return json;
  }

  ListTeamMembersTeamMembersUser({
    this.fullName,
    this.email,
  });
}

@immutable
class ListTeamMembersTeamMembersTeamHub {
  final String hubName;
  ListTeamMembersTeamMembersTeamHub.fromJson(dynamic json):
  
  hubName = nativeFromJson<String>(json['hubName']);
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamMembersTeamMembersTeamHub otherTyped = other as ListTeamMembersTeamMembersTeamHub;
    return hubName == otherTyped.hubName;
    
  }
  @override
  int get hashCode => hubName.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['hubName'] = nativeToJson<String>(hubName);
    return json;
  }

  ListTeamMembersTeamMembersTeamHub({
    required this.hubName,
  });
}

@immutable
class ListTeamMembersData {
  final List<ListTeamMembersTeamMembers> teamMembers;
  ListTeamMembersData.fromJson(dynamic json):
  
  teamMembers = (json['teamMembers'] as List<dynamic>)
        .map((e) => ListTeamMembersTeamMembers.fromJson(e))
        .toList();
  @override
  bool operator ==(Object other) {
    if(identical(this, other)) {
      return true;
    }
    if(other.runtimeType != runtimeType) {
      return false;
    }

    final ListTeamMembersData otherTyped = other as ListTeamMembersData;
    return teamMembers == otherTyped.teamMembers;
    
  }
  @override
  int get hashCode => teamMembers.hashCode;
  

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = {};
    json['teamMembers'] = teamMembers.map((e) => e.toJson()).toList();
    return json;
  }

  ListTeamMembersData({
    required this.teamMembers,
  });
}

